mirror of
https://github.com/qier222/YesPlayMusic.git
synced 2024-11-25 09:41:49 +08:00
Merge branch 'master' into i18n
This commit is contained in:
commit
92a994b1a1
|
@ -4,6 +4,7 @@
|
|||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="referrer" content="no-referrer">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||
|
|
|
@ -17,7 +17,10 @@
|
|||
</div>
|
||||
<div class="controls">
|
||||
<div class="playing">
|
||||
<img :src="currentTrack.al.picUrl | resizeImage" @click="goToAlbum" />
|
||||
<img
|
||||
:src="currentTrack.al.picUrl | resizeImage(224)"
|
||||
@click="goToAlbum"
|
||||
/>
|
||||
<div class="track-info">
|
||||
<div class="name" @click="goToList">
|
||||
{{ currentTrack.name }}
|
||||
|
@ -125,13 +128,13 @@ export default {
|
|||
name: "Player",
|
||||
components: {
|
||||
ButtonIcon,
|
||||
VueSlider,
|
||||
VueSlider
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
interval: null,
|
||||
progress: 0,
|
||||
oldVolume: 0.5,
|
||||
oldVolume: 0.5
|
||||
};
|
||||
},
|
||||
created() {
|
||||
|
@ -139,7 +142,7 @@ export default {
|
|||
this.progress = ~~this.howler.seek();
|
||||
}, 1000);
|
||||
if (this.isLoggedIn) {
|
||||
userLikedSongsIDs(this.settings.user.userId).then((data) => {
|
||||
userLikedSongsIDs(this.settings.user.userId).then(data => {
|
||||
this.updateLikedSongs(data.ids);
|
||||
});
|
||||
}
|
||||
|
@ -156,7 +159,7 @@ export default {
|
|||
set(value) {
|
||||
this.updatePlayerState({ key: "volume", value });
|
||||
Howler.volume(value);
|
||||
},
|
||||
}
|
||||
},
|
||||
playing() {
|
||||
if (this.howler.state() === "loading") {
|
||||
|
@ -170,7 +173,7 @@ export default {
|
|||
},
|
||||
isLoggedIn() {
|
||||
return isLoggedIn();
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapMutations([
|
||||
|
@ -178,13 +181,13 @@ export default {
|
|||
"turnOffShuffleMode",
|
||||
"updatePlayerState",
|
||||
"updateRepeatStatus",
|
||||
"updateLikedSongs",
|
||||
"updateLikedSongs"
|
||||
]),
|
||||
...mapActions([
|
||||
"nextTrack",
|
||||
"previousTrack",
|
||||
"playTrackOnListByID",
|
||||
"addNextTrackEvent",
|
||||
"addNextTrackEvent"
|
||||
]),
|
||||
play() {
|
||||
if (this.playing) {
|
||||
|
@ -253,7 +256,7 @@ export default {
|
|||
if (this.liked.songs.includes(id)) like = false;
|
||||
likeATrack({ id, like }).then(() => {
|
||||
if (like === false) {
|
||||
this.updateLikedSongs(this.liked.songs.filter((d) => d !== id));
|
||||
this.updateLikedSongs(this.liked.songs.filter(d => d !== id));
|
||||
} else {
|
||||
let newLikeSongs = this.liked.songs;
|
||||
newLikeSongs.push(id);
|
||||
|
@ -266,7 +269,7 @@ export default {
|
|||
this.$router.push({ path: "/library/liked-songs" });
|
||||
else
|
||||
this.$router.push({
|
||||
path: "/" + this.player.listInfo.type + "/" + this.player.listInfo.id,
|
||||
path: "/" + this.player.listInfo.type + "/" + this.player.listInfo.id
|
||||
});
|
||||
},
|
||||
goToAlbum() {
|
||||
|
@ -274,8 +277,8 @@ export default {
|
|||
},
|
||||
goToArtist(id) {
|
||||
this.$router.push({ path: "/artist/" + id });
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
@mouseover="focus = true"
|
||||
@mouseleave="focus = false"
|
||||
>
|
||||
<img :src="imgUrl | resizeImage" v-if="!isAlbum" @click="goToAlbum" />
|
||||
<img :src="imgUrl | resizeImage(224)" v-if="!isAlbum" @click="goToAlbum" />
|
||||
<div class="no" v-if="isAlbum">
|
||||
<button
|
||||
class="play-button"
|
||||
|
@ -52,7 +52,7 @@
|
|||
icon-class="heart"
|
||||
:style="{
|
||||
visibility:
|
||||
focus && !isLiked && track.playable ? 'visible' : 'hidden',
|
||||
focus && !isLiked && track.playable ? 'visible' : 'hidden'
|
||||
}"
|
||||
></svg-icon>
|
||||
<svg-icon icon-class="heart-solid" v-show="isLiked"></svg-icon>
|
||||
|
@ -75,7 +75,7 @@ export default {
|
|||
name: "TrackListItem",
|
||||
components: { ArtistsInLine, ExplicitSymbol },
|
||||
props: {
|
||||
track: Object,
|
||||
track: Object
|
||||
},
|
||||
data() {
|
||||
return { focus: false, trackStyle: {} };
|
||||
|
@ -117,7 +117,7 @@ export default {
|
|||
},
|
||||
isLoggedIn() {
|
||||
return isLoggedIn();
|
||||
},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goToAlbum() {
|
||||
|
@ -135,19 +135,19 @@ export default {
|
|||
if (like === false) {
|
||||
this.$store.commit(
|
||||
"updateLikedSongs",
|
||||
likedSongs.filter((d) => d !== id)
|
||||
likedSongs.filter(d => d !== id)
|
||||
);
|
||||
} else {
|
||||
likedSongs.push(id);
|
||||
this.$store.commit("updateLikedSongs", likedSongs);
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.$parent.itemWidth !== -1)
|
||||
this.trackStyle = { width: this.$parent.itemWidth + "px" };
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
|
@ -112,6 +112,7 @@ export default {
|
|||
methods: {
|
||||
...mapMutations(["updateUser", "updateUserInfo"]),
|
||||
afterLogin() {
|
||||
Cookies.set("MUSIC_U", true, { expires: 3650 });
|
||||
Cookies.set("loginMode", "account", { expires: 3650 });
|
||||
userPlaylist({
|
||||
uid: this.$store.state.settings.user.userId,
|
||||
|
@ -128,7 +129,7 @@ export default {
|
|||
this.processing = true;
|
||||
if (this.mode === "phone") {
|
||||
if (
|
||||
this.countrycode === "" ||
|
||||
this.countryCode === "" ||
|
||||
this.phone === "" ||
|
||||
this.password === ""
|
||||
) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user