Skip to content

Commit bdf568b

Browse files
committed
minor(modeling-commons): reload all data on restored connection
1 parent e4df1d2 commit bdf568b

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

apps/modeling-commons-frontend/app/components/shared/ConnectionBanner.vue

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535

3636
<script setup lang="ts">
3737
const { isOffline, checkNow } = useConnectionHealth();
38+
const toast = useToast();
3839
const checking = ref(false);
3940
4041
async function retry() {
@@ -45,4 +46,14 @@ async function retry() {
4546
checking.value = false;
4647
}
4748
}
49+
50+
watch(isOffline, (offline, wasOffline) => {
51+
if (wasOffline && !offline) {
52+
refreshNuxtData();
53+
toast.add({
54+
title: "Connection restored",
55+
icon: "i-lucide-wifi",
56+
});
57+
}
58+
});
4859
</script>

0 commit comments

Comments
 (0)