got obsidian plugin to build again
This commit is contained in:
@@ -2,7 +2,11 @@ use mize::{Mize, MizeResult, MizePart, MizePartCreate, mize_part};
|
||||
use wasm_bindgen::JsValue;
|
||||
use mize::error::IntoMizeResultJsValue;
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
use dioxus::prelude::*;
|
||||
use crate::ClientAuth;
|
||||
use wasm_bindgen::prelude::*;
|
||||
use serde::{Serialize, Deserialize};
|
||||
use mize::platform::js::JsMize;
|
||||
|
||||
|
||||
// console_log macro
|
||||
@@ -86,3 +90,43 @@ impl ObsidianPart {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub fn test_fn(mize: &mut JsMize) {
|
||||
let mize = mize.inner();
|
||||
console_log!("test fn...");
|
||||
|
||||
if let Err(e) = try_test_fn(mize) {
|
||||
console_log!("err: {:?}", e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
fn try_test_fn(mize: &mut Mize) -> MizeResult<()> {
|
||||
//let auth = mize.get_part_native::<ClientAuth>("client_auth")?;
|
||||
//console_log!("secrets: {:?}", auth.secrets());
|
||||
|
||||
let parts = mize.parts.lock().unwrap();
|
||||
for part in parts.keys() {
|
||||
console_log!("part: {}", part)
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub fn part_obsidian_init(mize: &mut JsMize, plugin: JsValue, app: JsValue) {
|
||||
let mut mize = mize.inner();
|
||||
if let Err(e) = obsidian_mize_main(&mut mize, plugin, app) {
|
||||
console_log!("Failed to start the obsidian mize part: {:?}", e);
|
||||
}
|
||||
}
|
||||
|
||||
fn obsidian_mize_main(mize: &mut Mize, plugin: JsValue, app: JsValue) -> MizeResult<()> {
|
||||
|
||||
crate::part_obsidian(mize, plugin, app)?;
|
||||
crate::part_client_auth(mize)?;
|
||||
crate::spacetime(mize)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user