{ if (!carriesFiles(event) || workspace.query) return event.preventDefault() dropping = true }} ondragleave={(event) => { if (!(event.currentTarget as HTMLElement).contains(event.relatedTarget as Node | null)) dropping = false }} ondrop={drop} >
{workspace.space?.slug ?? 'diary'}
{workspace.nodes.length} {workspace.nodes.length === 1 ? 'item' : 'items'}
{#if workspace.query}
/
{workspace.query}
{#if workspace.globalSearch}
all spaces
{/if}
workspace.guard(() => workspace.search(''))}>esc
{/if}
{#if nested}
workspace.guard(() => workspace.up())}>
..
/
up
{/if} {#each workspace.nodes as node, index (node.id)} {@const previous = workspace.nodes[index - 1]} {#if !workspace.query && node.kind === 'document' && (!previous || previous.kind !== 'document' || formatDay(previous.created_at) !== formatDay(node.created_at))}
{formatDay(node.created_at)}
{formatWeekday(node.created_at)}
{/if}
{ event.preventDefault() actions(index) }} class:active={index === workspace.cursor} class:open={workspace.open?.id === node.id} data-index={index} onclick={() => pick(index)} >
{label(node)}{#if isContainer(node)}
/
{/if} {#if workspace.query && node.location}
{node.location}
{/if}
{#if workspace.marked?.id === node.id}
m
{/if} {#if node.shared}
{/if} {#if node.file?.encrypted}
{/if} {#if node.sealed}
{/if}
{aside(node)}
{#if isTouchDevice}
actions(index)}>
{/if}
{:else}
{#if workspace.query} no matches {:else} nothing here yet —
o
writes,
⇧ O
makes a folder, files dropped here land here {/if}
{/each}