Skip to content

Commit 000b076

Browse files
committed
fix version mobile hidden connection on mobile
1 parent 2d7b8e3 commit 000b076

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

docs/customservices.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ This service displays info about the total number of disk passed and failed S.M.
650650
## SFTPGo
651651

652652
This service displays a version string instead of a subtitle.
653-
And this service display the number of active connections
653+
And this service display the number of active connections is hidden on small screen.
654654
The indicator shows SFTPGo is online, offline. Example configuration:
655655

656656
```yaml

src/components/services/Sftpgo.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</template>
99
<template v-else>
1010
<span v-if="versionstring">Version {{ versionstring }}</span>
11-
<span v-if="activeConnections !== null">
11+
<span v-if="activeConnections !== null && !this.showUpdateAvailable">
1212
– Active connections: {{ activeConnections }}
1313
</span>
1414
</template>
@@ -40,11 +40,17 @@ export default {
4040
status: function () {
4141
return this.fetchOk ? "online" : "offline";
4242
},
43+
showUpdateAvailable: function () {
44+
return this.isSmallScreenMethod();
45+
},
4346
},
4447
created() {
4548
this.fetchStatus();
4649
},
4750
methods: {
51+
isSmallScreenMethod: function () {
52+
return window.matchMedia("screen and (max-width: 1023px)").matches;
53+
},
4854
fetchStatus: async function () {
4955
let headers = {};
5056
if (this.item.sftpgo_api_key) {

0 commit comments

Comments
 (0)