|
@@ -2,6 +2,11 @@
|
|
<div>
|
|
<div>
|
|
<modal title='Edit Song'>
|
|
<modal title='Edit Song'>
|
|
<div slot='body'>
|
|
<div slot='body'>
|
|
|
|
+ <span class="tag is-info is-medium reports" v-if="reports > 0">
|
|
|
|
+ {{ reports }}
|
|
|
|
+ <span v-if="reports > 1"> Reports </span>
|
|
|
|
+ <span v-else> Report </span>
|
|
|
|
+ </span>
|
|
<h5 class='has-text-centered'>Video Preview</h5>
|
|
<h5 class='has-text-centered'>Video Preview</h5>
|
|
<div class='video-container'>
|
|
<div class='video-container'>
|
|
<div id='player'></div>
|
|
<div id='player'></div>
|
|
@@ -123,6 +128,7 @@
|
|
song: {},
|
|
song: {},
|
|
type: ''
|
|
type: ''
|
|
},
|
|
},
|
|
|
|
+ reports: 0,
|
|
video: {
|
|
video: {
|
|
player: null,
|
|
player: null,
|
|
paused: false,
|
|
paused: false,
|
|
@@ -261,6 +267,7 @@
|
|
this.$parent.modals.editSong = false;
|
|
this.$parent.modals.editSong = false;
|
|
},
|
|
},
|
|
editSong: function (song, index, type) {
|
|
editSong: function (song, index, type) {
|
|
|
|
+ let _this = this;
|
|
this.video.player.loadVideoById(song._id, this.editing.song.skipDuration);
|
|
this.video.player.loadVideoById(song._id, this.editing.song.skipDuration);
|
|
let newSong = {};
|
|
let newSong = {};
|
|
for (let n in song) {
|
|
for (let n in song) {
|
|
@@ -271,6 +278,9 @@
|
|
song: newSong,
|
|
song: newSong,
|
|
type
|
|
type
|
|
};
|
|
};
|
|
|
|
+ _this.socket.emit('reports.getReportsForSong', song._id, res => {
|
|
|
|
+ if (res.status === 'success') _this.reports = res.data;
|
|
|
|
+ });
|
|
this.$parent.toggleModal();
|
|
this.$parent.toggleModal();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -407,4 +417,9 @@
|
|
.save-changes { color: #fff; }
|
|
.save-changes { color: #fff; }
|
|
|
|
|
|
.tag:not(:last-child) { margin-right: 5px; }
|
|
.tag:not(:last-child) { margin-right: 5px; }
|
|
|
|
+
|
|
|
|
+ .reports {
|
|
|
|
+ margin: 0 auto;
|
|
|
|
+ display: flex;
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|