theme: obsidian-prism

This commit is contained in:
Per Stark
2026-01-17 08:45:47 +01:00
parent fa7f407306
commit a9fda67209
4 changed files with 169 additions and 2 deletions

View File

@@ -124,7 +124,11 @@ where
if let Some(auth) = req.extensions().get::<AuthSessionType>() {
if let Some(user) = &auth.current_user {
let theme = user.theme.as_str();
let initial = if theme == "dark" { "dark" } else { "light" };
// For explicit themes (not "system"), use the theme directly as initial_theme
let initial = match theme {
"system" => "light",
other => other, // "light", "dark", "obsidian-prism", etc.
};
(theme.to_string(), initial.to_string(), true)
} else {
("system".to_string(), "light".to_string(), false)

View File

@@ -32,6 +32,7 @@ pub async fn show_account_page(
let theme_options = vec![
"light".to_string(),
"dark".to_string(),
"obsidian-prism".to_string(),
"system".to_string(),
];
let conversation_archive = User::get_user_conversations(&user.id, &state.db).await?;
@@ -156,6 +157,7 @@ pub async fn update_theme(
let theme_options = vec![
"light".to_string(),
"dark".to_string(),
"obsidian-prism".to_string(),
"system".to_string(),
];