Don't hide all lists of namespaces when loosing network connectivity

This commit is contained in:
kolaente 2021-04-19 22:36:31 +02:00
parent 2d4ea80c90
commit 1a03c035f0
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
2 changed files with 7 additions and 5 deletions

View File

@ -1,6 +1,6 @@
<template>
<div>
<template v-if="online">
<div :class="{'is-hidden': !online}">
<!-- This is a workaround to get the sw to "see" the to-be-cached version of the offline background image -->
<div class="offline" style="height: 0;width: 0;"></div>
<top-navigation v-if="authUser"/>
@ -8,8 +8,8 @@
<content-link-share v-else-if="authLinkShare"/>
<content-no-auth v-else/>
<notification/>
</template>
<div class="app offline" v-else>
</div>
<div class="app offline" v-if="!online">
<div class="offline-message">
<h1>You are offline.</h1>
<p>Please check your network connection and try again.</p>

View File

@ -66,7 +66,7 @@
</span>
<namespace-settings-dropdown :namespace="n" v-if="n.id > 0"/>
</div>
<div :key="n.id + 'child'" class="more-container" v-if="listsVisible[n.id]">
<div :key="n.id + 'child'" class="more-container" v-if="typeof listsVisible[n.id] !== 'undefined' ? listsVisible[n.id] : true">
<ul class="menu-list can-be-hidden">
<template v-for="l in n.lists">
<!-- This is a bit ugly but vue wouldn't want to let me filter this - probably because the lists
@ -142,7 +142,9 @@ export default {
this.$store.dispatch('namespaces/loadNamespaces')
.then(namespaces => {
namespaces.forEach(n => {
this.$set(this.listsVisible, n.id, true)
if (typeof this.listsVisible[n.id] === 'undefined') {
this.$set(this.listsVisible, n.id, true)
}
})
})
},