fix init.ml
This commit is contained in:
@ -112,3 +112,22 @@ let setup_workspace ~container cstore : unit Lwt.t =
|
||||
csl
|
||||
in
|
||||
cstore >>= render ~container
|
||||
|
||||
let _ =
|
||||
Lwt.async (fun () ->
|
||||
let container = by_id "toplevel-container" in
|
||||
let textbox : 'a Js.t =
|
||||
by_id_coerce "userinput" Dom_html.CoerceTo.textarea
|
||||
in
|
||||
let rootstore = Store.test_pull () in
|
||||
rootstore >>= fun rs ->
|
||||
let workspace_store =
|
||||
Store.S.Tree.find_tree rs [ ".config"; "workspace" ]
|
||||
>>= function
|
||||
| Some t -> Lwt.return t
|
||||
| None -> Lwt.return (Store.S.Tree.empty ())
|
||||
in
|
||||
setup_storeview ~storeview:rootstore ~container ~textbox;
|
||||
Lwt.return
|
||||
(Lwt.async (fun () ->
|
||||
setup_workspace ~container workspace_store)))
|
||||
|
||||
Reference in New Issue
Block a user