add: post editing, profile pinned posts, theme settings
TODO: nsfw profile/community options
This commit is contained in:
parent
31f63c90cd
commit
f83cfa3756
10 changed files with 255 additions and 8 deletions
|
@ -62,6 +62,12 @@ pub struct UserSettings {
|
|||
pub theme_preference: ThemePreference,
|
||||
#[serde(default)]
|
||||
pub private_last_seen: bool,
|
||||
#[serde(default)]
|
||||
pub theme_hue: String,
|
||||
#[serde(default)]
|
||||
pub theme_sat: String,
|
||||
#[serde(default)]
|
||||
pub theme_lit: String,
|
||||
}
|
||||
|
||||
impl Default for UserSettings {
|
||||
|
@ -74,6 +80,9 @@ impl Default for UserSettings {
|
|||
private_communities: false,
|
||||
theme_preference: ThemePreference::default(),
|
||||
private_last_seen: false,
|
||||
theme_hue: String::new(),
|
||||
theme_sat: String::new(),
|
||||
theme_lit: String::new(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -167,6 +167,10 @@ pub struct PostContext {
|
|||
pub comments_enabled: bool,
|
||||
#[serde(default)]
|
||||
pub is_pinned: bool,
|
||||
#[serde(default)]
|
||||
pub is_profile_pinned: bool,
|
||||
#[serde(default)]
|
||||
pub edited: usize,
|
||||
}
|
||||
|
||||
fn default_comments_enabled() -> bool {
|
||||
|
@ -178,6 +182,8 @@ impl Default for PostContext {
|
|||
Self {
|
||||
comments_enabled: default_comments_enabled(),
|
||||
is_pinned: false,
|
||||
is_profile_pinned: false,
|
||||
edited: 0,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue