From bf94695abeda0d7bb296ae4cd0f9a53782587d4a Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Mon, 7 Feb 2022 16:14:09 +0100 Subject: Update editor organisation --- editor/actions.ml | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) (limited to 'editor/actions.ml') diff --git a/editor/actions.ml b/editor/actions.ml index f7633e1..0f107f9 100755 --- a/editor/actions.ml +++ b/editor/actions.ml @@ -17,30 +17,24 @@ let populate_menu () = let delete_button = El.button ~at:At.[ class' (Jstr.v "action-button") ] - [ El.i - [] + [ El.i [] ~at:At.[ class' (Jstr.v "fa") ; class' (Jstr.v "fa-2x") - ; class' (Jstr.v "fa-trash") - ] ] + ; class' (Jstr.v "fa-trash") ] ] and home_button = El.button ~at:At.[ class' (Jstr.v "action-button") ] - [ El.i - [] + [ El.i [] ~at:At.[ class' (Jstr.v "fa") ; class' (Jstr.v "fa-2x") - ; class' (Jstr.v "fa-home") - ] ] + ; class' (Jstr.v "fa-home") ] ] and add_button = El.button ~at:At.[ class' (Jstr.v "action-button") ] - [ El.i - [] + [ El.i [] ~at:At.[ class' (Jstr.v "fa") ; class' (Jstr.v "fa-2x") - ; class' (Jstr.v "fa-plus") - ] ] + ; class' (Jstr.v "fa-plus") ] ] in @@ -49,19 +43,20 @@ let populate_menu () = Ev.click Evr.unit delete_button + and add_event = Evr.on_el Ev.click Evr.unit add_button in - let stored_pages = Storage.get_ids () in + let stored_pages = State.Storage.get_ids () in let pages = List.map stored_pages ~f:(fun id -> - let name_opt = (Storage.load (Some id))##.title in + let name_opt = (State.Storage.load (Some id))##.title in let name = Js.Opt.get name_opt (fun () -> id) in -- cgit v1.2.3