mirror of
https://github.com/w0rng/amnezia-wg-easy.git
synced 2025-04-26 13:20:11 +03:00
allow edit of name + address
This commit is contained in:
parent
2966666cc6
commit
016382dd01
11 changed files with 221 additions and 205 deletions
|
@ -17,6 +17,10 @@ new Vue({
|
|||
clientDelete: null,
|
||||
clientCreate: null,
|
||||
clientCreateName: '',
|
||||
clientEditName: null,
|
||||
clientEditNameId: null,
|
||||
clientEditAddress: null,
|
||||
clientEditAddressId: null,
|
||||
qrcode: null,
|
||||
},
|
||||
methods: {
|
||||
|
@ -101,6 +105,16 @@ new Vue({
|
|||
.catch(err => alert(err.message || err.toString()))
|
||||
.finally(() => this.refresh().catch(console.error));
|
||||
},
|
||||
updateClientName(client, name) {
|
||||
this.api.updateClientName({ clientId: client.id, name })
|
||||
.catch(err => alert(err.message || err.toString()))
|
||||
.finally(() => this.refresh().catch(console.error));
|
||||
},
|
||||
updateClientAddress(client, address) {
|
||||
this.api.updateClientAddress({ clientId: client.id, address })
|
||||
.catch(err => alert(err.message || err.toString()))
|
||||
.finally(() => this.refresh().catch(console.error));
|
||||
},
|
||||
},
|
||||
filters: {
|
||||
timeago: value => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue