mirror of
https://github.com/qier222/YesPlayMusic.git
synced 2025-02-18 15:52:44 +08:00
feat: add "Show Playlists by Apple Music" to settings page
This commit is contained in:
parent
defb8fb565
commit
5ce9c3689a
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="home" v-show="show">
|
<div class="home" v-show="show">
|
||||||
<div class="index-row">
|
<div class="index-row" v-if="settings.showPlaylistsByAppleMusic !== false">
|
||||||
<div class="title"> by Apple Music </div>
|
<div class="title"> by Apple Music </div>
|
||||||
<CoverRow
|
<CoverRow
|
||||||
:type="'playlist'"
|
:type="'playlist'"
|
||||||
|
@ -66,6 +66,8 @@ import { toplistOfArtists } from "@/api/artist";
|
||||||
import { byAppleMusic } from "@/utils/staticPlaylist";
|
import { byAppleMusic } from "@/utils/staticPlaylist";
|
||||||
import { newAlbums } from "@/api/album";
|
import { newAlbums } from "@/api/album";
|
||||||
import NProgress from "nprogress";
|
import NProgress from "nprogress";
|
||||||
|
import { mapState } from "vuex";
|
||||||
|
|
||||||
import CoverRow from "@/components/CoverRow.vue";
|
import CoverRow from "@/components/CoverRow.vue";
|
||||||
import ButtonTwoTone from "@/components/ButtonTwoTone.vue";
|
import ButtonTwoTone from "@/components/ButtonTwoTone.vue";
|
||||||
|
|
||||||
|
@ -88,6 +90,7 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
...mapState(["settings"]),
|
||||||
byAppleMusic() {
|
byAppleMusic() {
|
||||||
return byAppleMusic;
|
return byAppleMusic;
|
||||||
},
|
},
|
||||||
|
|
|
@ -73,6 +73,22 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="item">
|
||||||
|
<div class="left">
|
||||||
|
<div class="title"> Show Playlists by Apple Music</div>
|
||||||
|
</div>
|
||||||
|
<div class="right">
|
||||||
|
<div class="toggle">
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
name="show-playlists-by-apple-music"
|
||||||
|
id="show-playlists-by-apple-music"
|
||||||
|
v-model="showPlaylistsByAppleMusic"
|
||||||
|
/>
|
||||||
|
<label for="show-playlists-by-apple-music"></label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -113,6 +129,18 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
showPlaylistsByAppleMusic: {
|
||||||
|
get() {
|
||||||
|
if (this.settings.showPlaylistsByAppleMusic === undefined) return true;
|
||||||
|
return this.settings.showPlaylistsByAppleMusic;
|
||||||
|
},
|
||||||
|
set(value) {
|
||||||
|
this.$store.commit("updateSettings", {
|
||||||
|
key: "showPlaylistsByAppleMusic",
|
||||||
|
value,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
logout() {
|
logout() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user