{ 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("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 Ctrl+S to save your changes.")} {$t("Disk conflicts keep your edits for review.")}

{#if error}{/if}

{message}

{:else if selected.id === "appearance"} {:else if selected.id === "plugins"} {:else if selected.id === "browser"} {: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 Ctrl+N to create a file, or Ctrl+P to find one.")}

{$t("Press Ctrl+E to switch between writing and source editing. Use the terminal button to work with a shell beside your files.")}

{$t("Save your work")}

{$t("Auto-save saves changed files at the interval in Settings → General. Ctrl+S saves the active file immediately.")}

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

{$t("Keyboard shortcuts")}
{$t("Open a workspace")}
Ctrl+O
{$t("Find a file")}
Ctrl+P
{$t("Save the active file")}
Ctrl+S
{$t("Search the workspace")}
Ctrl+Shift+F
{$t("Open settings")}
Ctrl+,
{$t("Help and about")}
F1

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

{/if}