mirror of
https://github.com/haexhub/haex-hub.git
synced 2025-12-17 06:30:50 +01:00
fixed trigger
This commit is contained in:
@ -100,9 +100,6 @@ const vault = reactive<{
|
||||
}
|
||||
} */
|
||||
|
||||
const { syncLocaleAsync, syncThemeAsync, syncVaultNameAsync } =
|
||||
useVaultSettingsStore()
|
||||
|
||||
const check = ref(false)
|
||||
|
||||
const initVault = () => {
|
||||
@ -156,11 +153,6 @@ const onOpenDatabase = async () => {
|
||||
},
|
||||
}),
|
||||
)
|
||||
await Promise.allSettled([
|
||||
syncLocaleAsync(),
|
||||
syncThemeAsync(),
|
||||
syncVaultNameAsync(),
|
||||
])
|
||||
} catch (error) {
|
||||
open.value = false
|
||||
console.error('handleError', error, typeof error)
|
||||
|
||||
@ -50,12 +50,20 @@ const { isKnownDeviceAsync } = useDeviceStore()
|
||||
const { loadExtensionsAsync } = useExtensionsStore()
|
||||
const { setDeviceIdIfNotExistsAsync, addDeviceNameAsync } = useDeviceStore()
|
||||
const { deviceId } = storeToRefs(useDeviceStore())
|
||||
const { syncLocaleAsync, syncThemeAsync, syncVaultNameAsync } =
|
||||
useVaultSettingsStore()
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
await setDeviceIdIfNotExistsAsync()
|
||||
await loadExtensionsAsync()
|
||||
await readNotificationsAsync()
|
||||
// Sync settings first before other initialization
|
||||
await Promise.allSettled([
|
||||
syncLocaleAsync(),
|
||||
syncThemeAsync(),
|
||||
syncVaultNameAsync(),
|
||||
setDeviceIdIfNotExistsAsync(),
|
||||
loadExtensionsAsync(),
|
||||
readNotificationsAsync(),
|
||||
])
|
||||
|
||||
const knownDevice = await isKnownDeviceAsync()
|
||||
|
||||
|
||||
@ -66,7 +66,6 @@ export const useWorkspaceStore = defineStore('workspaceStore', () => {
|
||||
name: name || `Workspace ${newIndex}`,
|
||||
position: workspaces.value.length,
|
||||
haexTimestamp: '',
|
||||
haexTombstone: false,
|
||||
}
|
||||
workspaces.value.push(newWorkspace)
|
||||
currentWorkspaceIndex.value = workspaces.value.length - 1
|
||||
|
||||
@ -71,7 +71,6 @@ export const useVaultSettingsStore = defineStore('vaultSettingsStore', () => {
|
||||
where: eq(schema.haexSettings.key, VaultSettingsKeyEnum.theme),
|
||||
})
|
||||
|
||||
console.log('found currentThemeRow', currentThemeRow)
|
||||
if (currentThemeRow?.value) {
|
||||
const theme = availableThemes.value.find(
|
||||
(theme) => theme.value === currentThemeRow.value,
|
||||
@ -100,7 +99,6 @@ export const useVaultSettingsStore = defineStore('vaultSettingsStore', () => {
|
||||
where: eq(schema.haexSettings.key, VaultSettingsKeyEnum.vaultName),
|
||||
})
|
||||
|
||||
console.log('found currentVaultNameRow', currentVaultNameRow)
|
||||
if (currentVaultNameRow?.value) {
|
||||
currentVaultName.value =
|
||||
currentVaultNameRow.value || haexVault.defaultVaultName || 'HaexHub'
|
||||
|
||||
Reference in New Issue
Block a user