Commit dd4821794e

dd4821794ecd07dd10243390f6f298874d3fb44c

parent: 8f726ab710

Unsigned

Duck <57977673+woducku@users.noreply.github.com> · 2026-06-13 05:26 UTC

bubba

Layout: unified · split

docs/.vitepress/theme/components/Search.vue +44 −2
@@ -466,6 +466,11 @@ const results: Ref<(SearchResult & Result)[]> = shallowRef([])
466466const currentTerms = shallowRef(new Set<string>())
467467
468468const enableNoResults = ref(false)
469const textSearchLoading = ref(false)
470const urlSearchLoading = ref(false)
471const searchLoading = computed(() =>
472 urlSearchMode.value ? urlSearchLoading.value : textSearchLoading.value
473)
469474
470475const pageMeta = (() => {
471476 const map = new Map<string, { label: string; order: number }>()
@@ -670,10 +675,15 @@ watch(
670675 if (!active || !isOpen || !query.trim()) {
671676 urlMatches.value = []
672677 urlPageGroupCounts.value = []
678 urlSearchLoading.value = false
679 return
680 }
681 if (!ready) {
682 urlSearchLoading.value = false
673683 return
674684 }
675 if (!ready) return
676685
686 urlSearchLoading.value = true
677687 try {
678688 const payload = await postSearchWorker<UrlSearchWorkerPayload>({
679689 type: 'url-search',
@@ -683,11 +693,13 @@ watch(
683693 if (canceled) return
684694 urlMatches.value = payload.matches
685695 urlPageGroupCounts.value = payload.pageGroups
696 urlSearchLoading.value = false
686697 } catch (error) {
687698 if (!canceled) {
688699 console.error('[search] URL search worker request failed', error)
689700 urlMatches.value = []
690701 urlPageGroupCounts.value = []
702 urlSearchLoading.value = false
691703 }
692704 }
693705 },
@@ -1064,13 +1076,17 @@ watchDebounced(
10641076 canceled = true
10651077 })
10661078
1067 if (!ready || !isOpen) return
1079 if (!ready || !isOpen) {
1080 textSearchLoading.value = false
1081 return
1082 }
10681083
10691084 // In URL search mode, skip normal text search
10701085 if (mode === 'url') {
10711086 results.value = []
10721087 currentTerms.value = new Set()
10731088 enableNoResults.value = Boolean(filterTextValue.trim())
1089 textSearchLoading.value = false
10741090 return
10751091 }
10761092
@@ -1079,9 +1095,11 @@ watchDebounced(
10791095 results.value = []
10801096 currentTerms.value = new Set()
10811097 enableNoResults.value = false
1098 textSearchLoading.value = false
10821099 return
10831100 }
10841101
1102 textSearchLoading.value = true
10851103 let workerPayload: TextSearchWorkerPayload
10861104 try {
10871105 const workerIndexKey =
@@ -1113,6 +1131,7 @@ watchDebounced(
11131131 results.value = []
11141132 currentTerms.value = new Set()
11151133 enableNoResults.value = true
1134 textSearchLoading.value = false
11161135 }
11171136 return
11181137 }
@@ -1125,6 +1144,7 @@ watchDebounced(
11251144
11261145 if (!_result.length) {
11271146 results.value = []
1147 textSearchLoading.value = false
11281148 return
11291149 }
11301150
@@ -1213,6 +1233,7 @@ watchDebounced(
12131233 centerExcerptsUntilSettled()
12141234 }
12151235 }
1236 textSearchLoading.value = false
12161237 },
12171238 { debounce: 80, immediate: true }
12181239)
@@ -1680,6 +1701,13 @@ function onMouseMove(e: MouseEvent) {
16801701 type="search"
16811702 />
16821703 <div class="search-actions">
1704 <img
1705 v-if="searchLoading"
1706 class="search-loading-bubba"
1707 src="/bubba.webp"
1708 alt=""
1709 aria-hidden="true"
1710 />
16831711 <div
16841712 v-if="!disableDetailedView && searchMode !== 'url'"
16851713 class="view-group toolbar-group"
@@ -2374,6 +2402,8 @@ function onMouseMove(e: MouseEvent) {
23742402}
23752403
23762404.search-input {
2405 flex: 1 1 auto;
2406 min-width: 0;
23772407 padding: 6px 12px;
23782408 font-size: inherit;
23792409 width: 100%;
@@ -2390,10 +2420,22 @@ function onMouseMove(e: MouseEvent) {
23902420}
23912421
23922422.search-actions {
2423 flex: 0 0 auto;
23932424 display: flex;
2425 align-items: center;
23942426 gap: 4px;
23952427}
23962428
2429.search-loading-bubba {
2430 width: 32px;
2431 height: 28px;
2432 margin-inline-end: 6px;
2433 object-fit: contain;
2434 image-rendering: pixelated;
2435 pointer-events: none;
2436 user-select: none;
2437}
2438
23972439@media (any-pointer: coarse) {
23982440 .search-actions {
23992441 gap: 8px;
docs/credits.md +1
@@ -40,6 +40,7 @@ import Credits from './.vitepress/theme/components/Contributors.vue'
4040| Feel. | [Akane Mizuno](https://myanimelist.net/anime/34822/Tsuki_ga_Kirei/episode/4) | Extension Repos default link embed |
4141| **frakon98** | [Kaiji - Rolling the dice](https://www.deviantart.com/frakon98/art/Kaiji-Rolling-the-dice-860584411) | Madokami link embed |
4242| **藤ちょこ (Fujichoco)** | [Hatsune Miku “Magical Mirai 2020” Osaka](https://magicalmirai.com/2020/osaka/) | [Audio glossary banner](/glossary/audio#japanese-music-genres) |
43| **Holocure** | [Bubba](https://store.steampowered.com/app/2420510/HoloCure__Save_the_Fans/) | Searchbox loading image |
4344| **Huu** | [Rem](https://www.pixiv.net/en/artworks/79939625) | [Music banner](/music#radio) |
4445| **あきふゆはるか (Ibushi Roun)** | [Reimu vs Patchouli](https://www.pixiv.net/en/artworks/109967460) | Game link embed |
4546| **幾田 (Ikuta)** | [Copy](https://x.com/ikuta41/status/1733423740644684243/) | Default link embed |
docs/public/bubba.webp added

Binary file not shown.