Add #109
authorRemixDev <deezloaderremix@gmail.com>
Fri, 1 Mar 2019 17:02:28 +0000 (18:02 +0100)
committerRemixDev <deezloaderremix@gmail.com>
Fri, 1 Mar 2019 17:02:28 +0000 (18:02 +0100)
app/public/index.html
app/public/js/frontend.js

index 695ca0fc3c927f0c385cbdd7f7ecabc3a2e1c735..8683d1f5d4d237ed062d1716a28cb262e1d55b43 100644 (file)
        <div class="modal-content">
     <div class="trackList-header" v-bind:style="{ 'background-image': `linear-gradient(to bottom, transparent 0%, var(--main-modal-background) 100%), url('${image}')` }">
       <h4>{{ title }}</h4>
-      <h6 v-if="metadata">{{ metadata }}</h6>
+      <h6 v-if="metadata" style="display: inline;">{{ metadata }}</h6>
+      <span class="right" v-if="release_date"> {{ release_date }} </span>
     </div>
     <div class="row modal-container">
                        <table class="highlight col s12">
        <div class="modal-content">
     <div class="trackList-header" v-bind:style="{ 'background-image': `linear-gradient(to bottom, transparent 0%, var(--main-modal-background) 100%), url('${image}')` }">
       <h4>{{ title }}</h4>
-      <h6 v-if="metadata">{{ metadata }}</h6>
+      <h6 v-if="metadata" style="display: inline;">{{ metadata }}</h6>
+      <span class="right" v-if="release_date">{{ release_date }}</span>
     </div>
     <div class="row modal-container">
                        <table class="highlight col s12">
index a1640fdedb6bfc832bfa9e7b6f3d3bbb48bcb484..407d527b647e12612bd6ec4dbb8d3c80db31cfb8 100644 (file)
@@ -558,7 +558,8 @@ var trackListSelectiveModalApp = new Vue({
        el: '#modal_trackListSelective',
        data: {
                title: "",
-               metadata : {},
+               metadata : "",
+               release_date: "",
                image: "",
                type: "",
                link: "",
@@ -572,6 +573,7 @@ var trackListModalApp = new Vue({
        data: {
                title: "",
                metadata : {},
+               release_date: "",
                image: "",
                type: "",
                link: "",
@@ -596,6 +598,7 @@ function showTrackListSelective(link) {
        trackListSelectiveModalApp.title = "Loading..."
        trackListSelectiveModalApp.image = ""
        trackListSelectiveModalApp.metadata = ""
+       trackListSelectiveModalApp.release_date = ""
        trackListSelectiveModalApp.type = ""
        $('#modal_trackListSelective').modal('open')
        socket.emit('getTrackList', {id: getIDFromLink(link), type: getTypeFromLink(link)})
@@ -631,6 +634,7 @@ function showTrackList(link) {
        trackListModalApp.title = "Loading..."
        trackListModalApp.image = ""
        trackListModalApp.metadata = ""
+       trackListModalApp.release_date = ""
        trackListModalApp.type = ""
        $('#modal_trackList').modal('open')
        socket.emit("getTrackList", {id: getIDFromLink(link), type: getTypeFromLink(link)})
@@ -695,6 +699,7 @@ socket.on("getTrackList", function (data) {
                        trackListSelectiveModalApp.link = `https://www.deezer.com/${data.reqType}/${data.id}`
                        trackListSelectiveModalApp.title = data.response.title
                        trackListSelectiveModalApp.image = data.response.picture_xl
+                       trackListSelectiveModalApp.release_date = data.response.creation_date.substring(0,10)
                        trackListSelectiveModalApp.metadata = `by ${data.response.creator.name} • ${trackList.length == 1 ? "1 song" : `${trackList.length} songs`}`
                        trackListSelectiveModalApp.head = [
                                {title: '<i class="material-icons">music_note</i>'},
@@ -733,6 +738,7 @@ socket.on("getTrackList", function (data) {
                        trackListSelectiveModalApp.link = `https://www.deezer.com/${data.reqType}/${data.id}`
                        trackListSelectiveModalApp.title = data.response.title
                        trackListSelectiveModalApp.metadata = `${data.response.artist.name} • ${trackList.length == 1 ? "1 song" : `${trackList.length} songs`}`
+                       trackListSelectiveModalApp.release_date = data.response.release_date.substring(0,10)
                        trackListSelectiveModalApp.image = data.response.cover_xl
                        trackListSelectiveModalApp.head = [
                                {title: '<i class="material-icons">music_note</i>'},