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'),
|
label: utils.getLocale(utils.getStoreValue('general.language'), 'term.settings'),
|
||||||
accelerator: utils.getStoreValue("general.keybindings.settings").join('+'),
|
accelerator: utils.getStoreValue("general.keybindings.settings").join('+'),
|
||||||
click: () => utils.getWindow().webContents.executeJavaScript(`app.appRoute('settings')`)
|
click: () => utils.getWindow().webContents.executeJavaScript(`app.openSettingsPage()`)
|
||||||
},
|
},
|
||||||
...(this.isMac ? [
|
...(this.isMac ? [
|
||||||
{type: 'separator'},
|
{type: 'separator'},
|
||||||
|
|
|
@ -4331,8 +4331,7 @@ const app = new Vue({
|
||||||
"name": app.getLz('settings.option.audio.audioLab'),
|
"name": app.getLz('settings.option.audio.audioLab'),
|
||||||
"hidden": true,
|
"hidden": true,
|
||||||
"action": function () {
|
"action": function () {
|
||||||
app.$store.state.pageState.settings.currentTabIndex = 2
|
app.openSettingsPage('audiolabs')
|
||||||
app.modals.settings = true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
@ -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() {
|
LastFMDeauthorize() {
|
||||||
ipcRenderer.invoke('setStoreValue', 'lastfm.enabled', false).catch((e) => console.error(e));
|
ipcRenderer.invoke('setStoreValue', 'lastfm.enabled', false).catch((e) => console.error(e));
|
||||||
ipcRenderer.invoke('setStoreValue', 'lastfm.auth_token', '').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">
|
<script type="text/x-template" id="audio-controls">
|
||||||
<div class="modal-fullscreen addtoplaylist-panel" @click.self="app.resetState()"
|
<div class="modal-fullscreen addtoplaylist-panel" @click.self="app.modals.audioControls = false"
|
||||||
@contextmenu.self="app.resetState()">
|
@contextmenu.self="app.modals.audioControls = false">
|
||||||
<div class="modal-window">
|
<div class="modal-window">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<div class="modal-title">{{app.getLz('term.audioControls')}}</div>
|
<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>
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="md-option-line">
|
<div class="md-option-line">
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<script type="text/x-template" id="audio-playbackrate">
|
<script type="text/x-template" id="audio-playbackrate">
|
||||||
<div class="modal-fullscreen addtoplaylist-panel" @click.self="app.resetState()"
|
<div class="modal-fullscreen addtoplaylist-panel" @click.self="app.modals.audioPlaybackRate = false"
|
||||||
@contextmenu.self="app.resetState()">
|
@contextmenu.self="app.modals.audioPlaybackRate = false">
|
||||||
<div class="modal-window">
|
<div class="modal-window">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<div class="modal-title">{{app.getLz('settings.option.audio.changePlaybackRate')}}</div>
|
<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>
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="md-option-line">
|
<div class="md-option-line">
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
<script type="text/x-template" id="audio-settings">
|
<script type="text/x-template" id="audio-settings">
|
||||||
<template>
|
<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-window">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<div class="modal-title">{{app.getLz('term.audioSettings')}}</div>
|
<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>
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<button class="playlist-item"
|
<button class="playlist-item"
|
||||||
|
@ -23,7 +23,7 @@
|
||||||
<div class="name">{{app.getLz('settings.option.audio.changePlaybackRate')}}</div>
|
<div class="name">{{app.getLz('settings.option.audio.changePlaybackRate')}}</div>
|
||||||
</button>
|
</button>
|
||||||
<button class="playlist-item"
|
<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="icon"><%- include("../svg/speaker.svg") %></div>
|
||||||
<div class="name">{{app.getLz('settings.option.audio.audioLab')}}</div>
|
<div class="name">{{app.getLz('settings.option.audio.audioLab')}}</div>
|
||||||
</button>
|
</button>
|
||||||
|
|
|
@ -291,7 +291,7 @@
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
app.resetState()
|
app.modals.equalizer = false
|
||||||
},
|
},
|
||||||
changeVibrantBass() {
|
changeVibrantBass() {
|
||||||
if (app.cfg.audio.equalizer.vibrantBass !== '0') {
|
if (app.cfg.audio.equalizer.vibrantBass !== '0') {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue