add: profiles ui, communities ui, posts ui

This commit is contained in:
trisua 2025-03-29 00:26:56 -04:00
parent 00abbc8fa2
commit eecf357325
36 changed files with 1460 additions and 147 deletions

View file

@ -45,6 +45,12 @@ impl Default for UserSettings {
}
}
impl Default for User {
fn default() -> Self {
Self::new("<unknown>".to_string(), String::new())
}
}
impl User {
/// Create a new [`User`].
pub fn new(username: String, password: String) -> Self {
@ -70,6 +76,15 @@ impl User {
}
}
/// Deleted user profile.
pub fn deleted() -> Self {
Self {
username: "<deleted>".to_string(),
id: 0,
..Default::default()
}
}
/// Create a new token
///
/// # Returns