diff --git a/src/www/index.html b/src/www/index.html index 72044728..cbe8b4ff 100644 --- a/src/www/index.html +++ b/src/www/index.html @@ -226,6 +226,31 @@
+ + + + + + {{client.address6}} + + + + + + + + +
diff --git a/src/www/js/api.js b/src/www/js/api.js index 356164c5..27796f92 100644 --- a/src/www/js/api.js +++ b/src/www/js/api.js @@ -138,4 +138,12 @@ class API { }); } + async updateClientAddress6({ clientId, address6 }) { + return this.call({ + method: 'put', + path: `/wireguard/client/${clientId}/address6/`, + body: { address6 }, + }); + } + } diff --git a/src/www/js/app.js b/src/www/js/app.js index 6745f698..025f1a57 100644 --- a/src/www/js/app.js +++ b/src/www/js/app.js @@ -63,6 +63,8 @@ new Vue({ clientEditNameId: null, clientEditAddress: null, clientEditAddressId: null, + clientEditAddress6: null, + clientEditAddress6Id: null, qrcode: null, currentRelease: null, @@ -299,6 +301,11 @@ new Vue({ .catch((err) => alert(err.message || err.toString())) .finally(() => this.refresh().catch(console.error)); }, + updateClientAddress6(client, address6) { + this.api.updateClientAddress6({ clientId: client.id, address6 }) + .catch((err) => alert(err.message || err.toString())) + .finally(() => this.refresh().catch(console.error)); + }, toggleTheme() { const themes = ['light', 'dark', 'auto']; const currentIndex = themes.indexOf(this.uiTheme);