fix: make layout references reactive

This commit is contained in:
Yuri Karamian
2026-08-17 19:31:21 +02:00
parent 695664913a
commit 9ccbf3aff5
+4 -4
View File
@@ -81,9 +81,9 @@
return null; return null;
} }
let sidebar: Sidebar; let sidebar = $state<Sidebar>();
let noteList: NoteList; let noteList = $state<NoteList>();
let editor: Editor; let editor = $state<Editor>();
let unlistenFileChange: (() => void) | null = null; let unlistenFileChange: (() => void) | null = null;
async function applyStartupTarget(target: StartupTarget): Promise<boolean> { async function applyStartupTarget(target: StartupTarget): Promise<boolean> {
if (target.mode === 'notebook') { if (target.mode === 'notebook') {
@@ -829,7 +829,7 @@
<!-- Mobile Header --> <!-- Mobile Header -->
<div class="mobile-header"> <div class="mobile-header">
{#if $mobileView !== 'sidebar'} {#if $mobileView !== 'sidebar'}
<button class="mobile-header-btn" onclick={mobileBack}> <button class="mobile-header-btn" onclick={mobileBack} aria-label="Go back">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M15 18l-6-6 6-6"/> <path d="M15 18l-6-6 6-6"/>
</svg> </svg>