From 89884ae3a27d7149af020a3275924d313afba043 Mon Sep 17 00:00:00 2001 From: heyarne Date: Sun, 10 Mar 2019 12:49:23 +0100 Subject: [PATCH] Remove unused song view --- src/cljs/airsonic_ui/views/song.cljs | 34 ---------------------------- src/sass/app.sass | 12 ---------- 2 files changed, 46 deletions(-) delete mode 100644 src/cljs/airsonic_ui/views/song.cljs diff --git a/src/cljs/airsonic_ui/views/song.cljs b/src/cljs/airsonic_ui/views/song.cljs deleted file mode 100644 index 8942ca3..0000000 --- a/src/cljs/airsonic_ui/views/song.cljs +++ /dev/null @@ -1,34 +0,0 @@ -(ns airsonic-ui.views.song - (:require [re-frame.core :refer [subscribe]] - [airsonic-ui.helpers :refer [muted-dispatch format-duration]] - [airsonic-ui.routes :as routes :refer [url-for]] - [bulma.icon :refer [icon]])) - -(defn item [songs song idx] - (let [artist-id (:artistId song) - duration (:duration song)] - [:div - (if artist-id - [:a {:href (url-for ::routes/artist.detail {:id artist-id})} (:artist song)] - (:artist song)) - " - " - [:a - {:href "#" :on-click (muted-dispatch [:audio-player/play-all songs idx] :sync? true)} - (:title song)] - [:span.duration (format-duration duration)]])) - -(defn listing [songs] - (let [current-song @(subscribe [:audio/current-song])] - [:table.table.is-striped.is-hoverable.is-fullwidth.song-list>tbody - (for [[idx song] (map-indexed vector songs)] - (let [tag (if (= (:id song) (:id current-song)) :tr.song.is-playing :tr.song)] - ^{:key idx} [tag - [:td.grow [item songs song idx]] - [:td>a {:title "Play next" - :href "#" - :on-click (muted-dispatch [:audio-player/enqueue-next song])} - [icon :plus]] - [:td>a {:title "Play last" - :href "#" - :on-click (muted-dispatch [:audio-player/enqueue-last song])} - [icon :caret-right]]]))])) diff --git a/src/sass/app.sass b/src/sass/app.sass index 4732201..40a6204 100644 --- a/src/sass/app.sass +++ b/src/sass/app.sass @@ -218,18 +218,6 @@ .grow width: 100% -// duh -.song-list - .song - .duration - padding-left: .5rem - color: $grey-light - font-weight: normal - - &.is-playing - background-color: $light !important - font-weight: bold - // useful in general to pull elements closer together; bulma es very generous // with whitespace .section.is-small