mirror of
https://github.com/Lissy93/dashy.git
synced 2025-12-24 09:26:26 +01:00
bind goToLinkEnabled to Vuex/appConfig and support persistent toggle
This commit is contained in:
parent
43f4b161a0
commit
5d4b3de429
1 changed files with 17 additions and 2 deletions
|
|
@ -55,7 +55,8 @@
|
|||
<label class="theme-label">
|
||||
<input
|
||||
type="checkbox"
|
||||
v-model="goToLinkEnabled"
|
||||
:checked="goToLinkEnabled"
|
||||
@change="goToLinkEnabled = $event.target.checked"
|
||||
/>
|
||||
Go to Link (auto-detect links)
|
||||
</label>
|
||||
|
|
@ -92,7 +93,7 @@ export default {
|
|||
akn: new ArrowKeyNavigation(),
|
||||
getCustomKeyShortcuts,
|
||||
showSearchPanel: false,
|
||||
goToLinkEnabled: true, // default: enabled
|
||||
// goToLinkEnabled is now managed by Vuex/appConfig
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -102,6 +103,20 @@ export default {
|
|||
searchPrefs() {
|
||||
return this.$store.getters.webSearch || {};
|
||||
},
|
||||
goToLinkEnabled: {
|
||||
get() {
|
||||
return this.$store.getters.goToLinkEnabled;
|
||||
},
|
||||
set(value) {
|
||||
this.$store.commit('setGoToLinkEnabled', value);
|
||||
// Also update appConfig in store for persistence
|
||||
const newAppConfig = {
|
||||
...this.$store.getters.appConfig,
|
||||
goToLinkEnabled: value,
|
||||
};
|
||||
this.$store.commit('SET_APP_CONFIG', newAppConfig);
|
||||
},
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('keydown', this.handleKeyPress);
|
||||
|
|
|
|||
Loading…
Reference in a new issue