mirror of
https://gitlab.com/ArkHost/HelixNotes.git
synced 2026-07-24 07:45:57 +02:00
Allow creating a top-level notebook while a notebook is selected (clearable parent chip)
This commit is contained in:
@@ -576,7 +576,9 @@
|
|||||||
{#if showNewNotebook}
|
{#if showNewNotebook}
|
||||||
<div class="new-notebook-input">
|
<div class="new-notebook-input">
|
||||||
{#if newNotebookParent}
|
{#if newNotebookParent}
|
||||||
<span class="new-notebook-parent">{newNotebookParent.name}/</span>
|
<button class="new-notebook-parent" title="Click to create a top-level notebook instead" onmousedown={(e) => { e.preventDefault(); newNotebookParent = null; }}>
|
||||||
|
{newNotebookParent.name}/<span class="new-notebook-parent-x" aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
{/if}
|
{/if}
|
||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
@@ -969,11 +971,30 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.new-notebook-parent {
|
.new-notebook-parent {
|
||||||
padding: 4px 0 4px 8px;
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 2px;
|
||||||
|
margin: 0 2px 0 6px;
|
||||||
|
padding: 2px 5px;
|
||||||
color: var(--text-tertiary);
|
color: var(--text-tertiary);
|
||||||
font-size: inherit;
|
font-size: inherit;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
border: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
background: var(--bg-hover);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.new-notebook-parent:hover {
|
||||||
|
color: var(--text-primary);
|
||||||
|
background: var(--accent-light);
|
||||||
|
}
|
||||||
|
|
||||||
|
.new-notebook-parent-x {
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 1;
|
||||||
|
opacity: 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.new-notebook-input input {
|
.new-notebook-input input {
|
||||||
|
|||||||
Reference in New Issue
Block a user