Block note creation in Quick Access/Trash, add icons to trash actions (#188)

This commit is contained in:
Yuri Karamian
2026-06-30 16:13:22 +02:00
parent 24d1ba9f8f
commit 5e2c31598c
+14 -3
View File
@@ -990,7 +990,7 @@
</svg> </svg>
</button> </button>
{/if} {/if}
{#if $viewMode !== 'trash'} {#if $viewMode !== 'trash' && $viewMode !== 'quickaccess'}
<button class={isMobile ? 'mobile-create-btn' : 'icon-btn'} onclick={handleCreateNote} title={`New note (${modKey}+N)`}> <button class={isMobile ? 'mobile-create-btn' : 'icon-btn'} onclick={handleCreateNote} title={`New note (${modKey}+N)`}>
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width={isMobile ? '3' : '2'} stroke-linecap="round" stroke-linejoin="round"> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width={isMobile ? '3' : '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" />
@@ -1006,8 +1006,14 @@
<span class="selection-count">{selectedPaths.size} selected</span> <span class="selection-count">{selectedPaths.size} selected</span>
<div class="selection-actions"> <div class="selection-actions">
{#if $viewMode === 'trash'} {#if $viewMode === 'trash'}
<button class="selection-action" onclick={handleBatchRestore}>Restore</button> <button class="selection-action" onclick={handleBatchRestore} title="Restore selected">
<button class="selection-action danger" onclick={handleBatchPermanentDelete}>Delete</button> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"/><path d="M3 3v5h5"/></svg>
Restore
</button>
<button class="selection-action danger" onclick={handleBatchPermanentDelete} title="Delete permanently">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"/><path d="M19 6l-2 14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2L5 6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"/></svg>
Delete
</button>
{:else} {:else}
<button class="selection-action" onclick={() => { batchMovePicker = true; }}>Move</button> <button class="selection-action" onclick={() => { batchMovePicker = true; }}>Move</button>
<button class="selection-action" onclick={() => openBatchTagEdit()}>Tag</button> <button class="selection-action" onclick={() => openBatchTagEdit()}>Tag</button>
@@ -1131,6 +1137,8 @@
<div class="empty-state"> <div class="empty-state">
{#if $viewMode === 'trash'} {#if $viewMode === 'trash'}
<p>Trash is empty</p> <p>Trash is empty</p>
{:else if $viewMode === 'quickaccess'}
<p>No starred notes</p>
{:else} {:else}
<p>No notes yet</p> <p>No notes yet</p>
<button class="btn-link" onclick={handleCreateNote}>Create your first note</button> <button class="btn-link" onclick={handleCreateNote}>Create your first note</button>
@@ -1720,6 +1728,9 @@
} }
.selection-action { .selection-action {
display: inline-flex;
align-items: center;
gap: 4px;
background: none; background: none;
border: 1px solid var(--border-color); border: 1px solid var(--border-color);
color: var(--text-primary); color: var(--text-primary);