feat: Write built in themes to the themes file on first run so users can define custom themes

This commit is contained in:
2025-03-06 17:44:52 -07:00
parent 709f6ca6ca
commit df38ea5413
25 changed files with 758 additions and 74 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ use tokio_util::sync::CancellationToken;
use crate::app::{log_and_print_error, App, AppConfig};
use crate::cli::{self, Command};
use crate::network::Network;
use crate::ui::theme::ThemeDefinition;
use crate::ui::theme::ThemeDefinitionsWrapper;
#[cfg(test)]
#[path = "utils_tests.rs"]
@@ -154,7 +154,7 @@ pub(super) fn load_config(path: &str) -> Result<AppConfig> {
}
}
pub(super) fn load_theme_config(path: &str) -> Result<Vec<ThemeDefinition>> {
pub(super) fn load_theme_config(path: &str) -> Result<ThemeDefinitionsWrapper> {
match File::open(path).map_err(|e| anyhow!(e)) {
Ok(file) => {
let reader = BufReader::new(file);