feat: prettier task supported (#40)

* feat: add config to resolve path alias.

* feat: use vue-i18n for language switch

* feat: add .editorconfig for ide

* fix: add no-referrer to avoid CROB

* fix: setCookie and fix typo

* feat: integrate vue-i18n

* feat: player component i18n support

* fix: duplicate key warning in explore page

* fix: like songs number changed in library page

* fire: remove todo

* fix: same text search on enter will cause error

* fix: scrobble error params type

* feat: prettier task supported

* fix: prettier ignore config update

* fix: conflict
This commit is contained in:
Hawtim Zhang 2020-10-22 21:44:34 +08:00 committed by GitHub
parent 56fe497db9
commit c042faa001
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 1755 additions and 1445 deletions

View file

@ -8,7 +8,7 @@
<div class="name">{{ artist.name }}</div>
<div class="artist">{{ $t("artist.artist") }}</div>
<div class="statistics">
{{ artist.musicSize }} {{ $t("common.songs") }} ·
{{ artist.musicSize }} {{ $t("common.songs") }} ·
{{ artist.albumSize }} {{ $t("artist.withAlbums") }} ·
{{ artist.mvSize }} {{ $t("artist.videos") }}
</div>
@ -112,7 +112,7 @@ export default {
show: false,
artist: {
img1v1Url:
"https://p1.music.126.net/VnZiScyynLG7atLIZ2YPkw==/18686200114669622.jpg"
"https://p1.music.126.net/VnZiScyynLG7atLIZ2YPkw==/18686200114669622.jpg",
},
popularTracks: [],
albumsData: [],
@ -122,52 +122,52 @@ export default {
id: 0,
name: "",
type: "",
size: ""
size: "",
},
showMorePopTracks: false,
mvs: []
mvs: [],
};
},
computed: {
...mapState(["player"]),
albums() {
return this.albumsData.filter(a => a.type === "专辑");
return this.albumsData.filter((a) => a.type === "专辑");
},
eps() {
return this.albumsData.filter(a =>
return this.albumsData.filter((a) =>
["EP/Single", "EP", "Single"].includes(a.type)
);
}
},
},
methods: {
...mapMutations(["appendTrackToPlayerList"]),
...mapActions(["playFirstTrackOnList", "playTrackOnListByID"]),
loadData(id, next = undefined) {
getArtist(id).then(data => {
getArtist(id).then((data) => {
this.artist = data.artist;
this.popularTracks = data.hotSongs;
if (next !== undefined) next();
NProgress.done();
this.show = true;
});
getArtistAlbum({ id: id, limit: 200 }).then(data => {
getArtistAlbum({ id: id, limit: 200 }).then((data) => {
this.albumsData = data.hotAlbums;
this.latestRelease = data.hotAlbums[0];
});
artistMv(id).then(data => {
artistMv(id).then((data) => {
this.mvs = data.mvs;
});
},
goToAlbum(id) {
this.$router.push({
name: "album",
params: { id }
params: { id },
});
},
playPopularSongs(trackID = "first") {
let trackIDs = this.popularTracks.map(t => t.id);
let trackIDs = this.popularTracks.map((t) => t.id);
playAList(trackIDs, this.artist.id, "artist", trackID);
}
},
},
created() {
this.loadData(this.$route.params.id);
@ -186,7 +186,7 @@ export default {
this.artist.img1v1Url =
"https://p1.music.126.net/VnZiScyynLG7atLIZ2YPkw==/18686200114669622.jpg";
this.loadData(to.params.id, next);
}
},
};
</script>