fix: 歌名翻译文本位置 & FMCard背景颜色 (#1650)

* fix: 歌名翻译文本位置

* fix: 使FMCard的背景颜色永远随着歌曲改变
master
memorydream 3 years ago committed by GitHub
parent 6b690baef6
commit 1496a8a0d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -67,6 +67,11 @@ export default {
)}?param=512y512`; )}?param=512y512`;
}, },
}, },
watch: {
track() {
this.getColor();
},
},
created() { created() {
this.getColor(); this.getColor();
window.ok = this.getColor; window.ok = this.getColor;
@ -76,11 +81,7 @@ export default {
this.player.playPersonalFM(); this.player.playPersonalFM();
}, },
next() { next() {
this.player.playNextFMTrack().then(result => { this.player.playNextFMTrack();
if (result) {
this.getColor();
}
});
}, },
goToAlbum() { goToAlbum() {
if (this.track.album.id === 0) return; if (this.track.album.id === 0) return;
@ -88,7 +89,6 @@ export default {
}, },
moveToFMTrash() { moveToFMTrash() {
this.player.moveToFMTrash(); this.player.moveToFMTrash();
this.getColor();
}, },
getColor() { getColor() {
if (!this.player.personalFMTrack?.album?.picUrl) return; if (!this.player.personalFMTrack?.album?.picUrl) return;

@ -272,10 +272,15 @@ export default {
} }
}, },
copyLink() { copyLink() {
navigator.clipboard.writeText( this.$copyText(
`https://music.163.com/song?id=${this.rightClickedTrack.id}` `https://music.163.com/song?id=${this.rightClickedTrack.id}`
); )
.then(() => {
this.showToast(locale.t('toast.copied')); this.showToast(locale.t('toast.copied'));
})
.catch(err => {
this.showToast(`${locale.t('toast.copyFailed')}${err}`);
});
}, },
removeTrackFromQueue() { removeTrackFromQueue() {
this.$store.state.player.removeTrackFromQueue( this.$store.state.player.removeTrackFromQueue(

@ -33,6 +33,9 @@
<div class="container"> <div class="container">
<div class="title"> <div class="title">
{{ track.name }} {{ track.name }}
<span v-if="isSubTitle" :title="subTitle" class="sub-title">
({{ subTitle }})
</span>
<span v-if="isAlbum" class="featured"> <span v-if="isAlbum" class="featured">
<ArtistsInLine <ArtistsInLine
:artists="track.ar" :artists="track.ar"
@ -42,9 +45,6 @@
<span v-if="isAlbum && track.mark === 1318912" class="explicit-symbol" <span v-if="isAlbum && track.mark === 1318912" class="explicit-symbol"
><ExplicitSymbol ><ExplicitSymbol
/></span> /></span>
<span v-if="isSubTitle" :title="subTitle" class="sub-title">
({{ subTitle }})
</span>
</div> </div>
<div v-if="!isAlbum" class="artist"> <div v-if="!isAlbum" class="artist">
<span <span
@ -317,7 +317,8 @@ button {
opacity: 0.72; opacity: 0.72;
} }
.sub-title { .sub-title {
color: #aeaeae; color: #7a7a7a;
opacity: 0.7;
margin-left: 4px; margin-left: 4px;
} }
} }

Loading…
Cancel
Save