{#if showWorkspacePicker}
{#each workspaceNames as name} {@const ws = app.config?.workspaces[name]}
{/each}
{/if}
{#each app.lists as list (list.id)} {/each}
{#if showNewList}
{ if (e.key === "Enter") handleNewList(); if (e.key === "Escape") { showNewList = false; newListName = ""; } }} />
{:else} {/if}
{ if (e.key === "Escape") closeDrawer(); }} >
{#if isDesktop}
{#if isWindows} {/if}
{/if}
{#if app.activeListId}
{#if showListMenu}
{#if app.completedTasks.length > 0} {/if}
{/if}
{/if} {#if renamingListId === app.activeListId} { if (e.key === "Enter") handleRenameList(); if (e.key === "Escape") renamingListId = null; }} onblur={handleRenameList} autofocus /> {:else}

{app.activeList?.title ?? "Tasks"}

{/if}
{#if app.lists.length === 0}

No lists yet

Tap the list name above to create one

{:else if !app.activeListId}
Select a list
{:else} {#each app.pendingTasks as task (task.id)}
handleDragStart(e, task.id)} ondragover={(e) => handleDragOver(e, task.id)} ondragend={handleDragEnd} ondrop={(e) => handleDrop(e, task.id)} class="{dragId === task.id ? 'opacity-30' : ''} {dragOverId === task.id && dragId !== task.id ? 'border-t-2 border-t-primary' : ''}" >
{/each} {#if app.pendingTasks.length === 0}
No tasks. Add one below.
{/if} {#if app.completedTasks.length > 0}
{#if completedVisible}
{#each app.completedTasks as task (task.id)} {/each}
{/if} {/if} {/if}
{#if parentTask} {#key parentTask.id} {/key} {/if}
{#if subtaskDetail} {#key subtaskDetail.id} {/key} {/if}
{#if app.syncing}
{:else if app.lastSyncResult}
↑{app.lastSyncResult.uploaded} ↓{app.lastSyncResult.downloaded}
{/if}
{ if (e.key === "Escape") closeSettings(); }} >
settingsWorkspace = newName} ondelete={(name) => { closeSettings(); confirmRemoveWorkspace = name; }} />
{#if confirmDeleteList} (confirmDeleteList = false)} /> {/if} {#if confirmRemoveWorkspace} { const name = confirmRemoveWorkspace; confirmRemoveWorkspace = null; if (name) app.removeWorkspace(name); }} oncancel={() => (confirmRemoveWorkspace = null)} /> {/if} {#if confirmDeleteCompleted} (confirmDeleteCompleted = false)} /> {/if}