diff --git a/model/client.go b/model/client.go index 4a40b279e8a20f9bd3ac35ad44add8bd30eb5893..07711d777c9fd04b301da34d85b216d6e568d42d 100644 --- a/model/client.go +++ b/model/client.go @@ -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"` diff --git a/ui/src/components/Clients.vue b/ui/src/components/Clients.vue index 16869bcc33bca726db100a2e59b39491c189c9fd..cfeaa8cbf52fca87e79337782e40a49d90f1f30e 100644 --- a/ui/src/components/Clients.vue +++ b/ui/src/components/Clients.vue @@ -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> + </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> + </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; },