diff --git a/.gitignore b/.gitignore index fc60a7e7ae..c0da249f7f 100644 --- a/.gitignore +++ b/.gitignore @@ -61,4 +61,5 @@ test.pdb portable/ DBX_*_x64-portable.zip .agents/skills -.pnpm-store/* \ No newline at end of file +.pnpm-store/* +.dbx-web \ No newline at end of file diff --git a/apps/desktop/src/composables/useExportTracker.ts b/apps/desktop/src/composables/useExportTracker.ts index 043f1ef4c7..ddcd0517b3 100644 --- a/apps/desktop/src/composables/useExportTracker.ts +++ b/apps/desktop/src/composables/useExportTracker.ts @@ -21,8 +21,20 @@ export function useExportTracker() { const hasActive = computed(() => activeCount.value > 0); + function generateUUID() { + if (typeof crypto !== "undefined" && crypto.randomUUID) { + return crypto.randomUUID(); + } + let buffer = new Uint8Array(16); + crypto.getRandomValues(buffer); + buffer[6] = (buffer[6] & 0x0f) | 0x40; + return Array.from(buffer, (b) => b.toString(16).padStart(2, "0")) + .join("") + .replace(/^(.{8})(.{4})(.{4})(.{4})(.{12})$/, "$1-$2-$3-$4-$5"); + } + function addTask(tableName: string, format: "csv" | "xlsx", filePath: string): ExportTask { - const exportId = crypto.randomUUID(); + const exportId = generateUUID(); const task = reactive({ exportId, tableName,