diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 9dcc443..80f45f1 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -9,7 +9,6 @@ "version": "0.0.0", "dependencies": { "daisyui": "^2.15.0", - "debounce": "^1.2.1", "nprogress": "^0.2.0", "pinia": "^2.0.0-rc.10", "pinia-plugin-persistedstate": "^1.6.1", @@ -18,7 +17,6 @@ "vue-axios": "^3.4.1" }, "devDependencies": { - "@types/debounce": "^1.2.1", "@types/node": "^17.0.35", "@vitejs/plugin-vue": "^2.3.3", "autoprefixer": "^10.4.7", @@ -1959,12 +1957,6 @@ "string.prototype.matchall": "^4.0.6" } }, - "node_modules/@types/debounce": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@types/debounce/-/debounce-1.2.1.tgz", - "integrity": "sha512-epMsEE85fi4lfmJUH/89/iV/LI+F5CvNIvmgs5g5jYFPfhO2S/ae8WSsLOKWdwtoaZw9Q2IhJ4tQ5tFCcS/4HA==", - "dev": true - }, "node_modules/@types/estree": { "version": "0.0.39", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", @@ -2678,11 +2670,6 @@ "postcss": "^8.1.6" } }, - "node_modules/debounce": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", - "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==" - }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -7037,12 +7024,6 @@ "string.prototype.matchall": "^4.0.6" } }, - "@types/debounce": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@types/debounce/-/debounce-1.2.1.tgz", - "integrity": "sha512-epMsEE85fi4lfmJUH/89/iV/LI+F5CvNIvmgs5g5jYFPfhO2S/ae8WSsLOKWdwtoaZw9Q2IhJ4tQ5tFCcS/4HA==", - "dev": true - }, "@types/estree": { "version": "0.0.39", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", @@ -7610,11 +7591,6 @@ "tailwindcss": "^3.0" } }, - "debounce": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/debounce/-/debounce-1.2.1.tgz", - "integrity": "sha512-XRRe6Glud4rd/ZGQfiV1ruXSfbvfJedlV9Y6zOlP+2K04vBYiJEte6stfFkCP03aMnY5tsipamumUjL14fofug==" - }, "debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", diff --git a/frontend/package.json b/frontend/package.json index 627c69d..6e5bcd1 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -9,7 +9,6 @@ }, "dependencies": { "daisyui": "^2.15.0", - "debounce": "^1.2.1", "nprogress": "^0.2.0", "pinia": "^2.0.0-rc.10", "pinia-plugin-persistedstate": "^1.6.1", @@ -18,7 +17,6 @@ "vue-axios": "^3.4.1" }, "devDependencies": { - "@types/debounce": "^1.2.1", "@types/node": "^17.0.35", "@vitejs/plugin-vue": "^2.3.3", "autoprefixer": "^10.4.7", diff --git a/frontend/src/app/backend.ts b/frontend/src/app/backend.ts index 5338ffb..8380e09 100644 --- a/frontend/src/app/backend.ts +++ b/frontend/src/app/backend.ts @@ -1,7 +1,7 @@ import axios, {AxiosResponse} from "axios" export const HTTP = axios.create({ - baseURL: "http://localhost:6969", + baseURL: "https://linkieapi.shedaniel.me", }) export function reqVersions(): Promise> { @@ -9,7 +9,7 @@ export function reqVersions(): Promise> { } export function reqVersionsFor(loader: string): Promise> { - return HTTP.get(`/api/versions`) + return HTTP.get(`/api/versions/${loader}`) } export function reqNamespaces(): Promise> { diff --git a/frontend/src/components/mappings/MappingsSearchBlock.vue b/frontend/src/components/mappings/MappingsSearchBlock.vue index 3706d8c..3145e3e 100644 --- a/frontend/src/components/mappings/MappingsSearchBlock.vue +++ b/frontend/src/components/mappings/MappingsSearchBlock.vue @@ -22,8 +22,6 @@ import {defineComponent} from "vue" import {mapState} from "pinia" import {useMappingsStore} from "../../app/mappings-store" -// @ts-ignore -import {debounce} from "debounce" export default defineComponent({ name: "MappingsSearchBlock", @@ -37,9 +35,11 @@ export default defineComponent({ }, methods: { searchTimeOut(event: any) { - debounce((_: any) => { + clearTimeout(this.timer) + + this.timer = setTimeout(() => { useMappingsStore().searchText = (event.target as any)?.value - }, 1000).call(event, []) + }, 1000) }, }, }) diff --git a/frontend/src/routes/Mappings.vue b/frontend/src/routes/Mappings.vue index a23468b..8540d2e 100644 --- a/frontend/src/routes/Mappings.vue +++ b/frontend/src/routes/Mappings.vue @@ -1,6 +1,6 @@