Prettier success messages

This commit is contained in:
Henrique Dias committed 2017-07-08 14:43:08 +01:00
1 parent 338e73a8b2
commit bb116fe5b0
10 files changed
+116 -52

No files matched your search

@@ -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' },
+20
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>