diff options
author | Sébastien Dailly <sebastien@dailly.me> | 2022-02-07 16:14:09 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@dailly.me> | 2022-02-07 16:43:33 +0100 |
commit | bf94695abeda0d7bb296ae4cd0f9a53782587d4a (patch) | |
tree | 06dac432cfaa57dc6ad428b116332fdf777c84d8 /editor/actions.ml | |
parent | 4d35508a76676a548ac45e0bff2d63eafaf014e2 (diff) |
Update editor organisation
Diffstat (limited to 'editor/actions.ml')
-rwxr-xr-x | editor/actions.ml | 23 |
1 files changed, 9 insertions, 14 deletions
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 |