fix some conflicts, updated routes to settings
This commit is contained in:
parent
f71ca88298
commit
9320b7f412
6 changed files with 55 additions and 30 deletions
|
@ -37,7 +37,7 @@ export default class Thumbar {
|
|||
{
|
||||
label: utils.getLocale(utils.getStoreValue('general.language'), 'term.settings'),
|
||||
accelerator: utils.getStoreValue("general.keybindings.settings").join('+'),
|
||||
click: () => utils.getWindow().webContents.executeJavaScript(`app.appRoute('settings')`)
|
||||
click: () => utils.getWindow().webContents.executeJavaScript(`app.openSettingsPage()`)
|
||||
},
|
||||
...(this.isMac ? [
|
||||
{type: 'separator'},
|
||||
|
|
|
@ -4331,8 +4331,7 @@ const app = new Vue({
|
|||
"name": app.getLz('settings.option.audio.audioLab'),
|
||||
"hidden": true,
|
||||
"action": function () {
|
||||
app.$store.state.pageState.settings.currentTabIndex = 2
|
||||
app.modals.settings = true
|
||||
app.openSettingsPage('audiolabs')
|
||||
}
|
||||
},
|
||||
]
|
||||
|
@ -4391,6 +4390,32 @@ const app = new Vue({
|
|||
|
||||
}
|
||||
},
|
||||
openSettingsPage(page) {
|
||||
switch (page) {
|
||||
case "general":
|
||||
this.$store.state.pageState.settings.currentTabIndex = 0
|
||||
break;
|
||||
case "audio":
|
||||
this.$store.state.pageState.settings.currentTabIndex = 1
|
||||
break;
|
||||
case "audiolabs":
|
||||
this.$store.state.pageState.settings.currentTabIndex = 2
|
||||
break;
|
||||
case "visual":
|
||||
this.$store.state.pageState.settings.currentTabIndex = 3
|
||||
break;
|
||||
case "lyrics":
|
||||
this.$store.state.pageState.settings.currentTabIndex = 4
|
||||
break;
|
||||
case "connectivity":
|
||||
this.$store.state.pageState.settings.currentTabIndex = 5
|
||||
break;
|
||||
case "advanced":
|
||||
this.$store.state.pageState.settings.currentTabIndex = 6
|
||||
break;
|
||||
}
|
||||
app.modals.settings = true
|
||||
},
|
||||
LastFMDeauthorize() {
|
||||
ipcRenderer.invoke('setStoreValue', 'lastfm.enabled', false).catch((e) => console.error(e));
|
||||
ipcRenderer.invoke('setStoreValue', 'lastfm.auth_token', '').catch((e) => console.error(e));
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<script type="text/x-template" id="audio-controls">
|
||||
<div class="modal-fullscreen addtoplaylist-panel" @click.self="app.resetState()"
|
||||
@contextmenu.self="app.resetState()">
|
||||
<div class="modal-fullscreen addtoplaylist-panel" @click.self="app.modals.audioControls = false"
|
||||
@contextmenu.self="app.modals.audioControls = false">
|
||||
<div class="modal-window">
|
||||
<div class="modal-header">
|
||||
<div class="modal-title">{{app.getLz('term.audioControls')}}</div>
|
||||
<button class="close-btn" @click="app.resetState()" :aria-label="app.getLz('action.close')"></button>
|
||||
<button class="close-btn" @click="app.modals.audioControls = false" :aria-label="app.getLz('action.close')"></button>
|
||||
</div>
|
||||
<div class="modal-content">
|
||||
<div class="md-option-line">
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<script type="text/x-template" id="audio-playbackrate">
|
||||
<div class="modal-fullscreen addtoplaylist-panel" @click.self="app.resetState()"
|
||||
@contextmenu.self="app.resetState()">
|
||||
<div class="modal-fullscreen addtoplaylist-panel" @click.self="app.modals.audioPlaybackRate = false"
|
||||
@contextmenu.self="app.modals.audioPlaybackRate = false">
|
||||
<div class="modal-window">
|
||||
<div class="modal-header">
|
||||
<div class="modal-title">{{app.getLz('settings.option.audio.changePlaybackRate')}}</div>
|
||||
<button class="close-btn" @click="app.resetState()" :aria-label="app.getLz('action.close')"></button>
|
||||
<button class="close-btn" @click="app.modals.audioPlaybackRate = false" :aria-label="app.getLz('action.close')"></button>
|
||||
</div>
|
||||
<div class="modal-content">
|
||||
<div class="md-option-line">
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<script type="text/x-template" id="audio-settings">
|
||||
<template>
|
||||
<div class="modal-fullscreen addtoplaylist-panel" @click.self="app.resetState()" @contextmenu.self="app.resetState()">
|
||||
<div class="modal-fullscreen addtoplaylist-panel" @click.self="app.modals.audioSettings = false" @contextmenu.self="app.modals.audioSettings = false">
|
||||
<div class="modal-window">
|
||||
<div class="modal-header">
|
||||
<div class="modal-title">{{app.getLz('term.audioSettings')}}</div>
|
||||
<button class="close-btn" @click="app.resetState()" :aria-label="app.getLz('action.close')"></button>
|
||||
<button class="close-btn" @click="app.modals.audioSettings = false" :aria-label="app.getLz('action.close')"></button>
|
||||
</div>
|
||||
<div class="modal-content">
|
||||
<button class="playlist-item"
|
||||
|
@ -23,7 +23,7 @@
|
|||
<div class="name">{{app.getLz('settings.option.audio.changePlaybackRate')}}</div>
|
||||
</button>
|
||||
<button class="playlist-item"
|
||||
@click="$root.appRoute('audiolabs')" style="width:100%;">
|
||||
@click="$root.openSettingsPage('audiolabs')" style="width:100%;">
|
||||
<div class="icon"><%- include("../svg/speaker.svg") %></div>
|
||||
<div class="name">{{app.getLz('settings.option.audio.audioLab')}}</div>
|
||||
</button>
|
||||
|
|
|
@ -291,7 +291,7 @@
|
|||
})
|
||||
},
|
||||
close() {
|
||||
app.resetState()
|
||||
app.modals.equalizer = false
|
||||
},
|
||||
changeVibrantBass() {
|
||||
if (app.cfg.audio.equalizer.vibrantBass !== '0') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue