Skip to content

Commit 2e50311

Browse files
authored
Merge pull request #29 from sertschgi/dev
added some extra description
2 parents 1a3bdae + 881c943 commit 2e50311

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

packages/frontend/src/modules/pages/editor.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const CREATE_VIEWPORT: &str = r#"
1111
// -> add something like simple_ai_backend :: onnx :: Project . train()
1212
// - BUT FIRST: add a save button and
1313
// -> js getNodesFunction
14-
// -> convert to Node of backend
14+
// -> convert to Node of backend (serde json)
1515
// -> add something like simple_ai_backend :: onnx :: Project . save_nodes(Vec<Nodes>)
1616
#[page]
1717
pub fn Editor() -> Element {
@@ -21,11 +21,19 @@ pub fn Editor() -> Element {
2121
sleep(Duration::from_millis(100)).await;
2222
let mut viewport_listener = document::eval(CREATE_VIEWPORT);
2323
// loop {
24-
// let id: i32 = viewport_listener.recv().await.unwrap();
25-
// debug!("id {id}");
24+
// TODO: also convert the string to a rust new Event enum
25+
// - the event types of the enum are AddNode and CheckConnection
26+
// - the backend will need something like simple_ai_backend :: onnx ::
27+
// check_connection (param1, param2)
28+
//
29+
// let event: String = viewport_listener.recv().await.unwrap();
30+
//
31+
//
2632
// TODO: simple_ai_backend :: onnx :: fetch_node_from_id(id) -> Node;
2733
// - Then make a function that converts the Node to the js one;
2834
// - Lastly document::eval(format!(r#"window.activeOnnxViewport.addNode({})"#, node));
35+
//
36+
// TODO: If something failes make a notification.
2937
// }
3038
},
3139
section { id: "viewport" }

0 commit comments

Comments
 (0)