mirror of
https://github.com/filebrowser/filebrowser.git
synced 2024-06-07 23:00:43 +00:00
Add Error prompt
Former-commit-id: ac75b90cefc3fc0c3e218e25b9af0293929251d8 [formerly fd3edcdc810da676212ff074d67ba3b359809f13] [formerly 0657c60399c1084665a8e2e8dd128d823eb4389c [formerly 5b3b5aecaf
]]
Former-commit-id: 1b2fd9847dd0914c1d92558db35b0581e679627c [formerly fb35e2a1d0ef76f0008694b1fbca90afe149d4b4]
Former-commit-id: 0348afb904b3dada892d7b22868266d48e939d4d
This commit is contained in:
parent
d5cd86da97
commit
cfc988b84b
@ -10,6 +10,7 @@
|
||||
"lint": "eslint --ext .js,.vue src"
|
||||
},
|
||||
"dependencies": {
|
||||
"codemirror": "^5.27.4",
|
||||
"filesize": "^3.5.10",
|
||||
"hammerjs": "^2.0.8",
|
||||
"moment": "^2.18.1",
|
||||
|
@ -171,6 +171,7 @@ export default {
|
||||
},
|
||||
created () {
|
||||
this.fetchData()
|
||||
this.$store.commit('showHover', 'error')
|
||||
},
|
||||
watch: {
|
||||
'$route': 'fetchData',
|
||||
|
23
_assets/src/components/prompts/Error.vue
Normal file
23
_assets/src/components/prompts/Error.vue
Normal file
@ -0,0 +1,23 @@
|
||||
<template>
|
||||
<div class="prompt error">
|
||||
<i class="material-icons">error_outline</i>
|
||||
<h3>Something went wrong</h3>
|
||||
<pre>{{ error }}</pre>
|
||||
<div>
|
||||
<button @click="$store.commit('closeHovers')" autofocus>Close</button>
|
||||
<button @click="reportIssue" class="cancel">Report Issue</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'error',
|
||||
props: ['error'],
|
||||
methods: {
|
||||
reportIssue () {
|
||||
window.open('https://github.com/hacdias/filemanager/issues/new')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
@ -8,6 +8,7 @@
|
||||
<delete v-else-if="showDelete"></delete>
|
||||
<info v-else-if="showInfo"></info>
|
||||
<move v-else-if="showMove"></move>
|
||||
<error v-else-if="showError"></error>
|
||||
|
||||
<div v-show="showOverlay" @click="resetPrompts" class="overlay"></div>
|
||||
</div>
|
||||
@ -20,6 +21,7 @@ import Delete from './Delete'
|
||||
import Rename from './Rename'
|
||||
import Download from './Download'
|
||||
import Move from './Move'
|
||||
import Error from './Error'
|
||||
import NewFile from './NewFile'
|
||||
import NewDir from './NewDir'
|
||||
import { mapState } from 'vuex'
|
||||
@ -30,6 +32,7 @@ export default {
|
||||
Info,
|
||||
Delete,
|
||||
Rename,
|
||||
Error,
|
||||
Download,
|
||||
Move,
|
||||
NewFile,
|
||||
@ -38,6 +41,7 @@ export default {
|
||||
},
|
||||
computed: {
|
||||
...mapState(['show']),
|
||||
showError: function () { return this.show === 'error' },
|
||||
showInfo: function () { return this.show === 'info' },
|
||||
showHelp: function () { return this.show === 'help' },
|
||||
showDelete: function () { return this.show === 'delete' },
|
||||
|
@ -17,10 +17,10 @@
|
||||
z-index: 99999;
|
||||
background: #fff;
|
||||
height: 100%;
|
||||
width: 13em;
|
||||
width: 16em;
|
||||
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
|
||||
transition: .1s ease left;
|
||||
left: -14em;
|
||||
left: -17em;
|
||||
}
|
||||
nav.active {
|
||||
left: 0;
|
||||
|
@ -64,6 +64,22 @@
|
||||
background-color: #e9eaeb;
|
||||
}
|
||||
|
||||
.prompt.error i {
|
||||
color: #F44336;
|
||||
display: block;
|
||||
margin: 0 auto .15em;
|
||||
text-align: center;
|
||||
font-size: 5em;
|
||||
}
|
||||
|
||||
.prompt.error h3 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.prompt.error button:not(.cancel) {
|
||||
background-color: #F44336
|
||||
}
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * *
|
||||
* PROMPT - MOVE *
|
||||
|
Loading…
Reference in New Issue
Block a user