0
0
mirror of https://github.com/vx3r/wg-gen-web.git synced 2024-11-04 17:31:17 +00:00

add tags to clients

This commit is contained in:
TheLD 2020-05-26 16:42:37 +02:00
parent 7e2146a229
commit ce7e90e034
2 changed files with 42 additions and 1 deletions

View File

@ -16,6 +16,7 @@ type Client struct {
PresharedKey string `json:"presharedKey"`
AllowedIPs []string `json:"allowedIPs"`
Address []string `json:"address"`
Tags []string `json:"tags"`
PrivateKey string `json:"privateKey"`
PublicKey string `json:"publicKey"`
CreatedBy string `json:"createdBy"`

View File

@ -255,7 +255,26 @@
</v-chip>
</template>
</v-combobox>

<v-combobox
v-model="client.tags"
chips
hint="Write tag name and hit enter"
label="Tags"
multiple
dark
>
<template v-slot:selection="{ attrs, item, select, selected }">
<v-chip
v-bind="attrs"
:input-value="selected"
close
@click="select"
@click:close="client.tags.splice(client.tags.indexOf(item), 1)"
>
<strong>{{ item }}</strong>&nbsp;
</v-chip>
</template>
</v-combobox>
<v-switch
v-model="client.enable"
color="red"
@ -360,6 +379,26 @@
</v-chip>
</template>
</v-combobox>
<v-combobox
v-model="client.tags"
chips
hint="Write tag name and hit enter"
label="Tags"
multiple
dark
>
<template v-slot:selection="{ attrs, item, select, selected }">
<v-chip
v-bind="attrs"
:input-value="selected"
close
@click="select"
@click:close="client.tags.splice(client.tags.indexOf(item), 1)"
>
<strong>{{ item }}</strong>&nbsp;
</v-chip>
</template>
</v-combobox>
<v-switch
v-model="client.ignorePersistentKeepalive"
color="red"
@ -451,6 +490,7 @@
enable: true,
allowedIPs: this.server.allowedips,
address: this.server.address,
tags: [],
}
this.dialogCreate = true;
},