fix version mobile hidden connection on mobile

pull/947/head
3thibaut1304 2025-07-02 14:11:34 +02:00
parent 2d7b8e3eef
commit 000b076ca0
2 changed files with 8 additions and 2 deletions

View File

@ -650,7 +650,7 @@ This service displays info about the total number of disk passed and failed S.M.
## SFTPGo
This service displays a version string instead of a subtitle.
And this service display the number of active connections
And this service display the number of active connections is hidden on small screen.
The indicator shows SFTPGo is online, offline. Example configuration:
```yaml

View File

@ -8,7 +8,7 @@
</template>
<template v-else>
<span v-if="versionstring">Version {{ versionstring }}</span>
<span v-if="activeConnections !== null">
<span v-if="activeConnections !== null && !this.showUpdateAvailable">
Active connections: {{ activeConnections }}
</span>
</template>
@ -40,11 +40,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.sftpgo_api_key) {