Merge branch 'more-fixes' into shigusegubu-themes3
This commit is contained in:
commit
35cb89109c
11 changed files with 35 additions and 32 deletions
0
changelog.d/more-fixes.skip
Normal file
0
changelog.d/more-fixes.skip
Normal file
|
|
@ -468,7 +468,12 @@ const afterStoreSetup = async ({ pinia, store, storageError, i18n }) => {
|
|||
app.use(pinia)
|
||||
|
||||
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 })
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@
|
|||
|
||||
:is-focused-function="isFocused"
|
||||
:get-replies="getReplies"
|
||||
:highlight="maybeHighlight === status.id"
|
||||
:highlight="maybeHighlight"
|
||||
:toggle-expanded="toggleExpanded"
|
||||
|
||||
:simple="treeViewIsSimple"
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
:params="params"
|
||||
@posted="doCloseModal"
|
||||
@draft-done="doCloseModal"
|
||||
@can-close="doCloseModal"
|
||||
@close-accepted="doCloseModal"
|
||||
/>
|
||||
</div>
|
||||
</Modal>
|
||||
|
|
|
|||
|
|
@ -73,8 +73,6 @@ library.add(
|
|||
faPlay,
|
||||
)
|
||||
|
||||
const camelCase = (name) => name.charAt(0).toUpperCase() + name.slice(1)
|
||||
|
||||
const Status = {
|
||||
name: 'Status',
|
||||
components: {
|
||||
|
|
@ -108,7 +106,6 @@ const Status = {
|
|||
inProfile: Boolean,
|
||||
inConversation: Boolean,
|
||||
inQuote: Boolean,
|
||||
canDive: Boolean,
|
||||
|
||||
profileUserId: String,
|
||||
simpleTree: Boolean,
|
||||
|
|
@ -118,12 +115,7 @@ const Status = {
|
|||
|
||||
threadDisplayStatus: String,
|
||||
},
|
||||
emits: [
|
||||
'goto',
|
||||
'dive',
|
||||
'toggleExpanded',
|
||||
'suspendableStateChange'
|
||||
],
|
||||
emits: ['goto', 'dive', 'toggleExpanded', 'suspendableStateChange'],
|
||||
data() {
|
||||
return {
|
||||
replying: false,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
import { defineAsyncComponent } from '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 EmojiPicker from '../emoji_picker/emoji_picker.vue'
|
||||
|
||||
import { useInstanceStore } from 'src/stores/instance.js'
|
||||
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ const StatusBody = {
|
|||
// Used to automatically expand subjects (if collapsed)
|
||||
type: Boolean,
|
||||
default: false,
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -76,7 +76,11 @@ const StatusBody = {
|
|||
// 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.
|
||||
mightHideBecauseSubject() {
|
||||
return !this.inConversation && this.hasSubject && this.mergedConfig.collapseMessageWithSubject
|
||||
return (
|
||||
!this.inConversation &&
|
||||
this.hasSubject &&
|
||||
this.mergedConfig.collapseMessageWithSubject
|
||||
)
|
||||
},
|
||||
mightHideBecauseTall() {
|
||||
if (this.singleLine || this.compact) return false
|
||||
|
|
|
|||
|
|
@ -302,7 +302,7 @@ const api = {
|
|||
// Follow requests
|
||||
startFetchingFollowRequests(store) {
|
||||
if (store.state.fetchers.followRequests) return
|
||||
const fetcher = followRequestFetcher.startFetchingFollowRequests({
|
||||
const fetcher = followRequestFetcher.startFetching({
|
||||
store,
|
||||
credentials: useOAuthStore().token,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -887,7 +887,9 @@ const 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
|
||||
})
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2,14 +2,13 @@ import sum from 'hash-sum'
|
|||
import localforage from 'localforage'
|
||||
import { chunk, throttle } from 'lodash'
|
||||
|
||||
import { promisedRequest } from 'src/api/helpers.js'
|
||||
|
||||
import { getCssRules } from '../theme_data/css_utils.js'
|
||||
import { getEngineChecksum, init } from '../theme_data/theme_data_3.service.js'
|
||||
|
||||
import { useMergedConfigStore } from 'src/stores/merged_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'
|
||||
|
||||
// On platforms where this is not supported, it will return undefined
|
||||
|
|
@ -302,7 +301,7 @@ export const applyStyleConfig = (input) => {
|
|||
adoptStyleSheets()
|
||||
}
|
||||
|
||||
export const getResourcesIndex = async (url, parser = x => x) => {
|
||||
export const getResourcesIndex = async (url, parser = (x) => x) => {
|
||||
const cache = 'no-store'
|
||||
const customUrl = url.replace(/\.(\w+)$/, '.custom.$1')
|
||||
let builtin
|
||||
|
|
@ -320,11 +319,11 @@ export const getResourcesIndex = async (url, parser = x => x) => {
|
|||
url: v,
|
||||
cache,
|
||||
})
|
||||
.then(({ data: text }) => parser(text))
|
||||
.catch((e) => {
|
||||
console.error(e)
|
||||
return null
|
||||
}),
|
||||
.then(({ data: text }) => parser(text))
|
||||
.catch((e) => {
|
||||
console.error(e)
|
||||
return null
|
||||
}),
|
||||
]
|
||||
} else {
|
||||
console.error(`Unknown resource format - ${k} is a ${typeof v}`)
|
||||
|
|
@ -342,7 +341,10 @@ export const getResourcesIndex = async (url, parser = x => x) => {
|
|||
}
|
||||
|
||||
try {
|
||||
const { data: customData } = await promisedRequest({ url: customUrl, cache })
|
||||
const { data: customData } = await promisedRequest({
|
||||
url: customUrl,
|
||||
cache,
|
||||
})
|
||||
custom = resourceTransform(customData)
|
||||
} catch {
|
||||
custom = []
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ describe('Draft saving', () => {
|
|||
await textarea.setValue('mew mew')
|
||||
wrapper.vm.requestClose()
|
||||
expect(wrapper.vm.$store.getters.draftCount).to.equal(1)
|
||||
await waitForEvent(wrapper, 'can-close')
|
||||
await waitForEvent(wrapper, 'close-accepted')
|
||||
})
|
||||
|
||||
it('should save when close if auto-save is off, and unsavedPostAction is save', async () => {
|
||||
|
|
@ -122,7 +122,7 @@ describe('Draft saving', () => {
|
|||
await textarea.setValue('mew mew')
|
||||
wrapper.vm.requestClose()
|
||||
expect(wrapper.vm.$store.getters.draftCount).to.equal(1)
|
||||
await waitForEvent(wrapper, 'can-close')
|
||||
await waitForEvent(wrapper, 'close-accepted')
|
||||
})
|
||||
|
||||
it('should discard when close if auto-save is off, and unsavedPostAction is discard', async () => {
|
||||
|
|
@ -143,7 +143,7 @@ describe('Draft saving', () => {
|
|||
const textarea = wrapper.get('textarea')
|
||||
await textarea.setValue('mew mew')
|
||||
wrapper.vm.requestClose()
|
||||
await waitForEvent(wrapper, 'can-close')
|
||||
await waitForEvent(wrapper, 'close-accepted')
|
||||
expect(wrapper.vm.$store.getters.draftCount).to.equal(0)
|
||||
})
|
||||
|
||||
|
|
@ -180,6 +180,6 @@ describe('Draft saving', () => {
|
|||
console.info('clicked')
|
||||
expect(wrapper.vm.$store.getters.draftCount).to.equal(1)
|
||||
await flushPromises()
|
||||
await waitForEvent(wrapper, 'can-close')
|
||||
await waitForEvent(wrapper, 'close-accepted')
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue