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:
parent
a75cdca9e1
commit
149fd07566
17 changed files with 291 additions and 101 deletions
|
|
@ -0,0 +1,12 @@
|
|||
(ns airsonic-ui.components.keyboard-shortcuts.views
|
||||
(:require [bulma.modal.views :as bulma]
|
||||
[airsonic-ui.components.keyboard-shortcuts.config :as config]))
|
||||
|
||||
(defn help-modal []
|
||||
[bulma/modal-card {:title "Keyboard Shortcuts"
|
||||
:modal-id :keyboard-shortcuts-help}
|
||||
[:table.table.is-hoverable.is-fullwidth
|
||||
[:thead [:tr [:th "Key"] [:th "Function"]]]
|
||||
[:tbody
|
||||
(for [[idx [k desc]] (map-indexed vector config/keymap)]
|
||||
^{:key idx} [:tr [:td>code k] [:td desc]])]]])
|
||||
Loading…
Add table
Add a link
Reference in a new issue