removed old drawer stuff

This commit is contained in:
nvrl committed 2026-06-16 23:31:35 +02:00
1 parent e714e1ea51
commit 5ff5da2aac
8 files changed
+2 -102

No files matched your search

-1
View File
@@ -109,7 +109,6 @@ pub struct UserOut {
pub email: String,
pub theme: String,
pub language: String,
pub drawer_anchor: String,
pub avatar: Option<String>,
pub following_count: i64,
pub followers_count: i64,
-1
View File
@@ -25,7 +25,6 @@ pub struct Model {
pub avatar: Option<String>,
pub language: String,
pub selected_banner_id: Option<i32>,
pub drawer_anchor: String,
/// Dedicated account-deletion confirmation code + its expiry. Kept separate
/// from `email_confirmation_code` so other code-driven flows (email confirm,
/// password reset) can never clobber an in-flight deletion code, and
-9
View File
@@ -63,7 +63,6 @@ const THEMES: &[&str] = &[
"t0p_clancy",
];
const LANGUAGES: &[&str] = &["en", "de"];
const DRAWER_ANCHORS: &[&str] = &["left", "right"];
pub fn router() -> Router<AppState> {
Router::new()
@@ -434,12 +433,6 @@ async fn update_preferences(
updated = true;
}
}
if let Some(da) = data.get("drawer_anchor").and_then(|v| v.as_str()) {
if DRAWER_ANCHORS.contains(&da) {
active.drawer_anchor = Set(da.to_string());
updated = true;
}
}
// selected_banner: present + non-null. "" clears; otherwise must be enabled.
match data.get("selected_banner") {
@@ -489,7 +482,6 @@ async fn update_preferences(
"status": "preferences updated",
"theme": saved.theme,
"language": saved.language,
"drawer_anchor": saved.drawer_anchor,
"selected_banner": saved.selected_banner_id,
})))
}
@@ -763,7 +755,6 @@ async fn signup(
avatar: Set(None),
language: Set("en".into()),
selected_banner_id: Set(None),
drawer_anchor: Set("right".into()),
..Default::default()
}
.insert(&state.db)
-1
View File
@@ -758,7 +758,6 @@ pub async fn build_users(
email: u.email,
theme: u.theme,
language: u.language,
drawer_anchor: u.drawer_anchor,
})
.collect())
}