|
@@ -2,10 +2,7 @@
|
|
|
<modal title="Report">
|
|
|
<div slot="body">
|
|
|
<div class="columns song-types">
|
|
|
- <div
|
|
|
- v-if="previousSong !== null && localSong === null"
|
|
|
- class="column song-type"
|
|
|
- >
|
|
|
+ <div v-if="previousSong !== null" class="column song-type">
|
|
|
<div
|
|
|
class="card is-fullwidth"
|
|
|
:class="{ 'is-highlight-active': isPreviousSongActive }"
|
|
@@ -44,35 +41,32 @@
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div
|
|
|
- v-if="currentSong !== {} && localSong === null"
|
|
|
- class="column song-type"
|
|
|
- >
|
|
|
+ <div v-if="localSong !== null" class="column song-type">
|
|
|
<div
|
|
|
class="card is-fullwidth"
|
|
|
- :class="{ 'is-highlight-active': isCurrentSongActive }"
|
|
|
- @click="highlight('currentSong')"
|
|
|
+ :class="{ 'is-highlight-active': isLocalSongActive }"
|
|
|
+ @click="highlight('localSong')"
|
|
|
>
|
|
|
<header class="card-header">
|
|
|
- <p class="card-header-title">Current Song</p>
|
|
|
+ <p class="card-header-title">Selected Song</p>
|
|
|
</header>
|
|
|
<div class="card-content">
|
|
|
<article class="media">
|
|
|
<figure class="media-left">
|
|
|
<song-thumbnail
|
|
|
class="image is-64x64"
|
|
|
- :song="currentSong"
|
|
|
+ :song="localSong"
|
|
|
/>
|
|
|
</figure>
|
|
|
<div class="media-content">
|
|
|
<div class="content">
|
|
|
<p>
|
|
|
<strong>{{
|
|
|
- currentSong.title
|
|
|
+ localSong.title
|
|
|
}}</strong>
|
|
|
<br />
|
|
|
<small>{{
|
|
|
- currentSong.artists.join(", ")
|
|
|
+ localSong.artists.join(", ")
|
|
|
}}</small>
|
|
|
</p>
|
|
|
</div>
|
|
@@ -82,40 +76,10 @@
|
|
|
<a
|
|
|
href="#"
|
|
|
class="absolute-a"
|
|
|
- @click="highlight('currentSong')"
|
|
|
+ @click="highlight('localSong')"
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div v-if="localSong !== null" class="column song-type">
|
|
|
- <div class="card is-fullwidth">
|
|
|
- <header class="card-header">
|
|
|
- <p class="card-header-title">Song</p>
|
|
|
- </header>
|
|
|
- <div class="card-content">
|
|
|
- <article class="media">
|
|
|
- <figure class="media-left">
|
|
|
- <song-thumbnail
|
|
|
- class="image is-64x64"
|
|
|
- :song="localSong"
|
|
|
- />
|
|
|
- </figure>
|
|
|
- <div class="media-content">
|
|
|
- <div class="content">
|
|
|
- <p>
|
|
|
- <strong>{{
|
|
|
- localSong.title
|
|
|
- }}</strong>
|
|
|
- <br />
|
|
|
- <small>{{
|
|
|
- localSong.artists.join(", ")
|
|
|
- }}</small>
|
|
|
- </p>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </article>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
</div>
|
|
|
<div class="edit-report-wrapper">
|
|
|
<div class="columns is-multiline">
|
|
@@ -187,7 +151,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
isPreviousSongActive: false,
|
|
|
- isCurrentSongActive: true,
|
|
|
+ isLocalSongActive: true,
|
|
|
localSong: null,
|
|
|
report: {
|
|
|
resolved: false,
|
|
@@ -240,7 +204,6 @@ export default {
|
|
|
return 400 - this.report.description.length;
|
|
|
},
|
|
|
...mapState({
|
|
|
- currentSong: state => state.station.currentSong,
|
|
|
previousSong: state => state.station.previousSong,
|
|
|
song: state => state.modals.report.song
|
|
|
}),
|
|
@@ -249,8 +212,6 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.report.songId = this.currentSong.songId;
|
|
|
-
|
|
|
if (this.song !== null) {
|
|
|
this.localSong = this.song;
|
|
|
this.report.songId = this.song.songId;
|
|
@@ -269,13 +230,13 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
highlight(type) {
|
|
|
- if (type === "currentSong") {
|
|
|
- this.report.songId = this.currentSong.songId;
|
|
|
+ if (type === "localSong") {
|
|
|
+ this.report.songId = this.localSong.songId;
|
|
|
this.isPreviousSongActive = false;
|
|
|
- this.isCurrentSongActive = true;
|
|
|
+ this.isLocalSongActive = true;
|
|
|
} else if (type === "previousSong") {
|
|
|
this.report.songId = this.previousSong.songId;
|
|
|
- this.isCurrentSongActive = false;
|
|
|
+ this.isLocalSongActive = false;
|
|
|
this.isPreviousSongActive = true;
|
|
|
}
|
|
|
},
|