Compare commits
1 Commits
a9aa0ad736
...
v1.0.9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
90974d064e |
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "ostiary"
|
||||
version = "1.0.8"
|
||||
version = "1.0.9"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
|
||||
@@ -61,10 +61,22 @@ impl Config {
|
||||
server_url: server_url.to_string(),
|
||||
timeout_sec: 10,
|
||||
theme: default_theme(),
|
||||
update_api: None,
|
||||
update_api: Some("https://git.vainend.com/api/v1/repos/admin/ostiary".to_string()),
|
||||
};
|
||||
let contents = format!(
|
||||
r#"server_url = "{}"
|
||||
timeout_sec = {}
|
||||
update_api = "https://git.vainend.com/api/v1/repos/admin/ostiary"
|
||||
|
||||
[theme]
|
||||
selected_bg = "{}"
|
||||
"#,
|
||||
config.server_url,
|
||||
config.timeout_sec,
|
||||
config.theme.selected_bg,
|
||||
);
|
||||
fs::create_dir_all(path.parent().unwrap())?;
|
||||
fs::write(&path, toml::to_string_pretty(&config)?)?;
|
||||
fs::write(&path, contents)?;
|
||||
Ok(config)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user