diff --git a/frontend/src/components/prompts/Prompts.vue b/frontend/src/components/prompts/Prompts.vue index 529f79c3..8e530a27 100644 --- a/frontend/src/components/prompts/Prompts.vue +++ b/frontend/src/components/prompts/Prompts.vue @@ -1,16 +1,6 @@ @@ -56,16 +46,23 @@ export default { }, computed: { ...mapState(['show', 'plugins']), - 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' }, - showCopy: function () { return this.show === 'copy' }, - showNewFile: function () { return this.show === 'newFile' }, - showNewDir: function () { return this.show === 'newDir' }, - showDownload: function () { return this.show === 'download' }, - showReplace: function () { return this.show === 'replace' }, + currentComponent: function () { + const matched = [ + 'info', + 'help', + 'delete', + 'rename', + 'move', + 'copy', + 'newFile', + 'newDir', + 'download', + 'replace', + 'share' + ].indexOf(this.show) >= 0; + + return matched && this.show || null; + }, showOverlay: function () { return (this.show !== null && this.show !== 'search' && this.show !== 'more') }