|
|
@ -32,6 +32,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
<div class="left-side">
|
|
|
|
<div class="left-side">
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<div v-if="settings.showLyricsTime" class="date">
|
|
|
|
|
|
|
|
{{ date }}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="cover">
|
|
|
|
<div class="cover">
|
|
|
|
<div class="cover-container">
|
|
|
|
<div class="cover-container">
|
|
|
|
<img :src="imageUrl" loading="lazy" />
|
|
|
|
<img :src="imageUrl" loading="lazy" />
|
|
|
@ -277,6 +280,7 @@ export default {
|
|
|
|
highlightLyricIndex: -1,
|
|
|
|
highlightLyricIndex: -1,
|
|
|
|
minimize: true,
|
|
|
|
minimize: true,
|
|
|
|
background: '',
|
|
|
|
background: '',
|
|
|
|
|
|
|
|
date: this.formatTime(new Date()),
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
computed: {
|
|
|
@ -367,6 +371,12 @@ export default {
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
this.getLyric();
|
|
|
|
this.getLyric();
|
|
|
|
this.getCoverColor();
|
|
|
|
this.getCoverColor();
|
|
|
|
|
|
|
|
this.initDate();
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
beforeDestroy: function () {
|
|
|
|
|
|
|
|
if (this.timer) {
|
|
|
|
|
|
|
|
clearInterval(this.timer);
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
destroyed() {
|
|
|
|
destroyed() {
|
|
|
|
clearInterval(this.lyricsInterval);
|
|
|
|
clearInterval(this.lyricsInterval);
|
|
|
@ -374,6 +384,25 @@ export default {
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
...mapMutations(['toggleLyrics', 'updateModal']),
|
|
|
|
...mapMutations(['toggleLyrics', 'updateModal']),
|
|
|
|
...mapActions(['likeATrack']),
|
|
|
|
...mapActions(['likeATrack']),
|
|
|
|
|
|
|
|
initDate() {
|
|
|
|
|
|
|
|
var _this = this;
|
|
|
|
|
|
|
|
clearInterval(this.timer);
|
|
|
|
|
|
|
|
this.timer = setInterval(function () {
|
|
|
|
|
|
|
|
_this.date = _this.formatTime(new Date());
|
|
|
|
|
|
|
|
}, 1000);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
formatTime(value) {
|
|
|
|
|
|
|
|
let hour = value.getHours().toString();
|
|
|
|
|
|
|
|
let minute = value.getMinutes().toString();
|
|
|
|
|
|
|
|
let second = value.getSeconds().toString();
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
hour.padStart(2, '0') +
|
|
|
|
|
|
|
|
':' +
|
|
|
|
|
|
|
|
minute.padStart(2, '0') +
|
|
|
|
|
|
|
|
':' +
|
|
|
|
|
|
|
|
second.padStart(2, '0')
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
},
|
|
|
|
addToPlaylist() {
|
|
|
|
addToPlaylist() {
|
|
|
|
if (!isAccountLoggedIn()) {
|
|
|
|
if (!isAccountLoggedIn()) {
|
|
|
|
this.showToast(locale.t('toast.needToLogin'));
|
|
|
|
this.showToast(locale.t('toast.needToLogin'));
|
|
|
@ -596,6 +625,20 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
z-index: 1;
|
|
|
|
z-index: 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.date {
|
|
|
|
|
|
|
|
max-width: 54vh;
|
|
|
|
|
|
|
|
margin: 24px 0;
|
|
|
|
|
|
|
|
color: var(--color-text);
|
|
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
font-size: 4rem;
|
|
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
|
|
opacity: 0.88;
|
|
|
|
|
|
|
|
display: -webkit-box;
|
|
|
|
|
|
|
|
-webkit-box-orient: vertical;
|
|
|
|
|
|
|
|
-webkit-line-clamp: 1;
|
|
|
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.controls {
|
|
|
|
.controls {
|
|
|
|
max-width: 54vh;
|
|
|
|
max-width: 54vh;
|
|
|
|
margin-top: 24px;
|
|
|
|
margin-top: 24px;
|
|
|
|