fix init.ml

This commit is contained in:
cqc
2024-02-17 14:52:01 -06:00
parent 08fd2c2362
commit d24d28e046

View File

@ -35,6 +35,9 @@ let headers_of_string_list (sl : string list) : Httpaf.Headers.t =
(String.index_opt s ':')) (String.index_opt s ':'))
sl) sl)
let appendchild ~container html =
Dom.appendChild container (Tyxml_js.To_dom.of_a html)
let setup_workspace ~container cstore : unit Lwt.t = let setup_workspace ~container cstore : unit Lwt.t =
let render ~container cstore : unit Lwt.t = let render ~container cstore : unit Lwt.t =
let module Headers = Httpaf.Headers in let module Headers = Httpaf.Headers in
@ -55,8 +58,7 @@ let setup_workspace ~container cstore : unit Lwt.t =
~some:(fun s -> s) ~some:(fun s -> s)
(Headers.get headers "path")) (Headers.get headers "path"))
in in
Dom.appendChild container appendchild ~container
(Tyxml_js.To_dom.of_a
Tyxml_js.Html.( Tyxml_js.Html.(
a a
~a:[ a_class [ "window" ] ] ~a:[ a_class [ "window" ] ]
@ -65,13 +67,12 @@ let setup_workspace ~container cstore : unit Lwt.t =
~a:[ a_class [ "status" ] ] ~a:[ a_class [ "status" ] ]
[ [
txt txt
(F.str "Name: %s; Path: %a" step Uri.pp_hum (F.str "Name: %s; Path: %a" step Uri.pp_hum uri);
uri);
]; ];
div div
~a:[ a_class [ "output" ] ] ~a:[ a_class [ "output" ] ]
[ txt (F.str "%s" contents) ]; [ txt (F.str "%s" contents) ];
])); ]);
Lwt.return_unit) Lwt.return_unit)
csl csl
in in