use crate::{ types::{Config, DatabasePath}, ui::Field, }; use serde::{Deserialize, Serialize}; #[derive(Clone, Debug, Serialize, Deserialize)] pub struct ConfigurationView { pub library: Field<()>, } pub fn configuration(config: &Config) -> ConfigurationView { let path: Option = config.get(); ConfigurationView { library: Field { id: "library-path-field".to_owned(), label: "Library".to_owned(), value: path.map(|path| path.to_string_lossy().into_owned()), action: (), }, } }