Added toast notification function and optimized related component styles

This commit is contained in:
2026-01-02 01:27:51 +08:00
parent 009274e4ad
commit 533f732c53
14 changed files with 909 additions and 199 deletions

View File

@@ -4,7 +4,6 @@ import { BackupService } from '@/../bindings/voidraft/internal/services';
export const useBackupStore = defineStore('backup', () => {
const isSyncing = ref(false);
const error = ref<string | null>(null);
const sync = async (): Promise<void> => {
if (isSyncing.value) {
@@ -12,12 +11,11 @@ export const useBackupStore = defineStore('backup', () => {
}
isSyncing.value = true;
error.value = null;
try {
await BackupService.Sync();
} catch (e) {
error.value = e instanceof Error ? e.message : String(e);
throw e;
} finally {
isSyncing.value = false;
}
@@ -25,7 +23,6 @@ export const useBackupStore = defineStore('backup', () => {
return {
isSyncing,
error,
sync
};
});