mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-16 21:28:06 +00:00
feat: add song title translate (#691)
This commit is contained in:
parent
427806b0d7
commit
6910d5ba87
1 changed files with 20 additions and 0 deletions
|
|
@ -43,6 +43,9 @@
|
||||||
<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="isTranslate" :title="translate" class="translate">
|
||||||
|
- ({{ translate }})
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="!isAlbum" class="artist">
|
<div v-if="!isAlbum" class="artist">
|
||||||
<span
|
<span
|
||||||
|
|
@ -111,12 +114,26 @@ export default {
|
||||||
album() {
|
album() {
|
||||||
return this.track.album || this.track.al;
|
return this.track.album || this.track.al;
|
||||||
},
|
},
|
||||||
|
translate() {
|
||||||
|
let t;
|
||||||
|
if (this.track.tns?.length > 0) t = this.track.tns[0];
|
||||||
|
else if (this.track.al.tns?.length > 0) t = this.track.al.tns[0];
|
||||||
|
else t = this.track.alia[0];
|
||||||
|
return t;
|
||||||
|
},
|
||||||
type() {
|
type() {
|
||||||
return this.$parent.type;
|
return this.$parent.type;
|
||||||
},
|
},
|
||||||
isAlbum() {
|
isAlbum() {
|
||||||
return this.type === 'album';
|
return this.type === 'album';
|
||||||
},
|
},
|
||||||
|
isTranslate() {
|
||||||
|
return (
|
||||||
|
this.track.tns?.length > 0 ||
|
||||||
|
this.track.al.tns?.length > 0 ||
|
||||||
|
this.track.alia?.length > 0
|
||||||
|
);
|
||||||
|
},
|
||||||
isTracklist() {
|
isTracklist() {
|
||||||
return this.type === 'tracklist';
|
return this.type === 'tracklist';
|
||||||
},
|
},
|
||||||
|
|
@ -262,6 +279,9 @@ button {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
opacity: 0.72;
|
opacity: 0.72;
|
||||||
}
|
}
|
||||||
|
.translate {
|
||||||
|
color: #aeaeae;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.artist {
|
.artist {
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue