finisch sharing functionality
This commit is contained in:
@@ -181,6 +181,13 @@ export default {
|
||||
this.audio.pause();
|
||||
this.audio.src = url;
|
||||
|
||||
this.pushHistoryItem();
|
||||
},
|
||||
pushHistoryItem() {
|
||||
if (!this.currentUser._id) {
|
||||
return;
|
||||
}
|
||||
|
||||
let item = {
|
||||
id: this.currentTrackParent._id,
|
||||
type: this.currentTrackParentType,
|
||||
@@ -258,15 +265,17 @@ export default {
|
||||
}
|
||||
},
|
||||
gotoContainer() {
|
||||
switch (this.selectedTrack.parentType) {
|
||||
case "album":
|
||||
this.$router.push("/albums?id=" + this.selectedTrack.parent._id);
|
||||
break;
|
||||
case "artist":
|
||||
this.$router.push(
|
||||
"/artists?id=" + this.selectedTrack.parent.parent._id
|
||||
);
|
||||
break;
|
||||
if (this.currentUser._id) {
|
||||
switch (this.selectedTrack.parentType) {
|
||||
case "album":
|
||||
this.$router.push("/albums?id=" + this.selectedTrack.parent._id);
|
||||
break;
|
||||
case "artist":
|
||||
this.$router.push(
|
||||
"/artists?id=" + this.selectedTrack.parent.parent._id
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
switchShuffle() {
|
||||
@@ -275,9 +284,15 @@ export default {
|
||||
},
|
||||
switchRepeatType() {
|
||||
this.$store.dispatch("player/switchPlayerRepeatMode");
|
||||
if (!this.currentUser._id) {
|
||||
return;
|
||||
}
|
||||
this.saveUserSettings();
|
||||
},
|
||||
saveUserSettings() {
|
||||
if (!this.currentUser._id) {
|
||||
return;
|
||||
}
|
||||
this.$store.dispatch("user/savePlayerSettings");
|
||||
},
|
||||
timeUpdate(event) {
|
||||
@@ -314,6 +329,9 @@ export default {
|
||||
}
|
||||
return type;
|
||||
},
|
||||
currentUser() {
|
||||
return this.$store.getters["user/user"];
|
||||
},
|
||||
formatedD() {
|
||||
let m = Math.floor(this.duration / 60);
|
||||
let s = Math.floor(this.duration - m * 60);
|
||||
|
||||
Reference in New Issue
Block a user