Configurable Struct

This commit is contained in:
Michael Mikovsky
2025-12-21 12:04:53 -07:00
parent c7d66c5560
commit 78fda07ab2
11 changed files with 160 additions and 98 deletions
+4 -2
View File
@@ -67,7 +67,8 @@ impl Config {
state_lock.trees = Some(response);
state_lock.is_requesting = false;
drop(state_lock);
});
})
.unwrap();
} else if tree_list_none && is_requesting {
ui.spinner();
}
@@ -92,7 +93,8 @@ impl Config {
state_lock.tree_keys = Some(response.unwrap());
state_lock.is_requesting = false;
},
);
)
.unwrap();
} else if key_list_none && is_requesting {
ui.spinner();
}
+13 -1
View File
@@ -89,11 +89,23 @@ impl InterfaceWindow {
let mut state_lock = state_clone.lock().unwrap();
let mut branch = (state_lock.branch).as_mut().unwrap();
let branch = (state_lock.branch).as_mut().unwrap();
let clear = match branch {
TreeMessage::InterfaceAndValue(interface_struct, interface_data) => {
render_interface::render(ui, interface_struct, interface_data);
if ui.button("Save").clicked() {
auth.post(
&format!("/api/interface{}", self.path.display()),
&TreeMessage::State(interface_data.clone()),
move |response: Result<TreeMessage>| {
crate::log(&format!("{response:?}"));
},
)
.unwrap();
}
false
}
TreeMessage::Folder(items) => {