1
0
Fork 0
mirror of https://github.com/heyarne/airsonic-ui.git synced 2026-05-07 02:33:39 +02:00

Add keyboard shortcuts (#43)

* Use rf instead of re-frame

* Add bulma modal component

* Add option to toggle a modal

* Add rudimentary keyboard shortcuts; closes #41
This commit is contained in:
Arne Schlüter 2019-01-30 18:35:08 +01:00 committed by GitHub
commit 149fd07566
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 291 additions and 101 deletions

View file

@ -1,6 +1,6 @@
(ns airsonic-ui.core
(:require [reagent.core :as reagent]
[re-frame.core :as re-frame]
[re-frame.core :as rf]
;; 3rd party effects / coeffects
[day8.re-frame.http-fx]
[akiroz.re-frame.storage :as storage]
@ -11,6 +11,7 @@
[airsonic-ui.api.events]
[airsonic-ui.api.subs]
[airsonic-ui.components.audio-player.events]
[airsonic-ui.components.keyboard-shortcuts.events :as keyboard]
[airsonic-ui.components.library.subs]
[airsonic-ui.components.search.events]
[airsonic-ui.components.search.subs]
@ -24,12 +25,12 @@
(println "dev mode")))
(defn mount-root []
(re-frame/clear-subscription-cache!)
(rf/clear-subscription-cache!)
(reagent/render [views/main-panel] (.getElementById js/document "app")))
(defn ^:export init []
(storage/reg-co-fx! :airsonic-ui {:fx :store
:cofx :store})
(re-frame/dispatch-sync [::events/initialize-app])
(storage/reg-co-fx! :airsonic-ui {:fx :store, :cofx :store})
(rf/dispatch-sync [::events/initialize-app])
(rf/dispatch [::keyboard/init-shortcuts])
(dev-setup)
(mount-root))