Colour themes, synced across devices (beta)
ci / build (ubuntu-22.04) (push) Canceled after 0s
ci / build (windows-2025) (push) Canceled after 0s
ci / deny (push) Canceled after 0s

Seven themes (Spruce, Ocean, Violet, Rose, Crimson, Amber, Graphite) that
change only the brand colour, all AA in light and dark. "Same theme on all
my devices" saves the choice in the encrypted vault and adopts it after
unlocking and syncing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-27 00:23:42 +07:00
co-authored by Claude Opus 5.5
parent fb53b7d907
commit 10a9507aa2
4 changed files with 241 additions and 1 deletions
+22
View File
@@ -408,6 +408,26 @@ fn resolve_save(app: State<'_, App>, id: String, accept: bool) -> CmdResult<()>
Ok(())
}
/// The colour theme and appearance saved for all the account's devices (docs/02 "App settings").
#[derive(Serialize)]
struct ThemeView {
theme: Option<String>,
appearance: Option<String>,
}
#[tauri::command]
fn app_theme(app: State<'_, App>) -> CmdResult<ThemeView> {
let t = app.core.app_theme().map_err(err)?;
Ok(ThemeView { theme: t.theme, appearance: t.appearance })
}
#[tauri::command]
fn set_app_theme(app: State<'_, App>, theme: Option<String>, appearance: Option<String>) -> CmdResult<()> {
app.core.set_app_theme(theme, appearance).map_err(err)?;
app.sync.request_sync();
Ok(())
}
#[tauri::command]
fn pending_passkeys(app: State<'_, App>) -> Vec<PasskeyView> {
app.broker.pending_passkeys()
@@ -730,6 +750,8 @@ fn main() {
pending_saves,
pending_passkeys,
set_tags,
app_theme,
set_app_theme,
sign_in_providers,
resolve_passkey,
resolve_save,