mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
update ViewLockOverlay to receive ReconnectingDisplay and use reconnection in SystemUpdate
This commit is contained in:
parent
c259a97a74
commit
335d38bd5d
2 changed files with 11 additions and 4 deletions
|
@ -2,7 +2,7 @@
|
||||||
<b-overlay
|
<b-overlay
|
||||||
variant="white" opacity="0.75"
|
variant="white" opacity="0.75"
|
||||||
no-center
|
no-center
|
||||||
:show="waiting || error !== null"
|
:show="waiting || reconnecting || error !== null"
|
||||||
>
|
>
|
||||||
<slot name="default" />
|
<slot name="default" />
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import { ErrorDisplay, WarningDisplay, WaitingDisplay } from '@/views/_partials'
|
import { ErrorDisplay, WarningDisplay, WaitingDisplay, ReconnectingDisplay } from '@/views/_partials'
|
||||||
import QueryHeader from '@/components/QueryHeader'
|
import QueryHeader from '@/components/QueryHeader'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
@ -30,18 +30,22 @@ export default {
|
||||||
ErrorDisplay,
|
ErrorDisplay,
|
||||||
WarningDisplay,
|
WarningDisplay,
|
||||||
WaitingDisplay,
|
WaitingDisplay,
|
||||||
|
ReconnectingDisplay,
|
||||||
QueryHeader
|
QueryHeader
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(['waiting', 'error', 'currentRequest']),
|
...mapGetters(['waiting', 'reconnecting', 'error', 'currentRequest']),
|
||||||
|
|
||||||
component () {
|
component () {
|
||||||
const { error, currentRequest: request } = this
|
const { error, reconnecting, currentRequest: request } = this
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
return { name: 'ErrorDisplay', request: error }
|
return { name: 'ErrorDisplay', request: error }
|
||||||
} else if (request.showWarningMessage) {
|
} else if (request.showWarningMessage) {
|
||||||
return { name: 'WarningDisplay', request }
|
return { name: 'WarningDisplay', request }
|
||||||
|
} else if (reconnecting) {
|
||||||
|
return { name: 'ReconnectingDisplay' }
|
||||||
} else {
|
} else {
|
||||||
return { name: 'WaitingDisplay', request }
|
return { name: 'WaitingDisplay', request }
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,6 +102,9 @@ export default {
|
||||||
} else if (type === 'apps') {
|
} else if (type === 'apps') {
|
||||||
this.apps = null
|
this.apps = null
|
||||||
} else {
|
} else {
|
||||||
|
if (this.system.some(({ name }) => name.includes('yunohost'))) {
|
||||||
|
this.$store.dispatch('TRY_TO_RECONNECT')
|
||||||
|
}
|
||||||
this.system = null
|
this.system = null
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue