From a517f89234eb4b0b6ff2f4c301219a6421545dac Mon Sep 17 00:00:00 2001 From: Donald Zou Date: Fri, 29 Nov 2024 23:07:58 +0800 Subject: [PATCH] Update --- .../deleteConfiguration.vue | 4 +- .../editConfiguration.vue | 27 ++- .../configurationComponents/peer.vue | 4 +- .../peerJobsAllModal.vue | 8 +- .../configurationComponents/peerList.vue | 63 +++-- .../configurationComponents/peerRow.vue | 79 +++++++ .../configurationComponents/peerSearch.vue | 217 +++++++----------- 7 files changed, 245 insertions(+), 157 deletions(-) create mode 100644 src/static/app/src/components/configurationComponents/peerRow.vue diff --git a/src/static/app/src/components/configurationComponents/deleteConfiguration.vue b/src/static/app/src/components/configurationComponents/deleteConfiguration.vue index 46477ee..e6543eb 100644 --- a/src/static/app/src/components/configurationComponents/deleteConfiguration.vue +++ b/src/static/app/src/components/configurationComponents/deleteConfiguration.vue @@ -46,7 +46,7 @@ onMounted(() => { getBackup() }) -const emits = defineEmits(["backup"]) +const emits = defineEmits(["backup", "close"]) @@ -61,7 +61,7 @@ const emits = defineEmits(["backup"])
- +

diff --git a/src/static/app/src/components/configurationComponents/editConfiguration.vue b/src/static/app/src/components/configurationComponents/editConfiguration.vue index b56acf3..8b9118c 100644 --- a/src/static/app/src/components/configurationComponents/editConfiguration.vue +++ b/src/static/app/src/components/configurationComponents/editConfiguration.vue @@ -34,7 +34,7 @@ const resetForm = () => { dataChanged.value = false; Object.assign(data, JSON.parse(JSON.stringify(props.configurationInfo))) } -const emit = defineEmits(["changed", "close"]) +const emit = defineEmits(["changed", "close", "backupRestore", "deleteConfiguration"]) const saveForm = () => { saving.value = true fetchPost("/api/updateWireguardConfiguration", data, (res) => { @@ -193,13 +193,34 @@ watch(data, () => { + + + +

+
+
Danger Zone
+
+ +
diff --git a/src/static/app/src/components/configurationComponents/peer.vue b/src/static/app/src/components/configurationComponents/peer.vue index 234f401..be68e5a 100644 --- a/src/static/app/src/components/configurationComponents/peer.vue +++ b/src/static/app/src/components/configurationComponents/peer.vue @@ -45,11 +45,11 @@ export default { {{(Peer.cumu_receive + Peer.total_receive).toFixed(4)}} GB - + {{(Peer.cumu_sent + Peer.total_sent).toFixed(4)}} GB - + {{getLatestHandshake}} ago diff --git a/src/static/app/src/components/configurationComponents/peerJobsAllModal.vue b/src/static/app/src/components/configurationComponents/peerJobsAllModal.vue index 6a8847f..3b5cb58 100644 --- a/src/static/app/src/components/configurationComponents/peerJobsAllModal.vue +++ b/src/static/app/src/components/configurationComponents/peerJobsAllModal.vue @@ -31,7 +31,7 @@ export default {