fix: realign sqlite path and stabilize client data

This commit is contained in:
Zimeng Xiong
2025-11-22 16:26:28 -08:00
parent 5225332fed
commit d31feda405
13 changed files with 89 additions and 76 deletions
+6 -9
View File
@@ -9,7 +9,7 @@ import type { Drawing, Collection } from '../types';
import { useDebounce } from '../hooks/useDebounce';
import clsx from 'clsx';
import { ConfirmModal } from '../components/ConfirmModal';
import { importDrawings, importLibrary } from '../utils/importUtils';
import { importDrawings } from '../utils/importUtils';
type Point = { x: number; y: number };
@@ -542,17 +542,14 @@ export const Dashboard: React.FC = () => {
setIsLoading(true);
const libFiles = files.filter(f => f.name.endsWith('.excalidrawlib'));
const drawingFiles = files.filter(f => !f.name.endsWith('.excalidrawlib'));
if (libFiles.length > 0) {
for (const file of libFiles) {
const res = await importLibrary(file);
if (!res.success) {
alert(`Failed to import library ${file.name}: ${res.error}`);
}
}
setShowImportError({
isOpen: true,
message: 'Library (.excalidrawlib) imports are not supported in this build. Please import drawings (.excalidraw/.json) instead.'
});
}
const drawingFiles = files.filter(f => !f.name.endsWith('.excalidrawlib'));
if (drawingFiles.length > 0) {
const result = await importDrawings(drawingFiles, targetCollectionId, refreshData);
if (result.failed > 0) {