mirror of
https://github.com/Astatin3/unshell.git
synced 2026-06-08 22:38:01 -06:00
Configurable Struct
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user