From 4e4bfc75e38ed58a9858969ebfd44e4a7df52c8d Mon Sep 17 00:00:00 2001 From: Bernd Storath <32197462+kaaax0815@users.noreply.github.com> Date: Tue, 18 Nov 2025 11:36:46 +0100 Subject: [PATCH] feat: add config btn and modal to view and copy config (#2289) * add view config btn and modal * show loading state * add note about keyboard --- src/app/components/Base/CodeBlock.vue | 29 ++++++++ src/app/components/Clients/ConfigDialog.vue | 74 +++++++++++++++++++++ src/app/components/Clients/QRCodeDialog.vue | 2 +- src/app/pages/clients/[id].vue | 12 ++++ src/i18n/locales/en.json | 10 ++- 5 files changed, 125 insertions(+), 2 deletions(-) create mode 100644 src/app/components/Base/CodeBlock.vue create mode 100644 src/app/components/Clients/ConfigDialog.vue diff --git a/src/app/components/Base/CodeBlock.vue b/src/app/components/Base/CodeBlock.vue new file mode 100644 index 00000000..2169476e --- /dev/null +++ b/src/app/components/Base/CodeBlock.vue @@ -0,0 +1,29 @@ + + + diff --git a/src/app/components/Clients/ConfigDialog.vue b/src/app/components/Clients/ConfigDialog.vue new file mode 100644 index 00000000..e78b1a83 --- /dev/null +++ b/src/app/components/Clients/ConfigDialog.vue @@ -0,0 +1,74 @@ + + + diff --git a/src/app/components/Clients/QRCodeDialog.vue b/src/app/components/Clients/QRCodeDialog.vue index 9905c354..c182150b 100644 --- a/src/app/components/Clients/QRCodeDialog.vue +++ b/src/app/components/Clients/QRCodeDialog.vue @@ -9,7 +9,7 @@ diff --git a/src/app/pages/clients/[id].vue b/src/app/pages/clients/[id].vue index cee6a5f1..9c91cf28 100644 --- a/src/app/pages/clients/[id].vue +++ b/src/app/pages/clients/[id].vue @@ -186,6 +186,18 @@ as="span" /> + + + diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index ea78d6f5..17c9202c 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -117,7 +117,9 @@ "notConnected": "Client not connected", "endpoint": "Endpoint", "endpointDesc": "IP of the client from which the WireGuard connection is established", - "search": "Search clients..." + "search": "Search clients...", + "config": "Configuration", + "viewConfig": "View Configuration" }, "dialog": { "change": "Change", @@ -238,6 +240,12 @@ "preDown": "PreDown", "postDown": "PostDown" }, + "copy": { + "notSupported": "Copy is not supported", + "copied": "Copied!", + "failed": "Copy failed", + "copy": "Copy" + }, "awg": { "jCLabel": "Junk packet count (Jc)", "jCDescription": "Number of junk packets to send (1-128, recommended: 4-12)",