add: user settings ui
This commit is contained in:
parent
e7e9b49195
commit
f3c2157dfc
24 changed files with 1015 additions and 187 deletions
|
@ -25,7 +25,7 @@ pub struct User {
|
|||
pub following_count: usize,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, Serialize, Deserialize)]
|
||||
pub struct UserSettings {
|
||||
#[serde(default)]
|
||||
pub display_name: String,
|
||||
|
|
|
@ -29,6 +29,7 @@ pub enum Error {
|
|||
AlreadyAuthenticated,
|
||||
DataTooLong(String),
|
||||
DataTooShort(String),
|
||||
UsernameInUse,
|
||||
Unknown,
|
||||
}
|
||||
|
||||
|
@ -46,6 +47,7 @@ impl ToString for Error {
|
|||
Self::AlreadyAuthenticated => "Already authenticated".to_string(),
|
||||
Self::DataTooLong(name) => format!("Given {name} is too long!"),
|
||||
Self::DataTooShort(name) => format!("Given {name} is too short!"),
|
||||
Self::UsernameInUse => "Username in use".to_string(),
|
||||
_ => format!("An unknown error as occurred: ({:?})", self),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue