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.
40 lines
811 B
Svelte
40 lines
811 B
Svelte
<script lang="ts">
|
|
let {
|
|
items,
|
|
value = $bindable(),
|
|
}: { items: { id: string; label: string }[]; value: string } = $props();
|
|
</script>
|
|
|
|
<div class="subnav">
|
|
{#each items as item (item.id)}
|
|
<button type="button" class:on={value === item.id} onclick={() => (value = item.id)}>
|
|
{item.label}
|
|
</button>
|
|
{/each}
|
|
</div>
|
|
|
|
<style>
|
|
.subnav {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 6px;
|
|
margin: -8px 0 4px;
|
|
}
|
|
|
|
button {
|
|
padding: 6px 11px;
|
|
border-radius: 999px;
|
|
font-size: 12px;
|
|
background: color-mix(in srgb, var(--fg) 6%, transparent);
|
|
border: 1px solid var(--line, color-mix(in srgb, var(--fg) 8%, transparent));
|
|
color: var(--fg);
|
|
cursor: pointer;
|
|
}
|
|
|
|
button.on {
|
|
background: var(--accent);
|
|
color: var(--on-accent);
|
|
border-color: transparent;
|
|
font-weight: 600;
|
|
}
|
|
</style>
|