{ if (event.target === dialog) { event.preventDefault(); onClose(); } }}>

{help ? $t("Help and about") : $t("Settings")}

{#if windowControls} {@render windowControls()} {:else} {/if}
{#if !help} {/if}
{#if windowError}{/if} {#if !selected}

{$t("No settings found")}

{$t("Try “save”, “plug-ins”, or “help”.")}

{:else if selected.id === "general"}

{$t("General")}

{$t("Choose how RuneStone saves your work.")}

{$t('Language')}

{$t('Choose the language for RuneStone controls.')}

{$t("Documents")}

{$t("Show the file name above each Markdown note in Write and Read.")}

apply({ ...settings, showFileTitle: event.currentTarget.checked })} />

{$t("Show each line break of the source in Read. When this is off, Read joins the lines of a paragraph, as CommonMark does.")}

apply({ ...settings, keepLineBreaks: event.currentTarget.checked })} />

{$t("Tables")}

{$t("Calculate table cells that start with =. When this is off, formulas show as text.")}

apply({ ...settings, tableFormulas: event.currentTarget.checked })} />

{$t("Files")}

{$t("Show workspace settings and plugin data in the file tree.")}

apply({ ...settings, showInternalFolder: event.currentTarget.checked })} />

{$t("Save changed notes and scripts, including background tabs.")}

{ apply({ ...settings, autosaveEnabled: event.currentTarget.checked }); event.currentTarget.checked = settings.autosaveEnabled; }} />

{$t("Time between saves, even while you type. Choose 1–300 seconds.")}

{$t("seconds")}

{settings.autosaveEnabled ? $t("Only changed files are saved.") : $t("Auto-save is off. Use {shortcut} to save your changes.", { shortcut: commandShortcut("save") })} {$t("Disk conflicts keep your edits for review.")}

{#if error}{/if}

{message}

{:else if selected.id === "appearance"} {:else if selected.id === "features"}

{$t("Features")}

{$t("Turn off the features that you do not use. A feature that is off does not load, and its controls do not show.")}

{#each FEATURES as feature (feature.id)}

{$t(feature.description)}

{#if $featureErrors[feature.id]}{/if}
void changeFeature(feature.id, event.currentTarget.checked, event.currentTarget)} />
{/each}
{#if error}{/if}

{message}

{:else if selected.id === "plugins"} {:else if selected.id === "browser"} {:else if selected.id === "terminal"} {:else if selected.id === "project-management"} {:else if selectedPlugin} {#key selectedPlugin.id}{/key} {:else}

RuneStone

{$t("Version {version}", { version })}

{$t("Get started")}

{$t("Use the folder button to open a workspace or create one. Your notes and scripts stay as ordinary files on disk.")}

{$t("Use the + beside the tabs for a new tab. Press {newFile} to create a file, or {quickOpen} to find one.", { newFile: commandShortcut("new-file"), quickOpen: commandShortcut("quick-open") })}

{$t("Press {shortcut} to switch between writing and source editing. Use the terminal button to work with a shell beside your files.", { shortcut: commandShortcut("toggle-layout") })}

{$t("Save your work")}

{$t("Auto-save saves changed files at the interval in Settings → General. {shortcut} saves the active file immediately.", { shortcut: commandShortcut("save") })}

{$t("If another app changes a file, RuneStone keeps your edits and offers both versions for review.")}

{$t("Keyboard shortcuts")} {#each shortcutSections as section (section.name)}

{$t(section.name)}

{#each section.items as item (item.label)}
{$t(item.label)}
{item.keys}
{/each}
{/each}

{$t("RuneStone is under development. Maintained by kwyvern-gh.")}

{/if}