feat(settings): add show music library default setting (#549)

* feat(settings): add show music library default setting

resolve #301

* adj zh-cn text

Co-authored-by: qier222 <qier2222@gmail.com>
master
Map1en_ 4 years ago committed by GitHub
parent 9ae15c198d
commit 9708064d26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -70,6 +70,8 @@ export default {
},
},
created() {
this.$store.state.settings.showLibraryDefault &&
this.$router.push("/library");
if (this.isElectron) {
ipcRenderer(this);
}

@ -154,6 +154,7 @@ export default {
showPlaylistsByAppleMusic: "Show playlists by Apple Music",
enableDiscordRichPresence: "Enable Discord Rich Presence",
enableGlobalShortcut: "Enable Global Shortcut",
showLibraryDefault: "Show library default",
},
contextMenu: {
play: "Play",

@ -153,6 +153,7 @@ export default {
showUnavailableSongInGreyStyle: "Erişilemeyen müzikleri gri stilde göster",
showPlaylistsByAppleMusic: "Apple Music'in Çalma Listelerini Göster",
enableDiscordRichPresence: "Discord gösterimini aktifleştir",
showLibraryDefault: "Kitaplık Varsayılanını göster",
},
contextMenu: {
play: "Oynat",

@ -155,6 +155,7 @@ export default {
showPlaylistsByAppleMusic: "首页显示来自 Apple Music 的歌单",
enableDiscordRichPresence: "启用 Discord Rich Presence",
enableGlobalShortcut: "启用全局快捷键",
showLibraryDefault: "启动后显示音乐库",
},
contextMenu: {
play: "播放",

@ -19,6 +19,7 @@ let localStorage = {
minimizeToTray: false,
enableDiscordRichPresence: false,
enableGlobalShortcut: true,
showLibraryDefault: false,
},
data: {
user: {},

@ -233,6 +233,23 @@
</div>
</div>
<div class="item">
<div class="left">
<div class="title"> {{ $t("settings.showLibraryDefault") }}</div>
</div>
<div class="right">
<div class="toggle">
<input
type="checkbox"
name="show-library-default"
id="show-library-default"
v-model="showLibraryDefault"
/>
<label for="show-library-default"></label>
</div>
</div>
</div>
<div class="item">
<div class="left">
<div class="title">
@ -538,6 +555,13 @@ export default {
});
},
},
showLibraryDefault: {
get() {
return this.settings.showLibraryDefault || false;
},
set(value) {
this.$store.commit("updateSettings", {
key: "showLibraryDefault",
cacheLimit: {
get() {
return this.settings.cacheLimit || false;

Loading…
Cancel
Save