mirror of
https://github.com/filebrowser/filebrowser.git
synced 2025-05-09 11:42:57 +00:00

Former-commit-id: 7f53f2d0bf85480da75cbe2e531974ff326822a0 [formerly 2b7831c74b1706129af650f44090f9a47ce9043f] [formerly 821f8f04828c4ad0c4cbb84f905e546174e77a85 [formerly bb116fe5b0fd5218416131eae862fc9b9d59badd]] Former-commit-id: 547f74a1050f931d5ad27a49997ee9d34bb04b6d [formerly 93b0c22338244580f93d58263e7cdb36b269e18c] Former-commit-id: 7e12765f9fb423f81c6cc20981ea70a48e04a6f8
47 lines
1.2 KiB
JavaScript
47 lines
1.2 KiB
JavaScript
const mutations = {
|
|
closeHovers: state => {
|
|
state.show = null
|
|
state.showMessage = null
|
|
},
|
|
showHover: (state, value) => {
|
|
if (typeof value !== 'object') {
|
|
state.show = value
|
|
return
|
|
}
|
|
|
|
state.show = value.prompt
|
|
state.showMessage = value.message
|
|
},
|
|
showError: (state, value) => {
|
|
state.show = 'error'
|
|
state.showMessage = value
|
|
},
|
|
showSuccess: (state, value) => {
|
|
state.show = 'success'
|
|
state.showMessage = value
|
|
},
|
|
setLoading: (state, value) => { state.loading = value },
|
|
setReload: (state, value) => { state.reload = value },
|
|
setUser: (state, value) => (state.user = value),
|
|
setUserCSS: (state, value) => (state.user.css = value),
|
|
setJWT: (state, value) => (state.jwt = value),
|
|
multiple: (state, value) => (state.multiple = value),
|
|
addSelected: (state, value) => (state.selected.push(value)),
|
|
removeSelected: (state, value) => {
|
|
let i = state.selected.indexOf(value)
|
|
if (i === -1) return
|
|
state.selected.splice(i, 1)
|
|
},
|
|
resetSelected: (state) => {
|
|
state.selected = []
|
|
},
|
|
listingDisplay: (state, value) => {
|
|
state.req.display = value
|
|
},
|
|
updateRequest: (state, value) => {
|
|
state.req = value
|
|
}
|
|
}
|
|
|
|
export default mutations
|