Reworked admin
Build and Publish / Build and Publish Docker Image (push) Successful in 3m11s

This commit is contained in:
2026-05-26 00:19:11 +03:00
parent a3a3f5368d
commit aafb364eb8
11 changed files with 4192 additions and 31 deletions
-17
View File
@@ -211,23 +211,6 @@ pub async fn debug_handler(
Ok(Html::new(template.render()?))
}
#[derive(Debug, Template)]
#[template(path = "admin/index.html")]
struct AdminIndexTemplate {
t: &'static Translations,
user_name: String,
user_role: String,
}
pub async fn admin_index(admin: AuthenticatedUser, i18n: I18n) -> cot::Result<Html> {
let template = AdminIndexTemplate {
t: i18n.t,
user_name: admin.name,
user_role: admin.role.code().to_owned(),
};
Ok(Html::new(template.render()?))
}
// ---------------------------------------------------------------------------
// Settings page
// ---------------------------------------------------------------------------