diff --git a/src/static/app/src/components/configurationComponents/peerList.vue b/src/static/app/src/components/configurationComponents/peerList.vue index fb9572d..39089dc 100644 --- a/src/static/app/src/components/configurationComponents/peerList.vue +++ b/src/static/app/src/components/configurationComponents/peerList.vue @@ -36,9 +36,11 @@ 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"; +import PeerSearchBar from "@/components/configurationComponents/peerSearchBar.vue"; export default { name: "peerList", components: { + PeerSearchBar, PeerRow, DeleteConfiguration: defineAsyncComponent(() => import("@/components/configurationComponents/deleteConfiguration.vue")), @@ -150,6 +152,7 @@ export default { deleteConfiguration: { modalOpen: false }, + peerSearchBarShow: false, searchStringTimeout: undefined, searchString: "", } @@ -197,18 +200,6 @@ 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", { @@ -387,9 +378,7 @@ export default { } } }, - searchBarPlaceholder(){ - return GetLocale("Search Peers...") - }, + searchPeers(){ const fuse = new Fuse(this.configurationPeers, { keys: ["name", "id", "allowed_ip"] @@ -621,6 +610,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 426beda..7899dd9 100644 --- a/src/static/app/src/components/configurationComponents/peerSearch.vue +++ b/src/static/app/src/components/configurationComponents/peerSearch.vue @@ -149,7 +149,12 @@ export default { - +