Browse Source

add missing ui functions

pull/1202/head
Bernd Storath 2 years ago
parent
commit
6f01f28026
No known key found for this signature in database GPG Key ID: D6C85685A555540F
  1. 8
      src/www/js/api.js
  2. 5
      src/www/js/app.js

8
src/www/js/api.js

@ -138,6 +138,14 @@ class API {
});
}
async updateClientAddress6({ clientId, address6 }) {
return this.call({
method: 'put',
path: `/wireguard/client/${clientId}/address6/`,
body: { address6 },
});
}
async restoreConfiguration(file) {
return this.call({
method: 'put',

5
src/www/js/app.js

@ -301,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));
},
restoreConfig(e) {
e.preventDefault();
const file = e.currentTarget.files.item(0);

Loading…
Cancel
Save