From 61489077d7d5740250702c68846abae6a3598c6f Mon Sep 17 00:00:00 2001 From: MHSanaei Date: Sun, 18 Feb 2024 00:46:49 +0330 Subject: [wg] auto multi-peer and qrcode Co-Authored-By: Alireza Ahmadi --- web/html/common/qrcode_modal.html | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'web/html/common') diff --git a/web/html/common/qrcode_modal.html b/web/html/common/qrcode_modal.html index 3c4fd929..3bda4c29 100644 --- a/web/html/common/qrcode_modal.html +++ b/web/html/common/qrcode_modal.html @@ -35,12 +35,21 @@ this.client = client; this.subId = ''; this.qrcodes = []; - this.inbound.genAllLinks(this.dbInbound.remark, app.remarkModel, client).forEach(l => { - this.qrcodes.push({ - remark: l.remark, - link: l.link + if (this.inbound.protocol == Protocols.WIREGUARD){ + this.inbound.genInboundLinks(dbInbound.remark).split('\r\n').forEach((l,index) =>{ + this.qrcodes.push({ + remark: "Peer " + (index+1), + link: l + }); }); - }); + } else { + this.inbound.genAllLinks(this.dbInbound.remark, app.remarkModel, client).forEach(l => { + this.qrcodes.push({ + remark: l.remark, + link: l.link + }); + }); + } this.visible = true; }, close: function () { -- cgit v1.2.3