diff --git a/packages/types/Cargo.toml b/packages/types/Cargo.toml index 728ba08..a2fb768 100644 --- a/packages/types/Cargo.toml +++ b/packages/types/Cargo.toml @@ -21,4 +21,4 @@ strum = { workspace = true } uuid = { workspace = true } log = { workspace = true } -yuuka = "^0.1" +yuuka = "^0.3" diff --git a/packages/types/src/config.rs b/packages/types/src/config.rs index 717a638..6918497 100644 --- a/packages/types/src/config.rs +++ b/packages/types/src/config.rs @@ -7,26 +7,25 @@ use yuuka::derive_config; use crate::consts::CONFIG_DIR; derive_config!(Config { - portal: Portal { + portal: { title_suffix: String, - footer_banner: [FooterBannerItem { + footer_banner: [{ text: String, url: Option, }], language: String, timezone: i32, }, - router: Router { + router: { media_entry_path: String, limit_referrer_host: Option>, }, - upload: Upload { + upload: { image_size_limit: String, webp_auto_convert: bool, use_source_file_name: bool, } }); -pub use __Config::*; pub static CONFIG: Lazy>> = Lazy::new(|| { let raw = std::fs::read_to_string(CONFIG_DIR.clone()).unwrap();