Former-commit-id: e79f1477c572712812bff35e889dcd40bdd4b53c [formerly b0bc8f1ca07a70c3677b835039c37e829a1bda37] [formerly d36856934e188cfd989977229c048b71dabd5a22 [formerly 1645a8830ec0a674f6684113a3058ba00ffcd88a]] Former-commit-id: f055189acbc2c0a431683c46d8662bc5c910663f [formerly 9e521e32ec949532dc7dce003534f5fe726254f7] Former-commit-id: 132cc78a5eda743ea6e1a3675442819ad87cbcf2
68 lines
1.9 KiB
Vue
68 lines
1.9 KiB
Vue
<template>
|
|
<div>
|
|
<help v-if="showHelp" ></help>
|
|
<download v-else-if="showDownload"></download>
|
|
<new-file v-else-if="showNewFile"></new-file>
|
|
<new-dir v-else-if="showNewDir"></new-dir>
|
|
<rename v-else-if="showRename"></rename>
|
|
<delete v-else-if="showDelete"></delete>
|
|
<info v-else-if="showInfo"></info>
|
|
<move v-else-if="showMove"></move>
|
|
<error v-else-if="showError"></error>
|
|
<success v-else-if="showSuccess"></success>
|
|
|
|
<div v-show="showOverlay" @click="resetPrompts" class="overlay"></div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import Help from './Help'
|
|
import Info from './Info'
|
|
import Delete from './Delete'
|
|
import Rename from './Rename'
|
|
import Download from './Download'
|
|
import Move from './Move'
|
|
import Error from './Error'
|
|
import Success from './Success'
|
|
import NewFile from './NewFile'
|
|
import NewDir from './NewDir'
|
|
import { mapState } from 'vuex'
|
|
|
|
export default {
|
|
name: 'prompts',
|
|
components: {
|
|
Info,
|
|
Delete,
|
|
Rename,
|
|
Error,
|
|
Download,
|
|
Success,
|
|
Move,
|
|
NewFile,
|
|
NewDir,
|
|
Help
|
|
},
|
|
computed: {
|
|
...mapState(['show']),
|
|
showError: function () { return this.show === 'error' },
|
|
showSuccess: function () { return this.show === 'success' },
|
|
showInfo: function () { return this.show === 'info' },
|
|
showHelp: function () { return this.show === 'help' },
|
|
showDelete: function () { return this.show === 'delete' },
|
|
showRename: function () { return this.show === 'rename' },
|
|
showMove: function () { return this.show === 'move' },
|
|
showNewFile: function () { return this.show === 'newFile' },
|
|
showNewDir: function () { return this.show === 'newDir' },
|
|
showDownload: function () { return this.show === 'download' },
|
|
showOverlay: function () {
|
|
return (this.show !== null && this.show !== 'search' && this.show !== 'more')
|
|
}
|
|
},
|
|
methods: {
|
|
resetPrompts () {
|
|
this.$store.commit('closeHovers')
|
|
}
|
|
}
|
|
}
|
|
</script>
|