fix(frontend): restore trash preview state vars after FilesTab extraction

After 9878ab4 moved file-preview state into FilesTab, App.svelte still
references previewItem/previewContent/previewLoading/previewError in
two places that were not migrated:

- openTrashPreview() (trash file preview flow, ~line 1334)
- {#if previewItem} <FilePreviewModal ...> block (~line 3563)

Without these 'let' bindings, vite-plugin-svelte warned
'previewError is not defined' and the Svelte runtime threw a
ReferenceError on first render, leaving the WebView empty.

Restore the four 'let' declarations in App.svelte (kept here because
trash lives outside FilesTab) and rebuild the embedded frontend bundle.
This commit is contained in:
mirivlad 2026-06-15 17:30:38 +00:00
parent 9878ab4fb3
commit cd982f2f28
3 changed files with 34 additions and 29 deletions

View File

@ -19,7 +19,7 @@
background: #13131f; background: #13131f;
} }
</style> </style>
<script type="module" crossorigin src="/assets/main-DTT9uc7y.js"></script> <script type="module" crossorigin src="/assets/main-QJp1UtIq.js"></script>
<link rel="stylesheet" crossorigin href="/assets/main-Bl-yCbt2.css"> <link rel="stylesheet" crossorigin href="/assets/main-Bl-yCbt2.css">
</head> </head>
<body> <body>

View File

@ -84,6 +84,11 @@
let selectedSection = '' let selectedSection = ''
let selectedNode = null let selectedNode = null
let activeTab = 'overview' let activeTab = 'overview'
// Trash preview state (kept in App.svelte because trash lives outside FilesTab)
let previewItem = null
let previewContent = ''
let previewLoading = false
let previewError = ''
let notes = [] let notes = []
let noteEditor = null let noteEditor = null
let noteEditorPanel = undefined; // bind:this ref for NoteEditorPanel let noteEditorPanel = undefined; // bind:this ref for NoteEditorPanel