From 11c9a7a58a5f788d1a08cc5653d655a549ae3a68 Mon Sep 17 00:00:00 2001 From: 3thibaut1304 Date: Fri, 20 Jun 2025 21:53:47 +0200 Subject: [PATCH 1/4] feat: display version and update status for Wg-easy --- docs/customservices.md | 15 +++++ src/components/services/Wg-easy.vue | 101 ++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+) create mode 100644 src/components/services/Wg-easy.vue diff --git a/docs/customservices.md b/docs/customservices.md index c1f0812..d958160 100644 --- a/docs/customservices.md +++ b/docs/customservices.md @@ -56,6 +56,7 @@ within Homer: - [Uptime Kuma](#uptime-kuma) - [Vaultwarden](#vaultwarden) - [Wallabag](#wallabag) +- [Wg-easy](#wg-easy) - [What's Up Docker](#whats-up-docker) > [!IMPORTANT] @@ -762,6 +763,20 @@ This service displays a version string instead of a subtitle. Example configurat url: https://wallabag.example.com ``` +## Wg-easy + +This service displays a version string instead of a subtitle. +If a new version is available, it will also be shown alongside the current one. +The indicator shows if Wg-easy is online, offline. Example configuration: + +```yaml +- name: "Wireguard" + type: Wg-easy + logo: assets/tools/sample.png + url: http://wg-easy.example.com + basic_auth: "admin:password" +``` + ## What's up Docker What's up Docker allow to display info about the number of container running and the number for which an update is available on your Homer dashboard. diff --git a/src/components/services/Wg-easy.vue b/src/components/services/Wg-easy.vue new file mode 100644 index 0000000..6ddf5b6 --- /dev/null +++ b/src/components/services/Wg-easy.vue @@ -0,0 +1,101 @@ + + + + + From 2437872bc83fb2e357b0ac962d7dd9ef563b00a5 Mon Sep 17 00:00:00 2001 From: 3thibaut1304 Date: Wed, 2 Jul 2025 12:15:01 +0200 Subject: [PATCH 2/4] Disable update available on small screen --- src/components/services/Wg-easy.vue | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/services/Wg-easy.vue b/src/components/services/Wg-easy.vue index 6ddf5b6..eab32a4 100644 --- a/src/components/services/Wg-easy.vue +++ b/src/components/services/Wg-easy.vue @@ -8,8 +8,8 @@ @@ -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) { From b13231eb70970daecb4391f8c63fdf9d2e923649 Mon Sep 17 00:00:00 2001 From: 3thibaut1304 Date: Wed, 2 Jul 2025 12:16:51 +0200 Subject: [PATCH 3/4] update documentation with small screen --- docs/customservices.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/customservices.md b/docs/customservices.md index d958160..08d02a8 100644 --- a/docs/customservices.md +++ b/docs/customservices.md @@ -766,7 +766,7 @@ This service displays a version string instead of a subtitle. Example configurat ## Wg-easy This service displays a version string instead of a subtitle. -If a new version is available, it will also be shown alongside the current one. +If a new version is available, it will also be shown alongside the current one. Except on small screens. The indicator shows if Wg-easy is online, offline. Example configuration: ```yaml From 5943eb2dcb6d34e5b1d351b9c6b187a3c7a4171d Mon Sep 17 00:00:00 2001 From: 3thibaut1304 Date: Wed, 2 Jul 2025 12:25:44 +0200 Subject: [PATCH 4/4] fix english/french information (unknown) --- src/components/services/Wg-easy.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/services/Wg-easy.vue b/src/components/services/Wg-easy.vue index eab32a4..ebad577 100644 --- a/src/components/services/Wg-easy.vue +++ b/src/components/services/Wg-easy.vue @@ -63,7 +63,7 @@ export default { try { const response = await this.fetch("/api/information", { headers }); this.fetchOk = true; - this.versionstring = response.currentRelease || "inconnue"; + this.versionstring = response.currentRelease || "unknown"; this.updateAvailable = response.updateAvailable; this.latestVersion = response.latestRelease?.version || null; } catch (e) {