Harden settings: split breadcrumbs secrets, typed exec, new panels

Load and save Wi-Fi networks in networks.toml (0600) instead of writing
PSKs back into breadcrumbs.toml. The password field is write-only.

Replace the generic argv runner with typed bakery/pacman/fwupd commands
and set a real Tauri CSP. Add Lock, Screenshots, Monitors, and Help
panels. Pin bread-theme and bread-utils to bread-ecosystem v0.7.1.
bread-screenshots is not on that tag, so --screenshot calls grim
locally. bakery.toml lists webkitgtk-4.1 deps; README/CLAUDE.md match
Tauri 2 + Svelte 5 and single-trunk main.
This commit is contained in:
Breadway 2026-08-15 21:47:00 +08:00
parent abfb4fd4a4
commit cbac50683e
30 changed files with 1469 additions and 147 deletions

View file

@ -1,14 +1,14 @@
// Frontend half of the event-streaming command pattern (see
// src-tauri/src/commands/streaming.rs) — runs a command, appends each
// stdout/stderr line to a reactive log as it arrives, and resolves once the
// process exits with whether it succeeded.
// src/src/commands/streaming.rs) — listens for `cmd-output` lines from a
// typed Tauri command that runs a hardcoded program, then resolves once
// the process exits.
import { invoke } from "@tauri-apps/api/core";
import { listen } from "@tauri-apps/api/event";
export async function runStreamingCommand(
program: string,
args: string[],
export async function runStreamed(
command: string,
args: Record<string, unknown>,
onLine: (line: string) => void,
): Promise<boolean> {
const sessionId = crypto.randomUUID();
@ -18,7 +18,7 @@ export async function runStreamingCommand(
});
try {
return await invoke<boolean>("run_streaming_command", { sessionId, program, args });
return await invoke<boolean>(command, { sessionId, ...args });
} finally {
unlisten();
}