Former-commit-id: 229baefa76ee3202dcf4aac3249a461b6cc51eed [formerly 2773046c33eee1ff79ef1d02238de37e14860726] [formerly 2d50f10c3f809c6135cc861eaf0360092a23ea3f [formerly 14ff4f2b74c440888b632a6bacd338067dd0b588]] Former-commit-id: e766887e65390514cf827700c3ab0d5ed000c480 [formerly 7429be72884d3eb154e45dc638fd17dfcfdfaa62] Former-commit-id: d23373bf316295d6579e4bbc780f5b963c632c4d
60 lines
1.6 KiB
Vue
60 lines
1.6 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>
|
|
|
|
<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 NewFile from './NewFile'
|
|
import NewDir from './NewDir'
|
|
import { mapState } from 'vuex'
|
|
|
|
export default {
|
|
name: 'prompts',
|
|
components: {
|
|
Info,
|
|
Delete,
|
|
Rename,
|
|
Download,
|
|
Move,
|
|
NewFile,
|
|
NewDir,
|
|
Help
|
|
},
|
|
computed: {
|
|
...mapState(['show']),
|
|
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')
|
|
}
|
|
},
|
|
methods: {
|
|
resetPrompts () {
|
|
this.$store.commit('closeHovers')
|
|
}
|
|
}
|
|
}
|
|
</script>
|