Merge branch 'more-fixes' into shigusegubu-themes3
This commit is contained in:
commit
9eb6070cb3
3 changed files with 11 additions and 3 deletions
|
|
@ -467,6 +467,11 @@ const afterStoreSetup = async ({ pinia, store, storageError, i18n }) => {
|
||||||
// "Plugins are only applied to stores created after the plugins themselves, and after pinia is passed to the app, otherwise they won't be applied."
|
// "Plugins are only applied to stores created after the plugins themselves, and after pinia is passed to the app, otherwise they won't be applied."
|
||||||
app.use(pinia)
|
app.use(pinia)
|
||||||
|
|
||||||
|
app.config.errorHandler = (error, instance, info) => {
|
||||||
|
console.error('GLOBAL ERROR HANDLER', error, instance, info)
|
||||||
|
useInterfaceStore().setGlobalError({ error, instance, info })
|
||||||
|
}
|
||||||
|
|
||||||
const waitForAllStoresToLoad = async () => {
|
const waitForAllStoresToLoad = async () => {
|
||||||
// the stores that do not persist technically do not need to be awaited here,
|
// the stores that do not persist technically do not need to be awaited here,
|
||||||
// but that involves either hard-coding the stores in some place (prone to errors)
|
// but that involves either hard-coding the stores in some place (prone to errors)
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@ import ProgressButton from 'src/components/progress_button/progress_button.vue'
|
||||||
import Select from 'src/components/select/select.vue'
|
import Select from 'src/components/select/select.vue'
|
||||||
import UserAvatar from 'src/components/user_avatar/user_avatar.vue'
|
import UserAvatar from 'src/components/user_avatar/user_avatar.vue'
|
||||||
import UserLink from 'src/components/user_link/user_link.vue'
|
import UserLink from 'src/components/user_link/user_link.vue'
|
||||||
|
import FollowButton from 'src/components/follow_button/follow_button.vue'
|
||||||
|
|
||||||
import { useEmojiStore } from 'src/stores/emoji.js'
|
import { useEmojiStore } from 'src/stores/emoji.js'
|
||||||
import { useInstanceStore } from 'src/stores/instance.js'
|
import { useInstanceStore } from 'src/stores/instance.js'
|
||||||
|
|
@ -138,9 +139,7 @@ export default {
|
||||||
() => import('src/components/account_actions/account_actions.vue'),
|
() => import('src/components/account_actions/account_actions.vue'),
|
||||||
),
|
),
|
||||||
ProgressButton,
|
ProgressButton,
|
||||||
FollowButton: defineAsyncComponent(
|
FollowButton,
|
||||||
() => import('src/components/follow_button/follow_button.vue'),
|
|
||||||
),
|
|
||||||
Select,
|
Select,
|
||||||
UserLink,
|
UserLink,
|
||||||
UserNote: defineAsyncComponent(
|
UserNote: defineAsyncComponent(
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,7 @@ export const useInterfaceStore = defineStore('interface', {
|
||||||
},
|
},
|
||||||
layoutType: 'normal',
|
layoutType: 'normal',
|
||||||
globalNotices: [],
|
globalNotices: [],
|
||||||
|
globalError: null,
|
||||||
layoutHeight: 0,
|
layoutHeight: 0,
|
||||||
lastTimeline: null,
|
lastTimeline: null,
|
||||||
foreignProfileBackground: null,
|
foreignProfileBackground: null,
|
||||||
|
|
@ -176,6 +177,9 @@ export const useInterfaceStore = defineStore('interface', {
|
||||||
removeGlobalNotice(notice) {
|
removeGlobalNotice(notice) {
|
||||||
this.globalNotices = this.globalNotices.filter((n) => n !== notice)
|
this.globalNotices = this.globalNotices.filter((n) => n !== notice)
|
||||||
},
|
},
|
||||||
|
setGlobalError(data) {
|
||||||
|
this.globalError = data
|
||||||
|
},
|
||||||
pushGlobalNotice({
|
pushGlobalNotice({
|
||||||
messageKey,
|
messageKey,
|
||||||
messageArgs = {},
|
messageArgs = {},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue