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

* fix: 歌名翻译文本位置

* fix: 使FMCard的背景颜色永远随着歌曲改变
This commit is contained in:
memorydream 2022-06-19 20:51:30 +08:00 committed by GitHub
parent 6b690baef6
commit 1496a8a0d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 13 deletions

View File

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

View File

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

View File

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