Add interface languages and improve themes and workspace controls for 0.1.36
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { t } from "$lib/i18n";
|
||||
import { pluginHost } from "$lib/plugins/registry";
|
||||
import type { GitLineInfo } from "$lib/git/contracts";
|
||||
import EditorHost from "$lib/editor/EditorHost.svelte";
|
||||
@@ -128,18 +129,18 @@
|
||||
|
||||
{#if !buffer || buffer.kind === "empty"}
|
||||
<div class="empty">
|
||||
{#if onCloseSplit}<IconButton icon="close" label="Close split" onclick={onCloseSplit} />{/if}
|
||||
{#if onCloseSplit}<IconButton icon="close" label={$t("Close split")} onclick={onCloseSplit} />{/if}
|
||||
<div class="welcome-actions">
|
||||
{#if hasWorkspace}
|
||||
<div class="welcome-row">
|
||||
<button onclick={onNewFile}><Icon icon="file-plus" /> New file <kbd>Ctrl N</kbd></button>
|
||||
{#if onNewNote}<button onclick={onNewNote}><Icon icon="pen" /> New note</button>{/if}
|
||||
<button onclick={onQuickOpen}><Icon icon="search" /> Find file <kbd>Ctrl P</kbd></button>
|
||||
<button onclick={onNewFile}><Icon icon="file-plus" /> {$t("New file")} <kbd>Ctrl N</kbd></button>
|
||||
{#if onNewNote}<button onclick={onNewNote}><Icon icon="pen" /> {$t("New note")}</button>{/if}
|
||||
<button onclick={onQuickOpen}><Icon icon="search" /> {$t("Find file")} <kbd>Ctrl P</kbd></button>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="welcome-row">
|
||||
<button onclick={onOpenWorkspace}><Icon icon="folder-open" /> Open folder <kbd>Ctrl O</kbd></button>
|
||||
{#if onOpenBrowser}<button onclick={onOpenBrowser} disabled={browserOpening}><Icon icon="globe" /> {browserOpening ? "Opening browser…" : "Open browser"}</button>{/if}
|
||||
<button onclick={onOpenWorkspace}><Icon icon="folder-open" /> {$t("Open folder")} <kbd>Ctrl O</kbd></button>
|
||||
{#if onOpenBrowser}<button onclick={onOpenBrowser} disabled={browserOpening}><Icon icon="globe" /> {browserOpening ? $t("Opening browser…") : $t("Open browser")}</button>{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -153,25 +154,25 @@
|
||||
</span>
|
||||
{/if}
|
||||
<div class="actions" bind:this={modeControls}>
|
||||
{#if onCloseSplit}<IconButton icon="close" label="Close split" onclick={onCloseSplit} />{/if}
|
||||
{#if onCloseSplit}<IconButton icon="close" label={$t("Close split")} onclick={onCloseSplit} />{/if}
|
||||
{#if canPreview}
|
||||
<ModeSwitcher
|
||||
label="Document view"
|
||||
label={$t("Document view")}
|
||||
value={documentMode}
|
||||
options={[
|
||||
{ value: "edit", label: "Edit", icon: "pen" },
|
||||
{ value: "read", label: "Read", icon: "book-open" },
|
||||
{ value: "split", label: "Split", icon: "split" },
|
||||
{ value: "edit", label: $t("Edit"), icon: "pen" },
|
||||
{ value: "read", label: $t("Read"), icon: "book-open" },
|
||||
{ value: "split", label: $t("Split"), icon: "split" },
|
||||
]}
|
||||
onchange={setDocumentMode}
|
||||
/>
|
||||
{/if}
|
||||
<ModeSwitcher
|
||||
label="Editor layout"
|
||||
label={$t("Editor layout")}
|
||||
value={chrome}
|
||||
options={[
|
||||
{ value: "Ide", label: "IDE", icon: "code" },
|
||||
{ value: "Writing", label: "Writer", icon: "text" },
|
||||
{ value: "Ide", label: $t("IDE"), icon: "code" },
|
||||
{ value: "Writing", label: $t("Writer"), icon: "text" },
|
||||
]}
|
||||
shortcut=" (Ctrl E)"
|
||||
onchange={(mode) => { if (mode !== chrome) onToggleChrome?.(); }}
|
||||
|
||||
Reference in New Issue
Block a user