Skip to content

Commit

Permalink
Fixed issue with 'new app' buttons. Fixes #101
Browse files Browse the repository at this point in the history
  • Loading branch information
chr15m committed Aug 16, 2020
1 parent 2c59400 commit 579851b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions public/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,7 @@ button#add-app {
padding: 0.25em 0.75em;
border-radius: 5px;
margin: 0.25em;
cursor: pointer;
}

#add-menu ul li a {
Expand Down
12 changes: 6 additions & 6 deletions src/slingcode/main.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -1277,17 +1277,17 @@
(when (@state :add-menu)
[:div#add-menu {:on-mouse-leave (partial toggle-add-menu! state)}
[:ul
[:li [:a {:href "#"
:on-click (partial edit-app! app-data (str (random-uuid)) (make-boilerplate-files))}
"New app"]]
[:li {:on-click (partial edit-app! app-data (str (random-uuid)) (make-boilerplate-files))}
[:a {:href "#"}
"New app"]]
[:li [:input {:type "file"
:name "upload-zip"
:accept "application/zip"
:on-change (partial initiate-zip-upload! app-data)}]
[:label "Upload zip"]]
[:li [:a {:href "#"
:on-click (fn [ev] (.preventDefault ev) (swap! state assoc :mode :receive))}
"Receive app"]]]])
[:li {:on-click (fn [ev] (.preventDefault ev) (swap! state assoc :mode :receive))}
[:a {:href "#"}
"Receive app"]]]])

[:button#add-app {:on-click (partial toggle-add-menu! state)} (if (@state :add-menu) "x" "+")]])]))

Expand Down

0 comments on commit 579851b

Please sign in to comment.