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