Workspaces
{ showCreate = true; newWorkspaceName = ''; }} title="New workspace" type="button">+
{#if loading}
Loading...
{:else if localError}
{localError}
{/if}
{#each workspaces as workspace (wsName(workspace))} {@const id = wsName(workspace)}
{#if renamingId === id}
{ if (e.key === 'Enter') commitRename(workspace); if (e.key === 'Escape') cancelRename(); }} />
commitRename(workspace)} title="Save rename" type="button" disabled={busyId === id}>OK
x
{:else}
selectWorkspace(workspace)} type="button">{id}
startRename(workspace)} title="Rename workspace" type="button" disabled={busyId === id}>
trashWorkspace(workspace)} title="Trash workspace" type="button" disabled={busyId === id}>
{/if}
{/each}
{#if showCreate}
New workspace
{ showCreate = false; newWorkspaceName = ''; }} type="button">x
{creating ? '...' : 'Create'}
{ showCreate = false; newWorkspaceName = ''; }} type="button" disabled={creating}>Cancel
{/if}