Update dependencies, add translation endpoint, and display a user message when logged in

This commit is contained in:
Greg Burri 2025-05-05 01:59:30 +02:00
parent 6b043620b8
commit 348b0f24e9
19 changed files with 170 additions and 34 deletions

View file

@ -1,2 +1,5 @@
pub const MIN_PASSWORD_SIZE: usize = 8;
pub const COOKIE_DARK_THEME: &str = "dark_theme";
pub const GET_PARAMETER_USER_MESSAGE: &str = "user_message";
pub const GET_PARAMETER_USER_MESSAGE_LEVEL: &str = "user_message_icon";

View file

@ -1,3 +1,4 @@
pub mod consts;
pub mod ron_api;
pub mod toast;
pub mod utils;

View file

@ -19,9 +19,15 @@ pub struct Id {
pub id: i64,
}
// A value associated with an id.
// A simple value.
#[derive(Serialize, Deserialize, Clone)]
pub struct Value<T> {
pub value: T,
}
// A value associated with an id.
#[derive(Serialize, Deserialize, Clone)]
pub struct KeyValue<T> {
pub id: i64,
pub value: T,
}

10
common/src/toast.rs Normal file
View file

@ -0,0 +1,10 @@
use strum::FromRepr;
#[derive(FromRepr)]
pub enum Level {
Success,
Error,
Info,
Warning,
Unknown,
}