mirror of
https://github.com/heyarne/airsonic-ui.git
synced 2026-05-06 18:33:38 +02:00
* Use rf instead of re-frame * Add bulma modal component * Add option to toggle a modal * Add rudimentary keyboard shortcuts; closes #41
12 lines
516 B
Clojure
12 lines
516 B
Clojure
(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]])]]])
|