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

Move all source files to src folder

This commit is contained in:
Arne Schlüter 2018-05-28 13:24:15 +02:00
commit 47c37e198c
20 changed files with 24 additions and 9 deletions

View file

@ -1,23 +0,0 @@
(ns airsonic-ui.views.song
(:require [re-frame.core :refer [dispatch]]
[airsonic-ui.events :as events]
[airsonic-ui.routes :as routes :refer [url-for]]))
(defn item [songs song]
(let [artist-id (:artistId song)]
[:div
[:a
(when artist-id {:href (url-for ::routes/artist-view {:id artist-id})})
(:artist song)]
" - "
[:a
{:href "#" :on-click (fn [e]
(.preventDefault e)
(dispatch [::events/play-songs songs song]))}
(:title song)]]))
;; FIXME: This is very similar to album-listing
(defn listing [songs]
[:ul (for [[idx song] (map-indexed vector songs)]
[:li {:key idx} [item songs song]])])