Error box, download button, editor save and more.

Former-commit-id: c14972384cc8afad28d49388b0b4545669e20b7d [formerly 0af2e5f9aff2aac576044ca9590045f656fbffda] [formerly 02248a86b7063e1c9d6779c3574a848708ff86f2 [formerly efaa8439a9dbbf9b829cf9fc32ca789c2a16df7d]]
Former-commit-id: 4ce0a81ea04b56cef11d62107d692502e266a16e [formerly 2c46db9398c267351c10f06c089ed08dc3625232]
Former-commit-id: 1c93a0643217ab69668600b41e2d8263266d7e23
This commit is contained in:
Henrique Dias
2017-07-06 14:40:06 +01:00
parent 7def1b2325
commit 0012601652
14 changed files with 180 additions and 102 deletions

View File

@@ -36,8 +36,7 @@ export default {
})
.catch(error => {
buttons.done('delete')
// TODO: show error in prompt
console.log(error)
this.$store.commit('showError', error)
})
return
@@ -63,7 +62,7 @@ export default {
console.log(error)
this.$store.commit('setReload', true)
buttons.done('delete')
// TODO: show error in prompt
this.$store.commit('showError', error)
})
}
}

View File

@@ -2,9 +2,9 @@
<div class="prompt error">
<i class="material-icons">error_outline</i>
<h3>Something went wrong</h3>
<pre>{{ error }}</pre>
<pre>{{ $store.state.showMessage }}</pre>
<div>
<button @click="$store.commit('closeHovers')" autofocus>Close</button>
<button @click="close" autofocus>Close</button>
<button @click="reportIssue" class="cancel">Report Issue</button>
</div>
</div>
@@ -13,10 +13,12 @@
<script>
export default {
name: 'error',
props: ['error'],
methods: {
reportIssue () {
window.open('https://github.com/hacdias/filemanager/issues/new')
},
close () {
this.$store.commit('closeHovers')
}
}
}

View File

@@ -81,10 +81,9 @@ export default {
buttons.done('move')
this.$router.push({page: dest})
})
.catch(e => {
.catch(error => {
buttons.done('move')
// TODO: show error in prompt
console.log(e)
this.$store.commit('showError', error)
})
},
next: function (event) {

View File

@@ -39,8 +39,7 @@ export default {
this.$router.push({ path: uri })
})
.catch(error => {
// TODO: Show error message!
console.log(error)
this.$store.commit('showError', error)
})
this.$store.commit('closeHovers')

View File

@@ -39,8 +39,7 @@ export default {
this.$router.push({ path: uri })
})
.catch(error => {
// TODO: show error message in a box
console.log(error)
this.$store.commit('showError', error)
})
this.$store.commit('closeHovers')

View File

@@ -61,8 +61,7 @@ export default {
// TODO: keep selected after reload?
this.$store.commit('setReload', true)
}).catch(error => {
// TODO: show error message
console.log(error)
this.$store.commit('showError', error)
})
this.$store.commit('closeHovers')