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
75
frontend/src/lib/components/Titlebar.svelte
Normal file
75
frontend/src/lib/components/Titlebar.svelte
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
<script lang="ts">
|
||||
import { getCurrentWindow } from "@tauri-apps/api/window";
|
||||
|
||||
function win() {
|
||||
return getCurrentWindow();
|
||||
}
|
||||
|
||||
function close() {
|
||||
win().close();
|
||||
}
|
||||
function minimize() {
|
||||
win().minimize();
|
||||
}
|
||||
function toggleMax() {
|
||||
win().toggleMaximize();
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="titlebar" data-tauri-drag-region>
|
||||
<div class="dots">
|
||||
<button class="dot close" aria-label="Close" onclick={close}></button>
|
||||
<button class="dot min" aria-label="Minimize" onclick={minimize}></button>
|
||||
<button class="dot max" aria-label="Maximize" onclick={toggleMax}></button>
|
||||
</div>
|
||||
<div class="name">Settings</div>
|
||||
<div class="grow"></div>
|
||||
<span class="kbd">Ctrl K</span>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.titlebar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
height: 40px;
|
||||
padding: 0 14px;
|
||||
background: var(--bg-2, var(--bg));
|
||||
border-bottom: 1px solid var(--line, color-mix(in srgb, var(--fg) 8%, transparent));
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.dots {
|
||||
display: flex;
|
||||
gap: 7px;
|
||||
}
|
||||
|
||||
.dot {
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
border-radius: 50%;
|
||||
border: none;
|
||||
padding: 0;
|
||||
background: #2a313c;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.dot.close:hover {
|
||||
background: var(--red);
|
||||
}
|
||||
.dot.min:hover,
|
||||
.dot.max:hover {
|
||||
background: var(--accent);
|
||||
}
|
||||
|
||||
.name {
|
||||
font-size: 12px;
|
||||
color: var(--muted, color-mix(in oklab, var(--fg) 58%, transparent));
|
||||
letter-spacing: 0.02em;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.grow {
|
||||
flex: 1;
|
||||
}
|
||||
</style>
|
||||
Loading…
Add table
Add a link
Reference in a new issue