lint
This commit is contained in:
parent
0665640660
commit
d1f67f0889
6 changed files with 28 additions and 25 deletions
|
|
@ -468,7 +468,12 @@ const afterStoreSetup = async ({ pinia, store, storageError, i18n }) => {
|
||||||
app.use(pinia)
|
app.use(pinia)
|
||||||
|
|
||||||
app.config.errorHandler = (error, instance, info) => {
|
app.config.errorHandler = (error, instance, info) => {
|
||||||
console.error('Global Vue Error Handler caught an error:', error, instance, info)
|
console.error(
|
||||||
|
'Global Vue Error Handler caught an error:',
|
||||||
|
error,
|
||||||
|
instance,
|
||||||
|
info,
|
||||||
|
)
|
||||||
useInterfaceStore().setGlobalError({ error, instance, info })
|
useInterfaceStore().setGlobalError({ error, instance, info })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,8 +73,6 @@ library.add(
|
||||||
faPlay,
|
faPlay,
|
||||||
)
|
)
|
||||||
|
|
||||||
const camelCase = (name) => name.charAt(0).toUpperCase() + name.slice(1)
|
|
||||||
|
|
||||||
const Status = {
|
const Status = {
|
||||||
name: 'Status',
|
name: 'Status',
|
||||||
components: {
|
components: {
|
||||||
|
|
@ -108,7 +106,6 @@ const Status = {
|
||||||
inProfile: Boolean,
|
inProfile: Boolean,
|
||||||
inConversation: Boolean,
|
inConversation: Boolean,
|
||||||
inQuote: Boolean,
|
inQuote: Boolean,
|
||||||
canDive: Boolean,
|
|
||||||
|
|
||||||
profileUserId: String,
|
profileUserId: String,
|
||||||
simpleTree: Boolean,
|
simpleTree: Boolean,
|
||||||
|
|
@ -118,12 +115,7 @@ const Status = {
|
||||||
|
|
||||||
threadDisplayStatus: String,
|
threadDisplayStatus: String,
|
||||||
},
|
},
|
||||||
emits: [
|
emits: ['goto', 'dive', 'toggleExpanded', 'suspendableStateChange'],
|
||||||
'goto',
|
|
||||||
'dive',
|
|
||||||
'toggleExpanded',
|
|
||||||
'suspendableStateChange'
|
|
||||||
],
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
replying: false,
|
replying: false,
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
import { defineAsyncComponent } from 'vue'
|
|
||||||
|
|
||||||
import Popover from 'src/components/popover/popover.vue'
|
import Popover from 'src/components/popover/popover.vue'
|
||||||
import EmojiPicker from '../emoji_picker/emoji_picker.vue'
|
|
||||||
import StatusBookmarkFolderMenu from 'src/components/status_bookmark_folder_menu/status_bookmark_folder_menu.vue'
|
import StatusBookmarkFolderMenu from 'src/components/status_bookmark_folder_menu/status_bookmark_folder_menu.vue'
|
||||||
|
import EmojiPicker from '../emoji_picker/emoji_picker.vue'
|
||||||
|
|
||||||
import { useInstanceStore } from 'src/stores/instance.js'
|
import { useInstanceStore } from 'src/stores/instance.js'
|
||||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ const StatusBody = {
|
||||||
// Used to automatically expand subjects (if collapsed)
|
// Used to automatically expand subjects (if collapsed)
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -76,7 +76,11 @@ const StatusBody = {
|
||||||
// button. If the default is to collapse statuses with subjects, we just treat it like
|
// button. If the default is to collapse statuses with subjects, we just treat it like
|
||||||
// a status with a subject; otherwise, we just treat it like a tall status.
|
// a status with a subject; otherwise, we just treat it like a tall status.
|
||||||
mightHideBecauseSubject() {
|
mightHideBecauseSubject() {
|
||||||
return !this.inConversation && this.hasSubject && this.mergedConfig.collapseMessageWithSubject
|
return (
|
||||||
|
!this.inConversation &&
|
||||||
|
this.hasSubject &&
|
||||||
|
this.mergedConfig.collapseMessageWithSubject
|
||||||
|
)
|
||||||
},
|
},
|
||||||
mightHideBecauseTall() {
|
mightHideBecauseTall() {
|
||||||
if (this.singleLine || this.compact) return false
|
if (this.singleLine || this.compact) return false
|
||||||
|
|
|
||||||
|
|
@ -887,7 +887,9 @@ const statuses = {
|
||||||
statuses: data.statuses,
|
statuses: data.statuses,
|
||||||
})
|
})
|
||||||
|
|
||||||
data.statuses = data.statuses.map((s) => store.state.allStatusesObject[s.id])
|
data.statuses = data.statuses.map(
|
||||||
|
(s) => store.state.allStatusesObject[s.id],
|
||||||
|
)
|
||||||
return data
|
return data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,13 @@ import sum from 'hash-sum'
|
||||||
import localforage from 'localforage'
|
import localforage from 'localforage'
|
||||||
import { chunk, throttle } from 'lodash'
|
import { chunk, throttle } from 'lodash'
|
||||||
|
|
||||||
import { promisedRequest } from 'src/api/helpers.js'
|
|
||||||
|
|
||||||
import { getCssRules } from '../theme_data/css_utils.js'
|
import { getCssRules } from '../theme_data/css_utils.js'
|
||||||
import { getEngineChecksum, init } from '../theme_data/theme_data_3.service.js'
|
import { getEngineChecksum, init } from '../theme_data/theme_data_3.service.js'
|
||||||
|
|
||||||
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
import { useMergedConfigStore } from 'src/stores/merged_config.js'
|
||||||
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
import { useSyncConfigStore } from 'src/stores/sync_config.js'
|
||||||
|
|
||||||
|
import { promisedRequest } from 'src/api/helpers.js'
|
||||||
import { ROOT_CONFIG } from 'src/modules/default_config_state.js'
|
import { ROOT_CONFIG } from 'src/modules/default_config_state.js'
|
||||||
|
|
||||||
// On platforms where this is not supported, it will return undefined
|
// On platforms where this is not supported, it will return undefined
|
||||||
|
|
@ -302,7 +301,7 @@ export const applyStyleConfig = (input) => {
|
||||||
adoptStyleSheets()
|
adoptStyleSheets()
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getResourcesIndex = async (url, parser = x => x) => {
|
export const getResourcesIndex = async (url, parser = (x) => x) => {
|
||||||
const cache = 'no-store'
|
const cache = 'no-store'
|
||||||
const customUrl = url.replace(/\.(\w+)$/, '.custom.$1')
|
const customUrl = url.replace(/\.(\w+)$/, '.custom.$1')
|
||||||
let builtin
|
let builtin
|
||||||
|
|
@ -320,11 +319,11 @@ export const getResourcesIndex = async (url, parser = x => x) => {
|
||||||
url: v,
|
url: v,
|
||||||
cache,
|
cache,
|
||||||
})
|
})
|
||||||
.then(({ data: text }) => parser(text))
|
.then(({ data: text }) => parser(text))
|
||||||
.catch((e) => {
|
.catch((e) => {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
return null
|
return null
|
||||||
}),
|
}),
|
||||||
]
|
]
|
||||||
} else {
|
} else {
|
||||||
console.error(`Unknown resource format - ${k} is a ${typeof v}`)
|
console.error(`Unknown resource format - ${k} is a ${typeof v}`)
|
||||||
|
|
@ -342,7 +341,10 @@ export const getResourcesIndex = async (url, parser = x => x) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const { data: customData } = await promisedRequest({ url: customUrl, cache })
|
const { data: customData } = await promisedRequest({
|
||||||
|
url: customUrl,
|
||||||
|
cache,
|
||||||
|
})
|
||||||
custom = resourceTransform(customData)
|
custom = resourceTransform(customData)
|
||||||
} catch {
|
} catch {
|
||||||
custom = []
|
custom = []
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue