spotlight functions indexing

This commit is contained in:
Čarodej
2021-12-14 17:14:02 +01:00
parent 342d07126a
commit 86eee2f533
10 changed files with 138 additions and 26 deletions

View File

@@ -365,6 +365,24 @@ const actions = {
commit('CLIPBOARD_CLEAR')
})
.catch(() => Vue.prototype.$isSomethingWrong())
},
emptyTrashQuietly: ({commit, getters}) => {
axios
.post(getters.api + '/trash/dump', {
_method: 'delete'
})
.then(() => {
if (router.currentRoute.name === 'Trash') {
commit('LOADING_STATE', {loading: false, data: []})
}
events.$emit('toaster', {
type: 'success',
message: i18n.t('Your trash was successfully cleared.'),
})
})
.catch(() => Vue.prototype.$isSomethingWrong())
}
}