- Move the storage and model of the plugin into src/lib/features/pm/ as pure TypeScript, so the skill can still bundle them. - Move the DOM interface onto the host menus, the shared tooltip, and the host icons. - A ribbon button opens Project Management. Board tabs keep the owner runestone.pm and the board-<hex> view IDs through view patterns. - Read only .runestone/pm/. Offer the plugin migration, with backups, for legacy notes. - A save, move, or delete reads only that card again. Watcher paths reach the feature. - Add Settings → Project Management and the projectManagement section. View states move to localStorage. - Background reads the boards from workspace.json. Remove api.backgrounds and the boards service. - Add yaml 2.9.1. Use the host markdown-it. - Move 18 plugin test files to tests/unit/features/pm/ and add native tests.
328 lines
25 KiB
Svelte
328 lines
25 KiB
Svelte
<script lang="ts">
|
||
import { t, locale, LANGUAGES, setLocale } from "$lib/i18n";
|
||
import { showActionMenu } from "$lib/ui/managedActionMenu";
|
||
import { onDestroy } from "svelte";
|
||
import PluginManager from "$lib/plugins/PluginManager.svelte";
|
||
import AppearanceSettings from "$lib/theme/AppearanceSettings.svelte";
|
||
import BrowserSlot from "$lib/plugins/BrowserSlot.svelte";
|
||
import PluginSettings from "$lib/plugins/PluginSettings.svelte";
|
||
import { installedPlugins, pluginTools } from "$lib/plugins/external";
|
||
import { pluginHost } from "$lib/plugins/registry";
|
||
import { FEATURES, type FeatureId } from "$lib/features/catalog";
|
||
import { featureSwitches, setFeature } from "$lib/features/state";
|
||
import { featureErrors } from "$lib/features/loader";
|
||
import { TERMINAL_SHORTCUTS } from "$lib/features/terminalKeys";
|
||
import TerminalSettings from "$lib/features/TerminalSettings.svelte";
|
||
import ProjectManagementSettings from "$lib/features/ProjectManagementSettings.svelte";
|
||
import { invoke, isTauri } from "@tauri-apps/api/core";
|
||
import { confirm } from "@tauri-apps/plugin-dialog";
|
||
import { onMount, untrack, type Snippet } from "svelte";
|
||
import Icon from "$lib/ui/Icon.svelte";
|
||
import IconButton, { type IconName } from "$lib/ui/IconButton.svelte";
|
||
import { DEFAULT_SETTINGS, MIN_AUTOSAVE_SECONDS, MAX_AUTOSAVE_SECONDS, validAutosaveSeconds, type AppSettings } from "$lib/workspace/settings";
|
||
import { license } from "../../../package.json";
|
||
import { appVersion as version } from "../appVersion";
|
||
import { COMMAND_LABELS, OTHER_SHORTCUTS, commandShortcut, shortcutKeys, type WorkbenchCommand } from "./workbenchKeys";
|
||
import { isMac } from "$lib/ui/shortcuts";
|
||
// Help lists every shortcut: the workbench commands, then the editor and file tree shortcuts, then Terminal while it is on.
|
||
const shortcutSections = $derived.by(() => {
|
||
const terminal = $featureSwitches.terminal;
|
||
const general = (Object.keys(COMMAND_LABELS) as WorkbenchCommand[]).filter(command => terminal || command !== "toggle-terminal")
|
||
.map(command => ({ label: COMMAND_LABELS[command], keys: commandShortcut(command) })).filter(item => item.keys);
|
||
const others = new Map<string, { label: string; keys: string }[]>();
|
||
for (const item of OTHER_SHORTCUTS) others.set(item.section, [...(others.get(item.section) ?? []), { label: item.label, keys: shortcutKeys(isMac() && item.macKeys ? item.macKeys : item.keys) }]);
|
||
if (terminal) others.set("Terminal", TERMINAL_SHORTCUTS.map(item => ({ label: item.label, keys: shortcutKeys(item.keys) })));
|
||
return [{ name: "General", items: general }, ...[...others].map(([name, items]) => ({ name, items }))];
|
||
});
|
||
|
||
let { settings, help = false, standalone = false, windowError = "", windowControls, onSave, onClose }: {
|
||
settings: AppSettings;
|
||
help?: boolean;
|
||
standalone?: boolean;
|
||
windowError?: string;
|
||
windowControls?: Snippet;
|
||
onSave: (value: AppSettings) => void | Promise<void>;
|
||
onClose: () => void;
|
||
} = $props();
|
||
let closeLanguage = () => {};
|
||
onDestroy(() => closeLanguage());
|
||
function languagePicker(event: MouseEvent) {
|
||
closeLanguage();
|
||
const anchor = event.currentTarget as HTMLButtonElement;
|
||
const bounds = anchor.getBoundingClientRect();
|
||
closeLanguage = showActionMenu({ x: bounds.left, y: bounds.bottom + 4, label: $t("Language"), parent: dialog,
|
||
items: LANGUAGES.map(item => ({ label: item.name, radio: true, checked: $locale === item.id,
|
||
run: () => {
|
||
const failed = () => { error = $t("Could not save language settings."); message = ""; };
|
||
try { setLocale(item.id).catch(failed); error = ""; message = $t("Changes saved."); } catch { failed(); }
|
||
} })) }).close;
|
||
}
|
||
type Section = string;
|
||
const sections: { id: Section; label: string; icon: IconName; keywords: string }[] = $derived([
|
||
{ id: "about", label: $t("Help and about"), icon: "help", keywords: "help about version shortcuts keyboard guide" },
|
||
{ id: "general", label: $t("General"), icon: "settings", keywords: "auto-save autosave save interval seconds files language français 日本語 简体中文 tables table formulas calculate" },
|
||
{ id: "appearance", label: $t("Appearance"), icon: "sun", keywords: "theme colors light dark Claude Sakura Harvest Moon Crimson Pilot Silver Serpent" },
|
||
{ id: "features", label: $t("Features"), icon: "toggle", keywords: `features off switch memory ${FEATURES.map(feature => `${$t(feature.name)} ${feature.keywords}`).join(" ")}` },
|
||
{ id: "plugins", label: $t("Plug-ins"), icon: "puzzle", keywords: "plugins extensions community" },
|
||
]);
|
||
let section = $state<Section>(untrack(() => help ? "about" : "general"));
|
||
let query = $state("");
|
||
let seconds = $state<number | undefined>(untrack(() => settings.autosaveSeconds));
|
||
let message = $state("");
|
||
let error = $state("");
|
||
let dialog: HTMLDialogElement;
|
||
const browserEnabled = $derived.by(() => { void $pluginHost; return !!pluginHost.get("browser"); });
|
||
const pluginSections = $derived($pluginTools.filter(tool => tool.surface === "settings").map(tool => ({
|
||
id: `plugin:${tool.owner}:${tool.id}`, owner: tool.owner, view: tool.id,
|
||
label: tool.title, icon: "settings" as const,
|
||
keywords: `${$installedPlugins.plugins.find(row => row.manifest.id === tool.owner)?.manifest.name ?? tool.owner} settings configuration`,
|
||
})));
|
||
const terminalSection = $derived($featureSwitches.terminal ? [{ id: "terminal" as const, label: $t("Terminal"), icon: "terminal" as const, keywords: "terminal shell profile default font size scrollback lines cursor blink powershell bash cmd" }] : []);
|
||
const pmSection = $derived($featureSwitches.pm ? [{ id: "project-management" as const, label: $t("Project Management"), icon: "kanban" as const, keywords: "project management kanban board priority levels default board" }] : []);
|
||
const matches = $derived([...sections, ...(browserEnabled ? [{ id: "browser" as const, label: $t("Browser"), icon: "globe" as const, keywords: "browser profiles search cookies cache web privacy" }] : []), ...terminalSection, ...pmSection, ...pluginSections].filter(item => `${item.label} ${item.keywords}`.toLowerCase().includes(query.trim().toLowerCase())));
|
||
const selected = $derived(matches.find(item => item.id === section) ?? matches[0]);
|
||
const selectedPlugin = $derived(pluginSections.find(item => item.id === selected?.id));
|
||
|
||
$effect(() => { seconds = settings.autosaveSeconds; });
|
||
let searchInput: HTMLInputElement | undefined = $state();
|
||
onMount(() => {
|
||
const previous = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
||
dialog.showModal();
|
||
// The first focus goes to the settings search, not to the first window control.
|
||
searchInput?.focus();
|
||
return () => { dialog.close(); previous?.focus(); };
|
||
});
|
||
|
||
function apply(value: AppSettings) {
|
||
error = "";
|
||
const failed = () => { error = $t("Could not save these settings. Your previous settings still apply. Try again."); message = ""; };
|
||
try { Promise.resolve(onSave(value)).catch(failed); message = $t("Changes saved."); }
|
||
catch { failed(); }
|
||
}
|
||
|
||
function changeInterval() {
|
||
if (!validAutosaveSeconds(seconds)) {
|
||
error = $t("Choose a whole number from 1 to 300 seconds.");
|
||
message = "";
|
||
return;
|
||
}
|
||
apply({ ...settings, autosaveSeconds: seconds });
|
||
}
|
||
|
||
/** True when a window runs a shell. The host counts the sessions of all windows. */
|
||
async function shellsRunning(): Promise<boolean> {
|
||
if (!isTauri()) return false;
|
||
try { return await invoke<number>("pty_running") > 0; }
|
||
catch { return false; }
|
||
}
|
||
|
||
async function changeFeature(id: FeatureId, on: boolean, input: HTMLInputElement) {
|
||
error = "";
|
||
// Terminal off ends the shells of every window, so ask first, with the words of the close guard of the workbench.
|
||
if (id === "terminal" && !on && await shellsRunning()) {
|
||
let accepted = false;
|
||
try { accepted = await confirm(`${$t("Terminal sessions will end.")}\n${$t("Turn off Terminal?")}`, { title: $t("Turn off Terminal"), kind: "warning" }); }
|
||
catch (reason) { error = String(reason); }
|
||
if (!accepted) { input.checked = true; return; }
|
||
}
|
||
setFeature(id, on).then(() => { message = $t("Changes saved."); })
|
||
.catch(() => { error = $t("Could not save these settings. Your previous settings still apply. Try again."); message = ""; });
|
||
}
|
||
|
||
function select(next: Section) { section = next; error = ""; message = ""; seconds = settings.autosaveSeconds; }
|
||
|
||
function trapFocus(event: KeyboardEvent) {
|
||
if (event.target instanceof Element && event.target.closest("dialog") !== dialog) return;
|
||
if (event.key !== "Tab") return;
|
||
const controls = [...dialog.querySelectorAll<HTMLElement>("button:not(:disabled), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), a[href], summary, [tabindex]:not([tabindex='-1'])")]
|
||
.filter(element => element.getClientRects().length > 0);
|
||
const first = controls[0], last = controls.at(-1);
|
||
if (event.shiftKey && document.activeElement === first) { event.preventDefault(); last?.focus(); }
|
||
else if (!event.shiftKey && document.activeElement === last) { event.preventDefault(); first?.focus(); }
|
||
}
|
||
</script>
|
||
|
||
<dialog bind:this={dialog} class:help class:standalone aria-labelledby="settings-title" onkeydown={trapFocus} oncancel={event => { if (event.target === dialog) { event.preventDefault(); onClose(); } }}>
|
||
<header class:window-header={!!windowControls} data-tauri-drag-region={windowControls ? true : undefined}>
|
||
<h1 id="settings-title" data-tauri-drag-region={windowControls ? true : undefined}>{help ? $t("Help and about") : $t("Settings")}</h1>
|
||
{#if windowControls}
|
||
{@render windowControls()}
|
||
{:else}
|
||
<IconButton icon="close" label={help ? $t("Close help") : $t("Close settings")} onclick={onClose} />
|
||
{/if}
|
||
</header>
|
||
<div class="body">
|
||
{#if !help}
|
||
<aside>
|
||
<label class="search"><Icon icon="search" /><input bind:this={searchInput} aria-label={$t("Search settings")} placeholder={$t("Search settings…")} bind:value={query} /></label>
|
||
<p class="nav-heading">{$t("Preferences")}</p>
|
||
<nav aria-label={$t("Settings categories")}>
|
||
{#each matches as item}
|
||
<button class:active={selected?.id === item.id} aria-current={selected?.id === item.id ? "page" : undefined} onclick={() => select(item.id)}><Icon icon={item.icon} />{item.label}</button>
|
||
{/each}
|
||
</nav>
|
||
<p class="scope">{$t("For all workspaces on this device.")}</p>
|
||
</aside>
|
||
{/if}
|
||
<div class="content">
|
||
{#if windowError}<p class="error" role="alert">{windowError}</p>{/if}
|
||
{#if !selected}
|
||
<h2>{$t("No settings found")}</h2>
|
||
<p>{$t("Try “save”, “plug-ins”, or “help”.")}</p>
|
||
<button class="text-button" onclick={() => query = ""}>{$t("Clear search")}</button>
|
||
{:else if selected.id === "general"}
|
||
<h2>{$t("General")}</h2>
|
||
<p class="intro">{$t("Choose how RuneStone saves your work.")}</p>
|
||
<h3>{$t('Language')}</h3>
|
||
<div class="card"><div class="setting-row language-row"><div><label for="language-picker">{$t('Display language')}</label><p>{$t('Choose the language for RuneStone controls.')}</p></div><button id="language-picker" class="text-button language-picker" aria-haspopup="menu" onclick={languagePicker}><Icon icon="globe" />{LANGUAGES.find(item => item.id === $locale)?.name}<Icon icon="chevron-down" /></button></div></div>
|
||
<h3>{$t("Documents")}</h3>
|
||
<div class="card">
|
||
<div class="setting-row">
|
||
<div><label for="show-file-title">{$t("File name title")}</label><p id="file-title-description">{$t("Show the file name above each Markdown note in Write and Read.")}</p></div>
|
||
<input id="show-file-title" class="rs-switch" type="checkbox" role="switch" aria-describedby="file-title-description" checked={settings.showFileTitle} onchange={event => apply({ ...settings, showFileTitle: event.currentTarget.checked })} />
|
||
</div>
|
||
<div class="setting-row">
|
||
<div><label for="keep-line-breaks">{$t("Keep line breaks")}</label><p id="line-breaks-description">{$t("Show each line break of the source in Read. When this is off, Read joins the lines of a paragraph, as CommonMark does.")}</p></div>
|
||
<input id="keep-line-breaks" class="rs-switch" type="checkbox" role="switch" aria-describedby="line-breaks-description" checked={settings.keepLineBreaks} onchange={event => apply({ ...settings, keepLineBreaks: event.currentTarget.checked })} />
|
||
</div>
|
||
</div>
|
||
<h3>{$t("Tables")}</h3>
|
||
<div class="card">
|
||
<div class="setting-row">
|
||
<div><label for="table-formulas">{$t("Table formulas")}</label><p id="table-formulas-description">{$t("Calculate table cells that start with =. When this is off, formulas show as text.")}</p></div>
|
||
<input id="table-formulas" class="rs-switch" type="checkbox" role="switch" aria-describedby="table-formulas-description" checked={settings.tableFormulas} onchange={event => apply({ ...settings, tableFormulas: event.currentTarget.checked })} />
|
||
</div>
|
||
</div>
|
||
<h3>{$t("Files")}</h3>
|
||
<div class="card">
|
||
<div class="setting-row">
|
||
<div><label for="show-internal-folder">{$t("Show .runestone folder")}</label><p id="internal-folder-description">{$t("Show workspace settings and plugin data in the file tree.")}</p></div>
|
||
<input id="show-internal-folder" class="rs-switch" type="checkbox" role="switch" aria-describedby="internal-folder-description" checked={settings.showInternalFolder} onchange={event => apply({ ...settings, showInternalFolder: event.currentTarget.checked })} />
|
||
</div>
|
||
<div class="setting-row">
|
||
<div><label for="autosave-enabled">{$t("Auto-save")}</label><p id="autosave-description">{$t("Save changed notes and scripts, including background tabs.")}</p></div>
|
||
<input id="autosave-enabled" class="rs-switch" type="checkbox" role="switch" aria-describedby="autosave-description" checked={settings.autosaveEnabled} onchange={event => { apply({ ...settings, autosaveEnabled: event.currentTarget.checked }); event.currentTarget.checked = settings.autosaveEnabled; }} />
|
||
</div>
|
||
<div class="setting-row">
|
||
<div><label for="autosave-seconds">{$t("Auto-save interval")}</label><p id="interval-description">{$t("Time between saves, even while you type. Choose 1–300 seconds.")}</p></div>
|
||
<div class="interval"><input id="autosave-seconds" type="number" min={MIN_AUTOSAVE_SECONDS} max={MAX_AUTOSAVE_SECONDS} step="1" required disabled={!settings.autosaveEnabled} aria-describedby="interval-description" aria-invalid={!!error} bind:value={seconds} onchange={changeInterval} /><span>{$t("seconds")}</span></div>
|
||
</div>
|
||
</div>
|
||
<p class="note">{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.")}</p>
|
||
<div class="section-footer"><button class="text-button" onclick={() => { seconds = DEFAULT_SETTINGS.autosaveSeconds; apply({ ...DEFAULT_SETTINGS }); }}>{$t("Restore defaults")}</button><span>{$t("Default: every 5 seconds")}</span></div>
|
||
{#if error}<p class="error" role="alert">{error}</p>{/if}
|
||
<p class="saved" role="status">{message}</p>
|
||
{:else if selected.id === "appearance"}
|
||
<AppearanceSettings />
|
||
{:else if selected.id === "features"}
|
||
<h2>{$t("Features")}</h2>
|
||
<p class="intro">{$t("Turn off the features that you do not use. A feature that is off does not load, and its controls do not show.")}</p>
|
||
<div class="card">
|
||
{#each FEATURES as feature (feature.id)}
|
||
<div class="setting-row">
|
||
<div>
|
||
<label for={`feature-${feature.id}`}>{$t(feature.name)}</label>
|
||
<p id={`feature-${feature.id}-description`}>{$t(feature.description)}</p>
|
||
{#if $featureErrors[feature.id]}<p class="error" role="alert">{$t("{name} could not load: {error}", { name: $t(feature.name), error: $featureErrors[feature.id] ?? "" })}</p>{/if}
|
||
</div>
|
||
<input id={`feature-${feature.id}`} class="rs-switch" type="checkbox" role="switch" aria-describedby={`feature-${feature.id}-description`} checked={$featureSwitches[feature.id]} onchange={event => void changeFeature(feature.id, event.currentTarget.checked, event.currentTarget)} />
|
||
</div>
|
||
{/each}
|
||
</div>
|
||
{#if error}<p class="error" role="alert">{error}</p>{/if}
|
||
<p class="saved" role="status">{message}</p>
|
||
{:else if selected.id === "plugins"}
|
||
<PluginManager />
|
||
{:else if selected.id === "browser"}
|
||
<BrowserSlot kind="settings" />
|
||
{:else if selected.id === "terminal"}
|
||
<TerminalSettings />
|
||
{:else if selected.id === "project-management"}
|
||
<ProjectManagementSettings />
|
||
{:else if selectedPlugin}
|
||
{#key selectedPlugin.id}<PluginSettings owner={selectedPlugin.owner} id={selectedPlugin.view} />{/key}
|
||
{:else}
|
||
<div class="brand"><img src="/runestone.svg" alt="" width="88" height="88" /><h2>RuneStone</h2><p>{$t("Version {version}", { version })}</p></div>
|
||
<div class="card help-card">
|
||
<details><summary><Icon icon="book-open" /> {$t("Get started")}</summary><div class="help-copy"><p>{$t("Use the folder button to open a workspace or create one. Your notes and scripts stay as ordinary files on disk.")}</p><p>{$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") })}</p><p>{$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") })}</p></div></details>
|
||
<details><summary><Icon icon="save" /> {$t("Save your work")}</summary><div class="help-copy"><p>{$t("Auto-save saves changed files at the interval in Settings → General. {shortcut} saves the active file immediately.", { shortcut: commandShortcut("save") })}</p><p>{$t("If another app changes a file, RuneStone keeps your edits and offers both versions for review.")}</p></div></details>
|
||
<details open><summary><Icon icon="code" /> {$t("Keyboard shortcuts")}</summary>
|
||
{#each shortcutSections as section (section.name)}
|
||
<h3 class="shortcut-section">{$t(section.name)}</h3>
|
||
<dl>{#each section.items as item (item.label)}<div><dt>{$t(item.label)}</dt><dd><kbd>{item.keys}</kbd></dd></div>{/each}</dl>
|
||
{/each}
|
||
</details>
|
||
</div>
|
||
<p class="about-note">{$t("RuneStone is under development. Maintained by kwyvern-gh.")}</p>
|
||
{/if}
|
||
</div>
|
||
</div>
|
||
</dialog>
|
||
|
||
<style>
|
||
dialog { width: min(920px, calc(100vw - 32px)); height: min(650px, calc(100dvh - 32px)); max-width: none; max-height: none; padding: 0; background: var(--rs-bg); color: var(--rs-text); border: 1px solid var(--rs-border); border-radius: 12px; box-shadow: 0 24px 80px #0008; overflow: hidden; }
|
||
dialog::backdrop { background: var(--rs-scrim); }
|
||
dialog.standalone { width: 100vw; height: 100dvh; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
|
||
dialog.help { width: min(650px, calc(100vw - 32px)); }
|
||
header { height: var(--rs-titlebar-height); padding: 0 4px 0 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--rs-border); background: var(--rs-bg-elevated); }
|
||
header.window-header { padding-right: 0; padding-left: calc(12px + var(--rs-titlebar-inset-start)); user-select: none; }
|
||
h1 { font-size: 13px; font-weight: 600; margin: 0; }
|
||
.body { display: flex; height: calc(100% - var(--rs-titlebar-height)); min-height: 0; }
|
||
aside { width: 220px; flex-shrink: 0; padding: 12px 8px; background: var(--rs-bg-elevated); border-right: 1px solid var(--rs-border); display: flex; flex-direction: column; overflow: auto; }
|
||
.search { display: flex; gap: var(--rs-settings-gap); align-items: center; min-height: var(--rs-settings-control-height); background: var(--rs-bg-active); border: 1px solid var(--rs-border); border-radius: var(--rs-control-radius); padding: 4px 8px; color: var(--rs-text-dim); }
|
||
.search:focus-within { outline: 2px solid var(--rs-focus); }
|
||
.search input { align-self: stretch; width: 100%; min-width: 0; min-height: 24px; border: 0; padding: 0; outline: none; background: transparent; color: var(--rs-text); }
|
||
.nav-heading { margin: 16px 8px 6px; font-size: 11px; color: var(--rs-text-dim); }
|
||
nav { display: flex; flex-direction: column; gap: 2px; }
|
||
nav button { display: flex; align-items: center; gap: var(--rs-settings-gap); width: 100%; min-height: var(--rs-settings-control-height); padding: 5px 8px; border: 0; border-radius: var(--rs-control-radius); background: transparent; text-align: left; }
|
||
nav button:hover { background: var(--rs-bg-active); }
|
||
nav button.active { background: var(--rs-item-selection-bg); box-shadow: inset 0 0 0 var(--rs-item-selection-width) var(--rs-item-selection-border); border-radius: var(--rs-item-selection-radius); }
|
||
.scope { margin: auto 10px 0; padding-top: 24px; color: var(--rs-text-dim); font-size: 12px; }
|
||
.content { padding: 20px 24px; flex: 1; min-width: 0; min-height: 0; overflow-y: auto; }
|
||
h2 { margin: 0; font-size: var(--rs-settings-heading-size); font-weight: 600; color: var(--rs-text-strong); }
|
||
h3 { margin: var(--rs-settings-section-gap) 0 8px; font-size: 13px; font-weight: 600; }
|
||
p { color: var(--rs-text-dim); line-height: 1.45; }
|
||
.intro { margin: 6px 0 var(--rs-settings-section-gap); }
|
||
.card { padding: 0 12px; background: var(--rs-bg-elevated); border: 1px solid var(--rs-border); border-radius: var(--rs-control-radius); }
|
||
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: var(--rs-settings-row-padding) 0; }
|
||
.setting-row > div:first-child { min-width: 0; }
|
||
.setting-row + .setting-row { border-top: 1px solid var(--rs-border); }
|
||
.setting-row label { font-weight: 500; }
|
||
.setting-row p { margin: 3px 0 0; font-size: var(--rs-settings-description-size); }
|
||
.language-row { flex-wrap: wrap; }
|
||
.language-picker { display:flex; align-items:center; gap:var(--rs-settings-gap); max-width:100%; }
|
||
.interval { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; font-size: 11px; color: var(--rs-text-dim); }
|
||
.interval input { width: 72px; min-height: var(--rs-settings-control-height); padding: 4px 6px; border: 1px solid var(--rs-border); border-radius: var(--rs-control-radius); background: var(--rs-bg); color: var(--rs-text); font-size: 13px; }
|
||
.interval input:disabled { color: var(--rs-text-dim); }
|
||
.note, .section-footer, .about-note { font-size: 12px; }
|
||
.note { margin: 10px 0 var(--rs-settings-section-gap); }
|
||
.section-footer { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; color: var(--rs-text-dim); }
|
||
.text-button { min-height: var(--rs-settings-control-height); border: 1px solid var(--rs-border); border-radius: var(--rs-control-radius); background: var(--rs-bg-elevated); padding: 4px 8px; color: var(--rs-text); }
|
||
.text-button:hover { background: var(--rs-bg-active); }
|
||
.saved { font-size: 12px; color: var(--rs-ok); min-height: 20px; }
|
||
.error { color: var(--rs-error); }
|
||
.brand { text-align: center; margin-bottom: 26px; }
|
||
.brand h2 { font-size: 28px; margin-top: 4px; }
|
||
.brand p { margin: 6px 0; font-size: 12px; }
|
||
.help-card details + details { border-top: 1px solid var(--rs-border); }
|
||
summary { display: flex; align-items: center; gap: 12px; padding: 18px 0; cursor: pointer; list-style: none; border-radius: var(--rs-control-radius); }
|
||
summary::after { content: "+"; margin-left: auto; color: var(--rs-text-dim); }
|
||
details[open] summary::after { content: "−"; }
|
||
.help-copy, dl { margin: 0 0 18px 28px; font-size: 12px; }
|
||
.help-copy p:first-child { margin-top: 0; }
|
||
dl div { display: flex; justify-content: space-between; gap: 12px; margin: 10px 0; }
|
||
dd { margin: 0; }
|
||
.shortcut-section { margin: 4px 0 0 28px; font-size: 12px; color: var(--rs-text-dim); text-transform: none; }
|
||
kbd { font-family: var(--rs-font-mono); color: var(--rs-text-dim); }
|
||
.about-note { text-align: center; margin: 20px 0 0; }
|
||
@media (max-width: 660px) {
|
||
.body { flex-direction: column; }
|
||
aside { width: 100%; max-height: 40%; padding: 8px; border-right: 0; border-bottom: 1px solid var(--rs-border); flex-shrink: 0; }
|
||
nav { flex-direction: row; flex-wrap: wrap; margin-top: 6px; }
|
||
nav button { width: auto; flex: 1 1 auto; padding: 5px 8px; gap: 6px; }
|
||
.nav-heading, .scope { display: none; }
|
||
.content { padding: 16px 12px; }
|
||
.setting-row { gap: 14px; }
|
||
}
|
||
</style>
|