mirror of
https://github.com/vx3r/wg-gen-web.git
synced 2024-12-18 00:13:23 +00:00
commit
34a06ad258
@ -16,6 +16,7 @@ type Client struct {
|
|||||||
PresharedKey string `json:"presharedKey"`
|
PresharedKey string `json:"presharedKey"`
|
||||||
AllowedIPs []string `json:"allowedIPs"`
|
AllowedIPs []string `json:"allowedIPs"`
|
||||||
Address []string `json:"address"`
|
Address []string `json:"address"`
|
||||||
|
Tags []string `json:"tags"`
|
||||||
PrivateKey string `json:"privateKey"`
|
PrivateKey string `json:"privateKey"`
|
||||||
PublicKey string `json:"publicKey"`
|
PublicKey string `json:"publicKey"`
|
||||||
CreatedBy string `json:"createdBy"`
|
CreatedBy string `json:"createdBy"`
|
||||||
|
@ -44,6 +44,17 @@
|
|||||||
{{ ip }}
|
{{ ip }}
|
||||||
</v-chip>
|
</v-chip>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-slot:item.tags="{ item }">
|
||||||
|
<v-chip
|
||||||
|
v-for="(tag, i) in item.tags"
|
||||||
|
:key="i"
|
||||||
|
color="blue-grey"
|
||||||
|
text-color="white"
|
||||||
|
>
|
||||||
|
<v-icon left>mdi-tag</v-icon>
|
||||||
|
{{ tag }}
|
||||||
|
</v-chip>
|
||||||
|
</template>
|
||||||
<template v-slot:item.created="{ item }">
|
<template v-slot:item.created="{ item }">
|
||||||
<v-row>
|
<v-row>
|
||||||
<p>At {{ item.created | formatDate }} by {{ item.createdBy }}</p>
|
<p>At {{ item.created | formatDate }} by {{ item.createdBy }}</p>
|
||||||
@ -122,6 +133,17 @@
|
|||||||
{{ ip }}
|
{{ ip }}
|
||||||
</v-chip>
|
</v-chip>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
|
<v-card-text class="text--primary">
|
||||||
|
<v-chip
|
||||||
|
v-for="(tag, i) in client.tags"
|
||||||
|
:key="i"
|
||||||
|
color="blue-grey"
|
||||||
|
text-color="white"
|
||||||
|
>
|
||||||
|
<v-icon left>mdi-tag</v-icon>
|
||||||
|
{{ tag }}
|
||||||
|
</v-chip>
|
||||||
|
</v-card-text>
|
||||||
<v-card-actions>
|
<v-card-actions>
|
||||||
<v-tooltip bottom>
|
<v-tooltip bottom>
|
||||||
<template v-slot:activator="{ on }">
|
<template v-slot:activator="{ on }">
|
||||||
@ -255,7 +277,26 @@
|
|||||||
</v-chip>
|
</v-chip>
|
||||||
</template>
|
</template>
|
||||||
</v-combobox>
|
</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-switch
|
||||||
v-model="client.enable"
|
v-model="client.enable"
|
||||||
color="red"
|
color="red"
|
||||||
@ -360,6 +401,26 @@
|
|||||||
</v-chip>
|
</v-chip>
|
||||||
</template>
|
</template>
|
||||||
</v-combobox>
|
</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-switch
|
||||||
v-model="client.ignorePersistentKeepalive"
|
v-model="client.ignorePersistentKeepalive"
|
||||||
color="red"
|
color="red"
|
||||||
@ -409,6 +470,7 @@
|
|||||||
{ text: 'Name', value: 'name', },
|
{ text: 'Name', value: 'name', },
|
||||||
{ text: 'Email', value: 'email', },
|
{ text: 'Email', value: 'email', },
|
||||||
{ text: 'IP addresses', value: 'address', },
|
{ text: 'IP addresses', value: 'address', },
|
||||||
|
{ text: 'Tags', value: 'tags', },
|
||||||
{ text: 'Created', value: 'created', sortable: false, },
|
{ text: 'Created', value: 'created', sortable: false, },
|
||||||
{ text: 'Updated', value: 'updated', sortable: false, },
|
{ text: 'Updated', value: 'updated', sortable: false, },
|
||||||
{ text: 'Actions', value: 'action', sortable: false, },
|
{ text: 'Actions', value: 'action', sortable: false, },
|
||||||
@ -451,6 +513,7 @@
|
|||||||
enable: true,
|
enable: true,
|
||||||
allowedIPs: this.server.allowedips,
|
allowedIPs: this.server.allowedips,
|
||||||
address: this.server.address,
|
address: this.server.address,
|
||||||
|
tags: [],
|
||||||
}
|
}
|
||||||
this.dialogCreate = true;
|
this.dialogCreate = true;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user