Settings redesign: hub-based navigation, plus hardening and bug fixes
Rework the settings app around hub pages (home, network, displays, input, apps, privacy, system) with a redesigned sidebar, shared nav state, and new hub view components. Alongside the redesign: validate webview inputs into root commands (users, firewall, snapshots, wifi), fix set_charge_threshold writing the percentage via tee stdin, prevent streaming installs from hanging on inherited stdin, add frontend type fixes, sync versions to 0.8.2, and clean up clippy/svelte-check warnings.
This commit is contained in:
parent
f7b114f778
commit
dce2031743
97 changed files with 2723 additions and 1142 deletions
44
frontend/src/lib/components/SliderField.svelte
Normal file
44
frontend/src/lib/components/SliderField.svelte
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
<script lang="ts">
|
||||
import Row from "./Row.svelte";
|
||||
|
||||
let {
|
||||
label,
|
||||
hint,
|
||||
value = $bindable(),
|
||||
min,
|
||||
max,
|
||||
step = 1,
|
||||
suffix = "",
|
||||
onChange,
|
||||
}: {
|
||||
label: string;
|
||||
hint?: string;
|
||||
value: number;
|
||||
min: number;
|
||||
max: number;
|
||||
step?: number;
|
||||
suffix?: string;
|
||||
onChange?: () => void;
|
||||
} = $props();
|
||||
|
||||
let shown = $derived(step < 1 ? Number(value).toFixed(2).replace(/0+$/, "").replace(/\.$/, "") : String(Math.round(value)));
|
||||
</script>
|
||||
|
||||
<Row {label} {hint}>
|
||||
<input type="range" {min} {max} {step} bind:value oninput={() => onChange?.()} />
|
||||
<span class="val">{shown}{suffix}</span>
|
||||
</Row>
|
||||
|
||||
<style>
|
||||
input[type="range"] {
|
||||
width: 160px;
|
||||
accent-color: var(--accent);
|
||||
}
|
||||
|
||||
.val {
|
||||
min-width: 4.5ch;
|
||||
text-align: right;
|
||||
font-size: 12px;
|
||||
color: var(--muted);
|
||||
}
|
||||
</style>
|
||||
Loading…
Add table
Add a link
Reference in a new issue