Update dependencies, add translation endpoint, and display a user message when logged in
This commit is contained in:
parent
6b043620b8
commit
348b0f24e9
19 changed files with 170 additions and 34 deletions
|
|
@ -8,3 +8,4 @@ edition = "2024"
|
|||
ron = "0.10"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
chrono = { version = "0.4", features = ["serde"] }
|
||||
strum = { version = "0.27", features = ["derive"] }
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
pub mod consts;
|
||||
pub mod ron_api;
|
||||
pub mod toast;
|
||||
pub mod utils;
|
||||
|
|
|
|||
|
|
@ -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
10
common/src/toast.rs
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
use strum::FromRepr;
|
||||
|
||||
#[derive(FromRepr)]
|
||||
pub enum Level {
|
||||
Success,
|
||||
Error,
|
||||
Info,
|
||||
Warning,
|
||||
Unknown,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue