From b77c57e08dc3b49d1bc4db15f1dae926f923704e Mon Sep 17 00:00:00 2001 From: Dark_Phoenix_ <92178883+0DarkPhoenix@users.noreply.github.com> Date: Sun, 8 Jun 2025 10:47:43 +0200 Subject: [PATCH] Improve http status codes performance (#86) * Improved performance on the Unicode Search page: - Created new flexSearch component (Faster than fuzzySearch). For more information, see https://github.com/nextapps-de/flexsearch - Replaced fuzzySearch with the flexSearch component on the unicode search page - Fixed a bug where the search limit counter didn't have any effect - Reduced the default search limit from 100 to 40 to reduce lag from loading all the ui elements * Added clarification to comment * components.d.ts update * - Replaced FuzzySearch with FlexSearch on the ISO 3166 Searcher page - Reduced the debounce from 500ms to 250ms - Reduced the default search limit from 100 to 20, and fixed a bug where the search limit wasn't applied when the value changed - Added the `readonly` prop to the `input-copyable` field - Added the `readonly` flag to all input copyable fields on the unicode search and iso 3166 searcher pages * Merged new changes to flexSearch * chore: vercel optimisation tentative * - Replaced fuzzysearch with flexsearch - Added a redirect icon to redirect to the MDN documentation for each status code - Added an icon before the category icon to more clearly visualize what the category is about * simplified category icon logic and added search icon --------- Co-authored-by: ShareVB --- components.d.ts | 3 -- .../http-status-codes/http-status-codes.vue | 51 +++++++++++++++++-- 2 files changed, 47 insertions(+), 7 deletions(-) diff --git a/components.d.ts b/components.d.ts index da900b88..04223256 100644 --- a/components.d.ts +++ b/components.d.ts @@ -298,7 +298,6 @@ declare module '@vue/runtime-core' { MorseConverter: typeof import('./src/tools/morse-converter/morse-converter.vue')['default'] MultiLinkDownloader: typeof import('./src/tools/multi-link-downloader/multi-link-downloader.vue')['default'] MyIp: typeof import('./src/tools/my-ip/my-ip.vue')['default'] - NA: typeof import('naive-ui')['NA'] NanoidGenerator: typeof import('./src/tools/nanoid-generator/nanoid-generator.vue')['default'] NanoMemo: typeof import('./src/tools/nano-memo/nano-memo.vue')['default'] 'NanoMemo.content': typeof import('./src/tools/nano-memo/nano-memo.content.md')['default'] @@ -307,14 +306,12 @@ declare module '@vue/runtime-core' { NCollapseTransition: typeof import('naive-ui')['NCollapseTransition'] NConfigProvider: typeof import('naive-ui')['NConfigProvider'] NEllipsis: typeof import('naive-ui')['NEllipsis'] - NFormItem: typeof import('naive-ui')['NFormItem'] NginxFormatter: typeof import('./src/tools/nginx-formatter/nginx-formatter.vue')['default'] NginxMemo: typeof import('./src/tools/nginx-memo/nginx-memo.vue')['default'] 'NginxMemo.content': typeof import('./src/tools/nginx-memo/nginx-memo.content.md')['default'] NH1: typeof import('naive-ui')['NH1'] NH3: typeof import('naive-ui')['NH3'] NIcon: typeof import('naive-ui')['NIcon'] - NInputNumber: typeof import('naive-ui')['NInputNumber'] NLayout: typeof import('naive-ui')['NLayout'] NLayoutSider: typeof import('naive-ui')['NLayoutSider'] NMenu: typeof import('naive-ui')['NMenu'] diff --git a/src/tools/http-status-codes/http-status-codes.vue b/src/tools/http-status-codes/http-status-codes.vue index 84ab3137..8174c626 100644 --- a/src/tools/http-status-codes/http-status-codes.vue +++ b/src/tools/http-status-codes/http-status-codes.vue @@ -1,10 +1,19 @@