|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
import type { Actions, State } from './types' |
|
|
|
|
import type { Actions, AppInfo, State } from './types' |
|
|
|
|
import { message, useNuxtApp } from '#imports' |
|
|
|
|
|
|
|
|
|
export function useGlobalActions(state: State): Actions { |
|
|
|
@ -48,14 +48,14 @@ export function useGlobalActions(state: State): Actions {
|
|
|
|
|
message.error(err.message || t('msg.error.youHaveBeenSignedOut')) |
|
|
|
|
await signOut() |
|
|
|
|
}) |
|
|
|
|
.finally(resolve) |
|
|
|
|
.finally(() => resolve) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const loadAppInfo = async () => { |
|
|
|
|
try { |
|
|
|
|
const nuxtApp = useNuxtApp() |
|
|
|
|
state.appInfo.value = await nuxtApp.$api.utils.appInfo() |
|
|
|
|
state.appInfo.value = (await nuxtApp.$api.utils.appInfo()) as AppInfo |
|
|
|
|
} catch (e) { |
|
|
|
|
console.error(e) |
|
|
|
|
} |
|
|
|
|