{tr('workspaceTree.title')}
+
{#if loading}
{tr('common.loading')}
{:else if localError}
{localError}
{/if}
{#each getChildren(null) as node (node.id)} {#if node.type === 'folder'} {@const expanded = isExpanded(node)}
toggleFolder(node)}>
{expanded ? '▾' : '▸'}
{node.title}
{#if expanded} {#each getChildren(node.id) as child (child.id)}
selectWorkspace(child)} type="button">{child.title}
trashWorkspace(child)} title={tr('workspaceTree.trash')} type="button" disabled={busyId === child.id}>
{/each} {/if}
{:else}
selectWorkspace(node)} type="button">{node.title}
trashWorkspace(node)} title={tr('workspaceTree.trash')} type="button" disabled={busyId === node.id}>
{/if} {/each}
{#if templateWarning}
{tr('workspaceTree.templateIncompleteCreated', { name: templateWarning.workspaceName })}
{#each templateWarning.issues as issue (issue.pluginId)}
{issue.name}: {issue.reason}
{/each}
{tr('common.close')}
{/if} {#if showCreate}
{tr('workspaceTree.new')}
{tr('common.close')}
{tr('pluginCard.name')}
event.key === 'Enter' && doCreate()} />
{tr('workspaceTree.parentFolder') || 'Parent folder'}
{#each parentFolderOptions as opt (opt.id)}
{opt.name}
{/each}
{tr('workspaceTree.template')}
{#each workspaceTemplates as template (template.id)}
{template.name}
{/each}
{#if selectedTemplate}
{selectedTemplate.description}
{#each selectedTemplateTools as tool (tool.pluginId)}
{tool.name}
{tool.tabs.length ? tr('workspaceTree.templateToolTabs', { tabs: tool.tabs.join(', ') }) : tr('workspaceTree.templateToolNoTabs')}
{tool.reason}
{/each}
{#if selectedTemplateIssues.length > 0}
{tr('workspaceTree.templateWillBeIncomplete')}
{/if}
{/if} {#if createError}
{createError}
{/if}
{creating ? tr('workspaceTree.creating') : tr('workspaceTree.create')}
{tr('common.cancel')}
{/if}