added Toggle Grid/List View into the spotlight

This commit is contained in:
Čarodej
2022-01-06 15:05:45 +01:00
parent 31ec9b4fda
commit 86dac75071
8 changed files with 45 additions and 19 deletions

View File

@@ -999,10 +999,10 @@ const actions = {
// Change preview
commit('TOGGLE_NAVIGATION_BARS')
},
changePreviewType: ({commit, state}, preview) => {
togglePreviewType: ({commit, state}, preview) => {
// Get preview type
let previewType = preview
let previewType = preview || state.itemViewType === 'list' ? 'grid' : 'list'
// Store preview type to localStorage
localStorage.setItem('preview_type', previewType)