Prettier success messages

Former-commit-id: 7f53f2d0bf85480da75cbe2e531974ff326822a0 [formerly 2b7831c74b1706129af650f44090f9a47ce9043f] [formerly 821f8f04828c4ad0c4cbb84f905e546174e77a85 [formerly bb116fe5b0fd5218416131eae862fc9b9d59badd]]
Former-commit-id: 547f74a1050f931d5ad27a49997ee9d34bb04b6d [formerly 93b0c22338244580f93d58263e7cdb36b269e18c]
Former-commit-id: 7e12765f9fb423f81c6cc20981ea70a48e04a6f8
This commit is contained in:
Henrique Dias
2017-07-08 14:43:08 +01:00
parent a9e41695aa
commit ad500cc9c7
10 changed files with 116 additions and 52 deletions

View File

@@ -9,6 +9,7 @@
<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>
@@ -22,6 +23,7 @@ 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'
@@ -34,6 +36,7 @@ export default {
Rename,
Error,
Download,
Success,
Move,
NewFile,
NewDir,
@@ -42,6 +45,7 @@ export default {
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' },

View File

@@ -0,0 +1,20 @@
<template>
<div class="prompt success">
<i class="material-icons">done</i>
<h3>{{ $store.state.showMessage }}</h3>
<div>
<button @click="close" autofocus>OK</button>
</div>
</div>
</template>
<script>
export default {
name: 'success',
methods: {
close () {
this.$store.commit('closeHovers')
}
}
}
</script>