diff --git a/src/static/app/src/components/configurationComponents/peerList.vue b/src/static/app/src/components/configurationComponents/peerList.vue index c75637c..fb9572d 100644 --- a/src/static/app/src/components/configurationComponents/peerList.vue +++ b/src/static/app/src/components/configurationComponents/peerList.vue @@ -35,6 +35,7 @@ import dayjs from "dayjs"; import {defineAsyncComponent, ref} from "vue"; import LocaleText from "@/components/text/localeText.vue"; import PeerRow from "@/components/configurationComponents/peerRow.vue"; +import {GetLocale} from "@/utilities/locale.js"; export default { name: "peerList", components: { @@ -148,7 +149,9 @@ export default { }, deleteConfiguration: { modalOpen: false - } + }, + searchStringTimeout: undefined, + searchString: "", } }, mounted() { @@ -194,6 +197,18 @@ export default { this.configurationToggling = false; }) }, + debounce(){ + if (!this.searchStringTimeout){ + this.searchStringTimeout = setTimeout(() => { + this.wireguardConfigurationStore.searchString = this.searchString; + }, 300) + }else{ + clearTimeout(this.searchStringTimeout) + this.searchStringTimeout = setTimeout(() => { + this.wireguardConfigurationStore.searchString = this.searchString; + }, 300) + } + }, getPeers(id = this.$route.params.id){ fetchGet("/api/getWireguardConfigurationInfo", { @@ -372,6 +387,9 @@ export default { } } }, + searchBarPlaceholder(){ + return GetLocale("Search Peers...") + }, searchPeers(){ const fuse = new Fuse(this.configurationPeers, { keys: ["name", "id", "allowed_ip"] @@ -426,7 +444,7 @@ export default {
-
+
@@ -454,28 +472,23 @@ export default {
+ class="titleBtn py-2 text-decoration-none btn text-primary-emphasis bg-primary-subtle rounded-3 border-1 border-primary-subtle "> - - - - - -

-
+

@@ -485,7 +498,7 @@ export default {

-
+

@@ -495,7 +508,7 @@ export default {

-
+

@@ -507,7 +520,7 @@ export default {

-
+

@@ -522,7 +535,7 @@ export default {

-
+

@@ -535,7 +548,7 @@ export default {

-
+

@@ -548,7 +561,7 @@ export default {

-
+

@@ -563,7 +576,7 @@ export default {

-
+
@@ -577,7 +590,7 @@ export default {
-
+
@@ -591,7 +604,7 @@ export default {
-
+
@@ -606,7 +619,7 @@ export default {

-
+
-
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+ \ No newline at end of file diff --git a/src/static/app/src/components/configurationComponents/peerSearch.vue b/src/static/app/src/components/configurationComponents/peerSearch.vue index fee8b98..426beda 100644 --- a/src/static/app/src/components/configurationComponents/peerSearch.vue +++ b/src/static/app/src/components/configurationComponents/peerSearch.vue @@ -89,30 +89,30 @@ export default {