fix: add drop zone placeholder for empty sidebar categories #8

Merged
jimmy merged 1 commits from dev into main 2026-03-01 16:22:12 +08:00
@@ -273,6 +273,16 @@
{/if} {/if}
</button> </button>
{#if cat === "main" || !collapsed[cat]} {#if cat === "main" || !collapsed[cat]}
{#if items.length === 0}
<div
class="px-3 py-3 mx-1 rounded-lg border border-dashed text-[11px] text-center transition-colors duration-150
{dropCategory === cat ? 'border-primary-400 bg-primary-50 dark:bg-primary-900/20 text-primary-500' : 'border-surface-300 dark:border-surface-600 text-surface-400'}"
ondragover={(e) => handleCategoryDragOver(cat, e)}
ondrop={(e) => handleCategoryDrop(cat, e)}
>
Drop items here
</div>
{/if}
{#each items as item, i} {#each items as item, i}
{#if canAccess(item.id)} {#if canAccess(item.id)}
{#if item.external || item.remoteHref || item.port} {#if item.external || item.remoteHref || item.port}