Disable update available on small screen

pull/946/head
3thibaut1304 2025-07-02 12:15:01 +02:00
parent 11c9a7a58a
commit 2437872bc8
1 changed files with 8 additions and 2 deletions

View File

@ -8,8 +8,8 @@
</template>
<template v-else-if="versionstring">
Version {{ versionstring }}
<span v-if="updateAvailable"> </span>
<span v-if="updateAvailable" style="color: orange; font-weight: 500;">
<span v-if="updateAvailable && !this.showUpdateAvailable"> </span>
<span v-if="updateAvailable && !this.showUpdateAvailable" :class="{ 'is-active': showMenu }" style="color: orange; font-weight: 500;">
Update available {{ latestVersion }}
</span>
</template>
@ -43,11 +43,17 @@ export default {
status: function () {
return this.fetchOk ? "online" : "offline";
},
showUpdateAvailable: function () {
return this.isSmallScreenMethod();
},
},
created() {
this.fetchStatus();
},
methods: {
isSmallScreenMethod: function () {
return window.matchMedia("screen and (max-width: 1023px)").matches;
},
fetchStatus: async function () {
let headers = {};
if (this.item.basic_auth) {