use tauri::Theme; pub(crate) fn desktop_platform() -> &'static str { if cfg!(target_os = "macos") { "macos" } else if cfg!(target_os = "windows") { "windows" } else if cfg!(target_os = "linux") { "linux" } else { "unknown" } } pub(crate) fn color_scheme_from_theme(theme: Theme) -> &'static str { match theme { Theme::Light => "light", Theme::Dark => "dark", _ => "unknown", } } #[cfg(test)] mod tests { use super::*; #[test] fn color_scheme_maps_window_theme() { assert_eq!(color_scheme_from_theme(Theme::Light), "light"); assert_eq!(color_scheme_from_theme(Theme::Dark), "dark"); } }