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.
43 lines
751 B
Svelte
43 lines
751 B
Svelte
<script lang="ts">
|
|
let { value = $bindable(), ariaLabel }: { value: boolean; ariaLabel?: string } = $props();
|
|
</script>
|
|
|
|
<button
|
|
type="button"
|
|
class="switch"
|
|
class:on={value}
|
|
role="switch"
|
|
aria-checked={value}
|
|
aria-label={ariaLabel}
|
|
onclick={() => (value = !value)}
|
|
>
|
|
<span class="knob"></span>
|
|
</button>
|
|
|
|
<style>
|
|
.switch {
|
|
width: 40px;
|
|
height: 22px;
|
|
flex-shrink: 0;
|
|
border-radius: 999px;
|
|
border: none;
|
|
background-color: var(--overlay);
|
|
padding: 2px;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.switch.on {
|
|
background-color: var(--accent);
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
.knob {
|
|
width: 18px;
|
|
height: 18px;
|
|
border-radius: 50%;
|
|
background-color: var(--on-surface);
|
|
display: block;
|
|
}
|
|
</style>
|