mirror of https://github.com/bastienwirtz/homer
Disable update available on small screen
parent
11c9a7a58a
commit
2437872bc8
|
@ -8,8 +8,8 @@
|
||||||
</template>
|
</template>
|
||||||
<template v-else-if="versionstring">
|
<template v-else-if="versionstring">
|
||||||
Version {{ versionstring }}
|
Version {{ versionstring }}
|
||||||
<span v-if="updateAvailable"> –</span>
|
<span v-if="updateAvailable && !this.showUpdateAvailable"> –</span>
|
||||||
<span v-if="updateAvailable" style="color: orange; font-weight: 500;">
|
<span v-if="updateAvailable && !this.showUpdateAvailable" :class="{ 'is-active': showMenu }" style="color: orange; font-weight: 500;">
|
||||||
Update available {{ latestVersion }}
|
Update available {{ latestVersion }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
@ -43,11 +43,17 @@ export default {
|
||||||
status: function () {
|
status: function () {
|
||||||
return this.fetchOk ? "online" : "offline";
|
return this.fetchOk ? "online" : "offline";
|
||||||
},
|
},
|
||||||
|
showUpdateAvailable: function () {
|
||||||
|
return this.isSmallScreenMethod();
|
||||||
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.fetchStatus();
|
this.fetchStatus();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
isSmallScreenMethod: function () {
|
||||||
|
return window.matchMedia("screen and (max-width: 1023px)").matches;
|
||||||
|
},
|
||||||
fetchStatus: async function () {
|
fetchStatus: async function () {
|
||||||
let headers = {};
|
let headers = {};
|
||||||
if (this.item.basic_auth) {
|
if (this.item.basic_auth) {
|
||||||
|
|
Loading…
Reference in New Issue