Skip to content

Commit 34792f9

Browse files
committed
enh(status): also show connection issues as cloud_off
Signed-off-by: Max <max@nextcloud.com>
1 parent 6e5fd9d commit 34792f9

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/components/Editor/OfflineState.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,19 @@ export default {
3535
mixins: [refreshMoment],
3636
3737
props: {
38+
// 0 if there is a different connection issue than the browser being offline
3839
offlineSince: {
3940
type: Number,
40-
required: true,
41+
default: 0,
4142
},
4243
},
4344
4445
computed: {
4546
label() {
46-
return t('text', 'Offline since {time}', { time: this.offlineTime })
47+
if (this.offlineSince) {
48+
return t('text', 'Offline since {time}.', { time: this.offlineTime })
49+
}
50+
return t('text', 'Not connected to the cloud.')
4751
},
4852
offlineTime() {
4953
// Make this a dependent of refreshMoment, so it will be recomputed

src/components/Editor/Status.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
</NcButton>
2222
</div>
2323
<SessionList
24-
v-if="networkOnline"
24+
v-if="networkOnline && !hasConnectionIssue"
2525
:sessions="sessions">
2626
<p slot="lastSaved" class="last-saved">
2727
{{ t('text', 'Last saved') }}: {{ lastSavedString }}

0 commit comments

Comments
 (0)