Migrate bos-settings from GTK4 to Tauri + Svelte 5

Ports every remaining view (Keybinds, the last one — dual Flat/MultiLayout
schema detection, per-action dedicated fields with a raw-JSON fallback for
anything not modeled) and removes the now-fully-dead GTK4 crate (root
Cargo.toml + src/), leaving src-tauri/ as the single Rust binary crate.

Also folds in the UX pass done alongside the migration: responsive
multi-column layout instead of a single centered column, chip/dropdown
pickers replacing free-typed fields (Wi-Fi networks, Bar style, keyboard
layout, tag lists), consistent pill-switch toggles and boxed-list card
styling across every page, and a sidebar scroll-chaining fix.
This commit is contained in:
Breadway 2026-07-22 19:23:02 +08:00
parent 62365ebf10
commit 93c3b88b10
147 changed files with 15804 additions and 7516 deletions

View file

@ -0,0 +1,5 @@
// Tauri doesn't have a Node.js server to do proper SSR
// so we use adapter-static with a fallback to index.html to put the site in SPA mode
// See: https://svelte.dev/docs/kit/single-page-apps
// See: https://v2.tauri.app/start/frontend/sveltekit/ for more info
export const ssr = false;

View file

@ -0,0 +1,61 @@
<script lang="ts">
import { onMount } from "svelte";
import Sidebar from "$lib/components/Sidebar.svelte";
import Placeholder from "$lib/components/Placeholder.svelte";
import { DEFAULT_PAGE } from "$lib/sidebar";
import { initTheme } from "$lib/theme";
import { VIEWS } from "$lib/views/registry";
let activePage = $state(DEFAULT_PAGE);
let ActiveView = $derived(VIEWS[activePage]);
onMount(() => {
initTheme();
});
</script>
<div class="shell">
<Sidebar bind:activePage />
<main class="content">
{#if ActiveView}
<ActiveView />
{:else}
<Placeholder page={activePage} />
{/if}
</main>
</div>
<style>
:global(*) {
box-sizing: border-box;
}
:global(html, body) {
margin: 0;
border: none;
outline: none;
height: 100%;
color-scheme: dark;
background-color: var(--bg, #0c0c0c);
color: var(--fg);
font-family: var(--font-family, sans-serif);
font-size: var(--font-size-base, 14px);
}
:global(#svelte) {
height: 100%;
}
.shell {
display: flex;
height: 100vh;
background-color: var(--bg, #0c0c0c);
}
.content {
flex: 1;
min-width: 0;
overflow-y: auto;
overscroll-behavior: contain;
}
</style>