aboutsummaryrefslogtreecommitdiff
path: root/editor/actions.ml
diff options
context:
space:
mode:
Diffstat (limited to 'editor/actions.ml')
-rwxr-xr-xeditor/actions.ml23
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