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 { tick, type Snippet } from "svelte";
|
||||
import { workspaceReadDataUrl } from "$lib/workspace/api";
|
||||
@@ -112,13 +113,13 @@
|
||||
}
|
||||
}
|
||||
button.dataset.copied = "true";
|
||||
button.setAttribute("aria-label", "Copied");
|
||||
button.title = "Copied";
|
||||
button.setAttribute("aria-label", $t("Copied"));
|
||||
button.title = $t("Copied");
|
||||
window.setTimeout(() => {
|
||||
if (button.isConnected) {
|
||||
delete button.dataset.copied;
|
||||
button.setAttribute("aria-label", "Copy code");
|
||||
button.title = "Copy code";
|
||||
button.setAttribute("aria-label", $t("Copy code"));
|
||||
button.title = $t("Copy code");
|
||||
}
|
||||
}, 1200);
|
||||
}
|
||||
@@ -181,12 +182,12 @@
|
||||
<h1 class="document-title">{markdownTitle(noteRel)}</h1>
|
||||
{#if onEditBlock}
|
||||
{#each sections.filter(section => !editing || section.start < editing.start) as section (section.start)}
|
||||
<div class="md-edit-block" role="button" tabindex="0" aria-label="Edit document block" data-start={section.start} data-end={section.end}>{@html section.html}</div>
|
||||
<div class="md-edit-block" role="button" tabindex="0" aria-label={$t("Edit document block")} data-start={section.start} data-end={section.end}>{@html section.html}</div>
|
||||
{/each}
|
||||
{#if editing && blockEditor}
|
||||
{@render blockEditor()}
|
||||
{#each sections.filter(section => section.start >= editing.end && section.end > editing.end) as section (section.start)}
|
||||
<div class="md-edit-block" role="button" tabindex="0" aria-label="Edit document block" data-start={section.start} data-end={section.end}>{@html section.html}</div>
|
||||
<div class="md-edit-block" role="button" tabindex="0" aria-label={$t("Edit document block")} data-start={section.start} data-end={section.end}>{@html section.html}</div>
|
||||
{/each}
|
||||
{/if}
|
||||
{:else}
|
||||
|
||||
Reference in New Issue
Block a user