diff --git a/custom/js/helper.js b/custom/js/helper.js
index d98eacb3..6f329009 100644
--- a/custom/js/helper.js
+++ b/custom/js/helper.js
@@ -38,6 +38,11 @@ function renderClientList(data) {
subnetRangesString = obj.Client.subnet_ranges.join(',')
}
+ let additionalNotesHtml = "";
+ if (obj.Client.additional_notes && obj.Client.additional_notes.length > 0) {
+ additionalNotesHtml = `${obj.Client.additional_notes}`
+ }
+
// render client html content
let html = `
@@ -81,6 +86,7 @@ function renderClientList(data) {
${obj.Client.public_key}
${subnetRangesString}
${telegramHtml}
+ ${additionalNotesHtml}
${obj.Client.email}
${prettyDateTime(obj.Client.created_at)}
diff --git a/handler/routes.go b/handler/routes.go
index ef01d086..42047dc0 100644
--- a/handler/routes.go
+++ b/handler/routes.go
@@ -720,6 +720,7 @@ func UpdateClient(db store.IStore) echo.HandlerFunc {
client.PublicKey = _client.PublicKey
client.PresharedKey = _client.PresharedKey
client.UpdatedAt = time.Now().UTC()
+ client.AdditionalNotes = strings.ReplaceAll(strings.Trim(_client.AdditionalNotes, "\r\n"), "\r\n", "\n")
// write to the database
if err := db.SaveClient(client); err != nil {
diff --git a/model/client.go b/model/client.go
index cb00016f..d8351248 100644
--- a/model/client.go
+++ b/model/client.go
@@ -18,6 +18,7 @@ type Client struct {
AllowedIPs []string `json:"allowed_ips"`
ExtraAllowedIPs []string `json:"extra_allowed_ips"`
Endpoint string `json:"endpoint"`
+ AdditionalNotes string `json:"additional_notes"`
UseServerDNS bool `json:"use_server_dns"`
Enabled bool `json:"enabled"`
CreatedAt time.Time `json:"created_at"`
diff --git a/templates/base.html b/templates/base.html
index 0c2b9eeb..3640699e 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -288,6 +288,10 @@
New Wireguard Client
+
+
+
+
+
+
+
+