diff --git a/frontend/package.json b/frontend/package.json index b05c0bc36..c63cb74a0 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -109,7 +109,6 @@ "floating-vue": "5.2.2", "is-touch-device": "1.0.1", "klona": "2.0.6", - "lodash.debounce": "4.0.8", "lowlight": "2.9.0", "pinia": "2.1.7", "register-service-worker": "1.7.2", @@ -140,7 +139,6 @@ "@types/flexsearch": "0.7.6", "@types/is-touch-device": "1.0.2", "@types/lodash.clonedeep": "4.5.9", - "@types/lodash.debounce": "4.0.9", "@types/node": "20.14.11", "@types/sortablejs": "1.15.8", "@typescript-eslint/eslint-plugin": "7.16.1", diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml index 570219fe9..be0e7a558 100644 --- a/frontend/pnpm-lock.yaml +++ b/frontend/pnpm-lock.yaml @@ -193,9 +193,6 @@ importers: klona: specifier: 2.0.6 version: 2.0.6 - lodash.debounce: - specifier: 4.0.8 - version: 4.0.8 lowlight: specifier: 2.9.0 version: 2.9.0 @@ -281,9 +278,6 @@ importers: '@types/lodash.clonedeep': specifier: 4.5.9 version: 4.5.9 - '@types/lodash.debounce': - specifier: 4.0.9 - version: 4.0.9 '@types/node': specifier: 20.14.11 version: 20.14.11 @@ -2328,9 +2322,6 @@ packages: '@types/lodash.clonedeep@4.5.9': resolution: {integrity: sha512-19429mWC+FyaAhOLzsS8kZUsI+/GmBAQ0HFiCPsKGU+7pBXOQWhyrY6xNNDwUSX8SMZMJvuFVMF9O5dQOlQK9Q==} - '@types/lodash.debounce@4.0.9': - resolution: {integrity: sha512-Ma5JcgTREwpLRwMM+XwBR7DaWe96nC38uCBDFKZWbNKD+osjVzdpnUSwBcqCptrp16sSOLBAUb50Car5I0TCsQ==} - '@types/lodash@4.17.5': resolution: {integrity: sha512-MBIOHVZqVqgfro1euRDWX7OO0fBVUUMrN6Pwm8LQsz8cWhEpihlvR70ENj3f40j58TNxZaWv2ndSkInykNBBJw==} @@ -8314,10 +8305,6 @@ snapshots: dependencies: '@types/lodash': 4.17.5 - '@types/lodash.debounce@4.0.9': - dependencies: - '@types/lodash': 4.17.5 - '@types/lodash@4.17.5': {} '@types/markdown-it@12.2.3': diff --git a/frontend/src/views/project/settings/ProjectSettingsBackground.vue b/frontend/src/views/project/settings/ProjectSettingsBackground.vue index 2fc8f2936..c6bd42691 100644 --- a/frontend/src/views/project/settings/ProjectSettingsBackground.vue +++ b/frontend/src/views/project/settings/ProjectSettingsBackground.vue @@ -113,7 +113,7 @@ export default { name: 'ProjectSettingBackground' } import {ref, computed, shallowReactive} from 'vue' import {useI18n} from 'vue-i18n' import {useRoute, useRouter} from 'vue-router' -import debounce from 'lodash.debounce' +import {useDebounceFn} from '@vueuse/core' import BaseButton from '@/components/base/BaseButton.vue' import CustomTransition from '@/components/misc/CustomTransition.vue' @@ -150,9 +150,7 @@ const backgroundBlurHashes = ref>({}) const currentPage = ref(1) // We're using debounce to not search on every keypress but with a delay. -const debounceNewBackgroundSearch = debounce(newBackgroundSearch, SEARCH_DEBOUNCE, { - trailing: true, -}) +const debounceNewBackgroundSearch = useDebounceFn(newBackgroundSearch, SEARCH_DEBOUNCE) const backgroundUploadService = ref(new BackgroundUploadService()) const projectService = ref(new ProjectService())