mirror of
https://gitlab.com/ArkHost/HelixNotes.git
synced 2026-07-24 07:45:57 +02:00
Treat Unfiled Notes as root when creating a new notebook
This commit is contained in:
@@ -563,10 +563,11 @@
|
|||||||
if (showNewNotebook) {
|
if (showNewNotebook) {
|
||||||
showNewNotebook = false; newNotebookName = ''; newNotebookParent = null;
|
showNewNotebook = false; newNotebookName = ''; newNotebookParent = null;
|
||||||
} else {
|
} else {
|
||||||
newNotebookParent = ($viewMode === 'notebook' && $activeNotebook) ? $activeNotebook : null;
|
// Unfiled Notes is the root pseudo-notebook (empty relative_path); treat it as root.
|
||||||
|
newNotebookParent = ($viewMode === 'notebook' && $activeNotebook?.relative_path) ? $activeNotebook : null;
|
||||||
showNewNotebook = true;
|
showNewNotebook = true;
|
||||||
}
|
}
|
||||||
}} title={$viewMode === 'notebook' && $activeNotebook ? `New notebook inside ${$activeNotebook.name}` : 'New notebook'}>
|
}} title={$viewMode === 'notebook' && $activeNotebook?.relative_path ? `New notebook inside ${$activeNotebook.name}` : 'New notebook'}>
|
||||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||||
<line x1="12" y1="5" x2="12" y2="19" /><line x1="5" y1="12" x2="19" y2="12" />
|
<line x1="12" y1="5" x2="12" y2="19" /><line x1="5" y1="12" x2="19" y2="12" />
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
Reference in New Issue
Block a user