Skip to content

Commit

Permalink
⬆️ Bump yuuka.
Browse files Browse the repository at this point in the history
  • Loading branch information
langyo committed Oct 9, 2024
1 parent 9887e54 commit 032a972
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ strum = { workspace = true }
uuid = { workspace = true }
log = { workspace = true }

yuuka = "^0.1"
yuuka = "^0.3"
13 changes: 6 additions & 7 deletions packages/types/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,30 @@ use anyhow::{anyhow, Result};
use once_cell::sync::Lazy;
use std::sync::{Arc, Mutex};

use yuuka::derive_config;
use yuuka::derive_struct;

use crate::consts::CONFIG_DIR;

derive_config!(Config {
portal: Portal {
derive_struct!(pub Config {
portal: {
title_suffix: String,
footer_banner: [FooterBannerItem {
footer_banner: [{
text: String,
url: Option<String>,
}],
language: String,
timezone: i32,
},
router: Router {
router: {
media_entry_path: String,
limit_referrer_host: Option<Vec<String>>,
},
upload: Upload {
upload: {
image_size_limit: String,
webp_auto_convert: bool,
use_source_file_name: bool,
}
});
pub use __Config::*;

pub static CONFIG: Lazy<Arc<Mutex<Config>>> = Lazy::new(|| {
let raw = std::fs::read_to_string(CONFIG_DIR.clone()).unwrap();
Expand Down

0 comments on commit 032a972

Please sign in to comment.