Enhancement: support breaking changes in wg-easy v15 (#5343)
Docker CI / Linting Checks (push) Waiting to run
Docker CI / Docker Build & Push (push) Blocked by required conditions

This commit is contained in:
shamoon
2025-05-31 22:08:49 -07:00
committed by GitHub
parent 35be5559b3
commit 524cb7695c
5 changed files with 21 additions and 3 deletions
+3 -1
View File
@@ -6,7 +6,9 @@ import useWidgetAPI from "utils/proxy/use-widget-api";
export default function Component({ service }) {
const { widget } = service;
const { data: infoData, error: infoError } = useWidgetAPI(widget, "client");
const endpoint = widget.version === 2 ? "clientv2" : "client";
const { data: infoData, error: infoError } = useWidgetAPI(widget, endpoint);
if (!widget.fields) {
widget.fields = ["connected", "enabled", "total"];
+3
View File
@@ -8,6 +8,9 @@ const widget = {
client: {
endpoint: "wireguard/client",
},
clientv2: {
endpoint: "client",
},
},
};