<div v-if="offline" class="offline-message">
<i class="far fa-dizzy"></i>
<h1>
- You're offline bro.
+ You're offline friend.
<span @click="checkOffline"> <i class="fas fa-redo-alt"></i></span>
</h1>
</div>
method: "HEAD",
cache: "no-store",
})
- .then(function () {
- that.offline = false;
+ .then(function (response) {
+ if (response.status >= 200 && response.status < 300) {
+ that.offline = false;
+ } else {
+ that.offline = true;
+ }
})
.catch(function () {
that.offline = true;
})
.finally(function () {
- that.$emit("network:status-update", that.offline);
+ that.$emit("network-status-update", that.offline);
});
},
},