mirror of
https://github.com/filebrowser/filebrowser.git
synced 2024-06-07 23:00:43 +00:00
Put some getters function in their scope
This commit is contained in:
parent
ae28c3cfa9
commit
f0e9b2a633
@ -22,7 +22,7 @@ import Download from './Download'
|
||||
import Move from './Move'
|
||||
import NewFile from './NewFile'
|
||||
import NewDir from './NewDir'
|
||||
import {mapGetters, mapState} from 'vuex'
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'prompts',
|
||||
@ -38,17 +38,15 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapState(['prompt']),
|
||||
...mapGetters([
|
||||
'showOverlay',
|
||||
'showInfo',
|
||||
'showHelp',
|
||||
'showDelete',
|
||||
'showRename',
|
||||
'showMove',
|
||||
'showNewFile',
|
||||
'showNewDir',
|
||||
'showDownload'
|
||||
])
|
||||
showInfo: function () { return this.prompt === 'info' },
|
||||
showHelp: function () { return this.prompt === 'help' },
|
||||
showDelete: function () { return this.prompt === 'delete' },
|
||||
showRename: function () { return this.prompt === 'rename' },
|
||||
showMove: function () { return this.prompt === 'move' },
|
||||
showNewFile: function () { return this.prompt === 'newFile' },
|
||||
showNewDir: function () { return this.prompt === 'newDir' },
|
||||
showDownload: function () { return this.prompt === 'download' },
|
||||
showOverlay: function () { return this.prompt !== null }
|
||||
},
|
||||
methods: {
|
||||
resetPrompts () {
|
||||
|
@ -1,13 +1,4 @@
|
||||
const getters = {
|
||||
showInfo: state => (state.prompt === 'info'),
|
||||
showHelp: state => (state.prompt === 'help'),
|
||||
showDelete: state => (state.prompt === 'delete'),
|
||||
showRename: state => (state.prompt === 'rename'),
|
||||
showMove: state => (state.prompt === 'move'),
|
||||
showNewFile: state => (state.prompt === 'newFile'),
|
||||
showNewDir: state => (state.prompt === 'newDir'),
|
||||
showDownload: state => (state.prompt === 'download'),
|
||||
showOverlay: state => (state.prompt !== null),
|
||||
selectedCount: state => state.selected.length
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user