diff --git a/resources/cider-ui/style.less b/resources/cider-ui/style.less index cd9b7d7c..4cee9a15 100644 --- a/resources/cider-ui/style.less +++ b/resources/cider-ui/style.less @@ -1861,6 +1861,34 @@ input[type="range"].web-slider.display--small::-webkit-slider-thumb { } } +/* queue item */ +.cd-queue-item { + border-bottom: 1px solid rgb(200 200 200 / 10%); + padding: 8px; + .row, .col { + padding:0px; + margin:0px; + } + .artwork { + width: 32px; + height: 32px; + flex: 0 0 auto; + } + + .queue-info { + display:flex; + flex-direction: column; + + .queue-title { + font-size: 14px; + } + .queue-subtitle { + font-size: 13px; + opacity: 0.85; + } + } +} + /* horizontal media scroller */ .cd-hmedia-scroller { margin: 0 auto; @@ -2087,18 +2115,7 @@ input[type="range"].web-slider.display--small::-webkit-slider-thumb { } } -.artwork { - height: 190px; - width: 190px; - background: blue; - border-top-left-radius: 6px; - border-top-right-radius: 6px; - background: var(--artwork); - background-size: cover; - flex: 0 0 auto; - margin: 6px; - margin-top: 0px; -} + /* mediaitem-square-large */ .cd-mediaitem-square-large { diff --git a/resources/cider-ui/views/components/queue-item.ejs b/resources/cider-ui/views/components/queue-item.ejs index e69de29b..83205de8 100644 --- a/resources/cider-ui/views/components/queue-item.ejs +++ b/resources/cider-ui/views/components/queue-item.ejs @@ -0,0 +1,60 @@ + + + \ No newline at end of file diff --git a/resources/cider-ui/views/components/queue.ejs b/resources/cider-ui/views/components/queue.ejs index a23b9563..7d1a8019 100644 --- a/resources/cider-ui/views/components/queue.ejs +++ b/resources/cider-ui/views/components/queue.ejs @@ -2,10 +2,22 @@

Queue

-
- ▶️ - {{ queueItem.item.attributes.name }} -
+
@@ -22,9 +34,38 @@ } }, methods: { + queueContext(event, item, position) { + let self = this + CiderContextMenu.Create(event, { + items: [{ + "name": "Remove from queue", + "action": function () { + self.queueItems.splice(position, 1) + app.mk.queue._queueItems = self.queueItems; + app.mk.queue._reindex() + } + }, + { + "name": "Start Radio", + "action": function () { + app.mk.setStationQueue({ + song: item.attributes.playParams.id ?? item.id + }).then(() => { + app.mk.play() + }) + } + }, + ] + }); + }, updateQueue() { - this.queuePosition = app.mk.queue.position; - this.queueItems = app.mk.queue._queueItems; + if (app.mk.queue) { + this.queuePosition = app.mk.queue.position; + this.queueItems = app.mk.queue._queueItems; + } else { + this.queuePosition = 0; + this.queueItems = []; + } }, move() { app.mk.queue._queueItems = this.queueItems; diff --git a/resources/cider-ui/views/main.ejs b/resources/cider-ui/views/main.ejs index 2a603871..9c5379c1 100644 --- a/resources/cider-ui/views/main.ejs +++ b/resources/cider-ui/views/main.ejs @@ -462,6 +462,8 @@ <%- include('components/queue') %> + +<%- include('components/queue-item') %> <%- include('components/mediaitem-scroller-horizontal') %> diff --git a/resources/cider-ui/views/pages/zoo.ejs b/resources/cider-ui/views/pages/zoo.ejs index 43db1ea1..55090b4a 100644 --- a/resources/cider-ui/views/pages/zoo.ejs +++ b/resources/cider-ui/views/pages/zoo.ejs @@ -1,20 +1,6 @@