mirror of
https://github.com/Lissy93/dashy.git
synced 2026-01-02 22:13:17 +01:00
added toggle disable web search function (in conf.yml and a ui button)
This commit is contained in:
parent
7eb5089bea
commit
c05d5d4f91
3 changed files with 130 additions and 41 deletions
|
|
@ -7,6 +7,17 @@
|
|||
<div class="options-outer">
|
||||
<div :class="`options-container ${!settingsVisible ? 'hide' : ''}`">
|
||||
<ThemeSelector />
|
||||
<div style="display: flex; align-items: center; margin-left: 1rem;">
|
||||
<label for="disable-web-search-toggle" style="margin-right: 0.5rem;">
|
||||
Disable Web Search
|
||||
</label>
|
||||
<input
|
||||
id="disable-web-search-toggle"
|
||||
type="checkbox"
|
||||
:checked="appConfig.webSearch && appConfig.webSearch.disableWebSearch"
|
||||
@change="toggleDisableWebSearch($event)"
|
||||
/>
|
||||
</div>
|
||||
<LayoutSelector :displayLayout="$store.getters.layout" />
|
||||
<ItemSizeSelector :iconSize="iconSize" />
|
||||
<ConfigLauncher />
|
||||
|
|
@ -97,6 +108,21 @@ export default {
|
|||
this.settingsVisible = this.getSettingsVisibility();
|
||||
},
|
||||
methods: {
|
||||
// Toggle the disableWebSearch setting
|
||||
toggleDisableWebSearch(event) {
|
||||
const value = event.target.checked;
|
||||
// Clone appConfig to avoid direct mutation
|
||||
const newAppConfig = {
|
||||
...this.appConfig,
|
||||
webSearch: {
|
||||
...this.appConfig.webSearch,
|
||||
disableWebSearch: value,
|
||||
},
|
||||
};
|
||||
this.$store.commit('setDisableWebSearch', value);
|
||||
// Optionally update the full appConfig in store for reactivity
|
||||
this.$store.commit('SET_APP_CONFIG', newAppConfig);
|
||||
},
|
||||
/* Emit event to begin/ continue searching */
|
||||
userIsTypingSomething(something) {
|
||||
this.$emit('user-is-searchin', something);
|
||||
|
|
|
|||
|
|
@ -232,6 +232,11 @@ const store = new Vuex.Store({
|
|||
state.config = newConfig;
|
||||
InfoHandler('Sections updated', InfoKeys.EDITOR);
|
||||
},
|
||||
// Dynamically update disableWebSearch in appConfig
|
||||
setDisableWebSearch(state, value) {
|
||||
if (!state.config.appConfig) state.config.appConfig = {};
|
||||
state.config.appConfig.disableWebSearch = value;
|
||||
},
|
||||
[UPDATE_SECTION](state, payload) {
|
||||
const { sectionIndex, sectionData } = payload;
|
||||
const newConfig = { ...state.config };
|
||||
|
|
|
|||
|
|
@ -1,47 +1,105 @@
|
|||
---
|
||||
# Page meta info, like heading, footer text and nav links
|
||||
pageInfo:
|
||||
title: Dashy
|
||||
description: Welcome to your new dashboard!
|
||||
navLinks:
|
||||
- title: GitHub
|
||||
path: https://github.com/Lissy93/dashy
|
||||
- title: Documentation
|
||||
path: https://dashy.to/docs
|
||||
|
||||
# Optional app settings and configuration
|
||||
- title: GitHub
|
||||
path: https://github.com/Lissy93/dashy
|
||||
- title: Documentation
|
||||
path: https://dashy.to/docs
|
||||
appConfig:
|
||||
theme: colorful
|
||||
|
||||
# Main content - An array of sections, each containing an array of items
|
||||
theme: dracula
|
||||
layout: vertical
|
||||
iconSize: medium
|
||||
webSearch:
|
||||
disableWebSearch: false
|
||||
sections:
|
||||
- name: Getting Started
|
||||
icon: fas fa-rocket
|
||||
items:
|
||||
- title: Dashy Live
|
||||
description: Development a project management links for Dashy
|
||||
icon: https://i.ibb.co/qWWpD0v/astro-dab-128.png
|
||||
url: https://live.dashy.to/
|
||||
target: newtab
|
||||
- title: GitHub
|
||||
description: Source Code, Issues and Pull Requests
|
||||
url: https://github.com/lissy93/dashy
|
||||
icon: favicon
|
||||
- title: Docs
|
||||
description: Configuring & Usage Documentation
|
||||
provider: Dashy.to
|
||||
icon: far fa-book
|
||||
url: https://dashy.to/docs
|
||||
- title: Showcase
|
||||
description: See how others are using Dashy
|
||||
url: https://github.com/Lissy93/dashy/blob/master/docs/showcase.md
|
||||
icon: far fa-grin-hearts
|
||||
- title: Config Guide
|
||||
description: See full list of configuration options
|
||||
url: https://github.com/Lissy93/dashy/blob/master/docs/configuring.md
|
||||
icon: fas fa-wrench
|
||||
- title: Support
|
||||
description: Get help with Dashy, raise a bug, or get in contact
|
||||
url: https://github.com/Lissy93/dashy/blob/master/.github/SUPPORT.md
|
||||
icon: far fa-hands-helping
|
||||
|
||||
- name: Getting Started
|
||||
icon: fas fa-rocket
|
||||
items:
|
||||
- title: Dashy Live
|
||||
description: Development a project management links for Dashy
|
||||
icon: https://i.ibb.co/qWWpD0v/astro-dab-128.png
|
||||
url: https://live.dashy.to/
|
||||
target: newtab
|
||||
id: 0_1481_dashylive
|
||||
- title: GitHub
|
||||
description: Source Code, Issues and Pull Requests
|
||||
url: https://github.com/lissy93/dashy
|
||||
icon: favicon
|
||||
id: 1_1481_github
|
||||
- title: Docs
|
||||
description: Configuring & Usage Documentation
|
||||
provider: Dashy.to
|
||||
icon: far fa-book
|
||||
url: https://dashy.to/docs
|
||||
id: 2_1481_docs
|
||||
- title: Showcase
|
||||
description: See how others are using Dashy
|
||||
url: https://github.com/Lissy93/dashy/blob/master/docs/showcase.md
|
||||
icon: far fa-grin-hearts
|
||||
id: 3_1481_showcase
|
||||
- title: Config Guide
|
||||
description: See full list of configuration options
|
||||
url: https://github.com/Lissy93/dashy/blob/master/docs/configuring.md
|
||||
icon: fas fa-wrench
|
||||
id: 4_1481_configguide
|
||||
- title: Support
|
||||
description: Get help with Dashy, raise a bug, or get in contact
|
||||
url: https://github.com/Lissy93/dashy/blob/master/.github/SUPPORT.md
|
||||
icon: far fa-hands-helping
|
||||
id: 5_1481_support
|
||||
- title: Godot Game GitHub
|
||||
description: Source Code, Issues and Pull Requests for the Godot Game
|
||||
icon: https://i.ibb.co/KjDYYzYD/godot-icon.png
|
||||
url: https://github.com/aspenyang/godot_roughlite
|
||||
target: newtab
|
||||
tags:
|
||||
- github
|
||||
- projects
|
||||
id: 6_1481_godotgamegithub
|
||||
- title: moodle
|
||||
url: https://elearn.waikato.ac.nz/my/courses.php
|
||||
target: newtab
|
||||
tags:
|
||||
- uow
|
||||
id: 7_1481_moodle
|
||||
- title: LinkedIn
|
||||
url: https://www.linkedin.com/feed
|
||||
target: newtab
|
||||
tags:
|
||||
- job
|
||||
id: 8_1481_linkedin
|
||||
- title: Seek
|
||||
url: https://www.seek.co.nz/
|
||||
target: newtab
|
||||
tags:
|
||||
- job
|
||||
id: 9_1481_seek
|
||||
- title: University of Waikato Homepage
|
||||
description: Uni Homepage
|
||||
url: https://www.waikato.ac.nz/
|
||||
target: newtab
|
||||
id: 10_1481_universityofwaikatohomepage
|
||||
- name: New Section
|
||||
displayData:
|
||||
sortBy: default
|
||||
rows: 1
|
||||
cols: 1
|
||||
collapsed: false
|
||||
hideForGuests: false
|
||||
items:
|
||||
- title: Uni Key Dates
|
||||
description: Key dates
|
||||
url: https://www.waikato.ac.nz/study/key-university-dates/
|
||||
target: newtab
|
||||
tags:
|
||||
- uow
|
||||
- ad
|
||||
- adc
|
||||
- ab
|
||||
- bc
|
||||
- school
|
||||
- ddd
|
||||
- eee
|
||||
- ggg
|
||||
id: 0_1055_unikeydates
|
||||
|
|
|
|||
Loading…
Reference in a new issue