UI to show modules
This commit is contained in:
@@ -60,14 +60,7 @@ pub fn init_modules() {
|
||||
}
|
||||
};
|
||||
|
||||
let state = lock_w!(crate::state::FDOLL);
|
||||
let mut state_guard = match state.module_handles.lock() {
|
||||
Ok(guard) => guard,
|
||||
Err(e) => {
|
||||
error!("Failed to lock module handles: {}", e);
|
||||
return;
|
||||
}
|
||||
};
|
||||
let mut state = lock_w!(crate::state::FDOLL);
|
||||
|
||||
for entry in entries {
|
||||
let entry = match entry {
|
||||
@@ -88,7 +81,8 @@ pub fn init_modules() {
|
||||
if script_path.exists() {
|
||||
match runtime::spawn_lua_runtime_from_path(&script_path) {
|
||||
Ok(handle) => {
|
||||
state_guard.push(handle);
|
||||
state.modules.metadatas.push(module_metadata.clone());
|
||||
state.modules.handles.lock().unwrap().push(handle);
|
||||
}
|
||||
Err(e) => {
|
||||
error!(
|
||||
|
||||
@@ -10,7 +10,9 @@ pub struct PresenceStatus {
|
||||
pub graphics_b64: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug)]
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export)]
|
||||
pub struct ModuleMetadata {
|
||||
pub name: String,
|
||||
pub version: String,
|
||||
|
||||
Reference in New Issue
Block a user