File tree Expand file tree Collapse file tree
packages/frontend/src/modules/pages Expand file tree Collapse file tree Original file line number Diff line number Diff 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]
1717pub 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" }
You can’t perform that action at this time.
0 commit comments