add pinned links to client config

This commit is contained in:
naskya 2024-06-20 08:25:38 +09:00
parent c734380cfe
commit 43245624b1
Signed by: naskya
GPG key ID: 712D413B3A9FED5C

View file

@ -22,6 +22,14 @@ pub struct Config {
background_image: Option<String>, background_image: Option<String>,
#[validate(custom(function = "is_color_code"))] #[validate(custom(function = "is_color_code"))]
theme_color: Option<String>, theme_color: Option<String>,
pinned_links: Vec<WebSite>,
}
#[derive(Deserialize, Serialize, Validate, Debug)]
pub struct WebSite {
name: String,
#[validate(url)]
url: String,
} }
fn is_color_code(color_code: &str) -> Result<(), ValidationError> { fn is_color_code(color_code: &str) -> Result<(), ValidationError> {