master
qier222 4 years ago
parent 6366886fe8
commit d4be289946

@ -1,6 +1,6 @@
{ {
"name": "YesPlayMusic", "name": "YesPlayMusic",
"version": "0.2.5", "version": "0.3.0",
"private": true, "private": true,
"description": "A third party music application for Netease Music", "description": "A third party music application for Netease Music",
"author": "hawtim<hawtimzhang@gmail.com>", "author": "hawtim<hawtimzhang@gmail.com>",

@ -50,11 +50,8 @@ export default {
this.$router.push({ path: "/mv/" + id, query }); this.$router.push({ path: "/mv/" + id, query });
}, },
getUrl(mv) { getUrl(mv) {
if (mv.cover !== undefined) return mv.cover.replace(/^http:/, "https:"); let url = mv.imgurl16v9 ?? mv.cover ?? mv.coverUrl;
if (mv.imgurl16v9 !== undefined) return url.replace(/^http:/, "https:") + "?param=464x260";
return mv.imgurl16v9.replace(/^http:/, "https:");
if (mv.coverUrl !== undefined)
return mv.coverUrl.replace(/^http:/, "https:");
}, },
getID(mv) { getID(mv) {
if (mv.id !== undefined) return mv.id; if (mv.id !== undefined) return mv.id;
@ -102,6 +99,7 @@ export default {
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
overflow: hidden; overflow: hidden;
word-break: break-all;
} }
.artist { .artist {
font-size: 12px; font-size: 12px;

@ -104,6 +104,7 @@ export default class {
this._loadSelfFromLocalStorage(); this._loadSelfFromLocalStorage();
this._replaceCurrentTrack(this._currentTrack.id, false); // update audio source and init howler this._replaceCurrentTrack(this._currentTrack.id, false); // update audio source and init howler
this._initMediaSession(); this._initMediaSession();
Howler.volume(this.volume);
} }
_getNextTrack() { _getNextTrack() {
// 返回 [trackID, index] // 返回 [trackID, index]

@ -117,7 +117,7 @@ export default {
}); });
toplistOfArtists(2).then((data) => { toplistOfArtists(2).then((data) => {
let indexs = []; let indexs = [];
while (indexs.length < 5) { while (indexs.length < 6) {
let tmp = ~~(Math.random() * 100); let tmp = ~~(Math.random() * 100);
if (!indexs.includes(tmp)) indexs.push(tmp); if (!indexs.includes(tmp)) indexs.push(tmp);
} }

@ -15,7 +15,7 @@
<div class="controls"> <div class="controls">
<div class="top-part"> <div class="top-part">
<div class="track-info"> <div class="track-info">
<div class="title" <div class="title" :title="currentTrack.name"
><router-link ><router-link
:to="`/${player.playlistSource.type}/${player.playlistSource.id}`" :to="`/${player.playlistSource.type}/${player.playlistSource.id}`"
@click.native="toggleLyrics" @click.native="toggleLyrics"
@ -32,6 +32,7 @@
<router-link <router-link
:to="`/album/${currentTrack.al.id}`" :to="`/album/${currentTrack.al.id}`"
@click.native="toggleLyrics" @click.native="toggleLyrics"
:title="currentTrack.al.name"
>{{ currentTrack.al.name }}</router-link >{{ currentTrack.al.name }}</router-link
></div ></div
> >
@ -309,8 +310,10 @@ export default {
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
margin-right: 24px; margin-right: 24px;
margin-top: 24px;
align-items: center; align-items: center;
.controls { .controls {
max-width: 54vh;
margin-top: 24px; margin-top: 24px;
color: var(--color-text); color: var(--color-text);
.title { .title {
@ -318,11 +321,19 @@ export default {
font-size: 1.4rem; font-size: 1.4rem;
font-weight: 600; font-weight: 600;
opacity: 0.88; opacity: 0.88;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
} }
.subtitle { .subtitle {
margin-top: 4px; margin-top: 4px;
font-size: 1rem; font-size: 1rem;
opacity: 0.58; opacity: 0.58;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
overflow: hidden;
} }
.top-part { .top-part {
@ -456,7 +467,7 @@ export default {
top: 24px; top: 24px;
right: 24px; right: 24px;
z-index: 300; z-index: 300;
border-radius: 50%; border-radius: 0.75rem;
height: 44px; height: 44px;
width: 44px; width: 44px;
display: flex; display: flex;
@ -464,6 +475,7 @@ export default {
align-items: center; align-items: center;
opacity: 0.28; opacity: 0.28;
transition: 0.2s; transition: 0.2s;
-webkit-app-region: no-drag;
.svg-icon { .svg-icon {
color: var(--color-text); color: var(--color-text);
padding-top: 5px; padding-top: 5px;

Loading…
Cancel
Save