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
|
||||
variant="white" opacity="0.75"
|
||||
no-center
|
||||
:show="waiting || error !== null"
|
||||
:show="waiting || reconnecting || error !== null"
|
||||
>
|
||||
<slot name="default" />
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
|||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import { ErrorDisplay, WarningDisplay, WaitingDisplay } from '@/views/_partials'
|
||||
import { ErrorDisplay, WarningDisplay, WaitingDisplay, ReconnectingDisplay } from '@/views/_partials'
|
||||
import QueryHeader from '@/components/QueryHeader'
|
||||
|
||||
export default {
|
||||
|
@ -30,18 +30,22 @@ export default {
|
|||
ErrorDisplay,
|
||||
WarningDisplay,
|
||||
WaitingDisplay,
|
||||
ReconnectingDisplay,
|
||||
QueryHeader
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters(['waiting', 'error', 'currentRequest']),
|
||||
...mapGetters(['waiting', 'reconnecting', 'error', 'currentRequest']),
|
||||
|
||||
component () {
|
||||
const { error, currentRequest: request } = this
|
||||
const { error, reconnecting, currentRequest: request } = this
|
||||
|
||||
if (error) {
|
||||
return { name: 'ErrorDisplay', request: error }
|
||||
} else if (request.showWarningMessage) {
|
||||
return { name: 'WarningDisplay', request }
|
||||
} else if (reconnecting) {
|
||||
return { name: 'ReconnectingDisplay' }
|
||||
} else {
|
||||
return { name: 'WaitingDisplay', request }
|
||||
}
|
||||
|
|
|
@ -102,6 +102,9 @@ export default {
|
|||
} else if (type === 'apps') {
|
||||
this.apps = null
|
||||
} else {
|
||||
if (this.system.some(({ name }) => name.includes('yunohost'))) {
|
||||
this.$store.dispatch('TRY_TO_RECONNECT')
|
||||
}
|
||||
this.system = null
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue