File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ const routesToExclude = ['home', 'settings']
8
8
const route = useRoute ()
9
9
const { storeMapping } = useStoreMapping ()
10
10
const settings = useSettings ()
11
- const { getStatus } = settings
11
+ const { getStatus, refreshStatus } = settings
12
12
const { isReadyAndAuth } = storeToRefs (settings )
13
13
14
14
const authBox = ref <InstanceType <typeof ModalBox >>()
@@ -23,6 +23,7 @@ const authenticate = async () => {
23
23
if (! hasError .value ) {
24
24
authBox .value ?.toggleModal ()
25
25
isReadyAndAuth .value = true
26
+ refreshStatus ()
26
27
// TODO: Fix the composable
27
28
// resetAllStores()
28
29
}
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ export const useSettings = defineStore('settings', () => {
38
38
return result . data ?? result . message
39
39
}
40
40
41
- const { state : cat } = useAsyncState ( getStatus , { } as Status )
41
+ const { state : cat , execute } = useAsyncState ( getStatus , { } as Status )
42
42
43
43
watchEffect ( ( ) => {
44
44
isReadyAndAuth . value = cat . value != 'Invalid API Key'
@@ -50,6 +50,7 @@ export const useSettings = defineStore('settings', () => {
50
50
toggleDark,
51
51
cat,
52
52
getStatus,
53
+ refreshStatus : execute ,
53
54
isReadyAndAuth,
54
55
}
55
56
} )
You can’t perform that action at this time.
0 commit comments