#[cfg(not(target_arch = "wasm32"))]
use crate::terminal;
use crate::CodeTheme;
use std::collections::VecDeque;
#[derive(serde::Serialize, serde::Deserialize, Debug, Clone)]
#[serde(default)]
pub struct Config {
#[cfg(not(target_arch = "wasm32"))]
pub recent_projects: VecDeque<String>,
#[cfg(target_arch = "wasm32")]
pub recent_projects: VecDeque<(String, String)>,
#[cfg(not(target_arch = "wasm32"))]
pub terminal: terminal::Config,
pub theme: CodeTheme,
#[cfg(not(target_arch = "wasm32"))]
pub rtp_paths: indexmap::IndexMap<String, String>,
}
impl Default for Config {
fn default() -> Self {
Self::new()
}
}
impl Config {
pub fn new() -> Self {
Self {
recent_projects: VecDeque::new(),
theme: CodeTheme::dark(),
#[cfg(not(target_arch = "wasm32"))]
rtp_paths: indexmap::IndexMap::new(),
#[cfg(not(target_arch = "wasm32"))]
terminal: terminal::Config::default(),
}
}
}