mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 16:22:14 +00:00
added Toggle Grid/List View into the spotlight
This commit is contained in:
@@ -99,6 +99,7 @@
|
||||
<maximize2-icon v-if="result.action.value === 'full-screen-mode'" size="18" class="vue-feather text-theme"/>
|
||||
<power-icon v-if="result.action.value === 'log-out'" size="18" class="vue-feather text-theme"/>
|
||||
<trash-icon v-if="result.action.value === 'empty-trash'" size="18" class="vue-feather text-theme"/>
|
||||
<grid-icon v-if="result.action.value === 'toggle-grid-list'" size="18" class="vue-feather text-theme"/>
|
||||
|
||||
<b class="font-bold text-sm ml-3.5">
|
||||
{{ result.title }}
|
||||
@@ -187,6 +188,7 @@
|
||||
|
||||
<script>
|
||||
import {
|
||||
GridIcon,
|
||||
Maximize2Icon,
|
||||
ArrowDownIcon,
|
||||
ArrowUpIcon,
|
||||
@@ -225,6 +227,7 @@ import axios from "axios"
|
||||
export default {
|
||||
name: 'Spotlight',
|
||||
components: {
|
||||
GridIcon,
|
||||
CategoryName,
|
||||
FilterSuggestion,
|
||||
Maximize2Icon,
|
||||
@@ -424,6 +427,13 @@ export default {
|
||||
]
|
||||
|
||||
let functionList = [
|
||||
{
|
||||
title: this.$t('Toggle Grid/List View'),
|
||||
action: {
|
||||
type: 'function',
|
||||
value: 'toggle-grid-list',
|
||||
},
|
||||
},
|
||||
{
|
||||
title: this.$t('Toggle Dark/Light Mode'),
|
||||
action: {
|
||||
@@ -564,6 +574,10 @@ export default {
|
||||
|
||||
if (arg.action.type === 'function') {
|
||||
|
||||
if (arg.action.value === 'toggle-grid-list') {
|
||||
this.$store.dispatch('togglePreviewType')
|
||||
}
|
||||
|
||||
if (arg.action.value === 'dark-mode') {
|
||||
this.$store.dispatch('toggleDarkMode', !this.isDarkMode)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user