Commit bf0b63cd0b

bf0b63cd0bd55222dfe9a1ef2406c0a2d4ca3e66

parent: af70bf55cc

Unsigned

Duck <57977673+woducku@users.noreply.github.com> · 2026-10-23 06:29 UTC

Update ExtensionRepos.vue

Layout: unified · split

docs/.vitepress/theme/components/extrepo/ExtensionRepos.vue +16 −1
@@ -2,6 +2,7 @@
2import { refDebounced } from '@vueuse/core' 2import { refDebounced } from '@vueuse/core'
3import { computed, nextTick, onUnmounted, ref, watch } from 'vue' 3import { computed, nextTick, onUnmounted, ref, watch } from 'vue'
4import { SEARCH_DEBOUNCE_MS, STATUS_TICK_MS } from './constants' 4import { SEARCH_DEBOUNCE_MS, STATUS_TICK_MS } from './constants'
5import { groupSites } from './groupSites'
5import { escapeHtml, stripHtml } from './helpers' 6import { escapeHtml, stripHtml } from './helpers'
6import { mangayomiCopyValue } from './install' 7import { mangayomiCopyValue } from './install'
7import RepoRow from './RepoRow.vue' 8import RepoRow from './RepoRow.vue'
@@ -197,6 +198,20 @@ const { facets, isFiltering, filteredSites } = useRepoFilter(allSites, {
197 contentTypeFilter, 198 contentTypeFilter,
198 showBroken 199 showBroken
199}) 200})
201
202const totalExtensions = computed(() => {
203 const visible = showBroken.value
204 ? allSites.value
205 : allSites.value.filter(site => !site.isBroken)
206 return groupSites(visible).length
207})
208
209const searchPlaceholder = computed(() => {
210 const total = totalExtensions.value
211 return total
212 ? `Search all extensions (${total.toLocaleString()})…`
213 : 'Search all extensions…'
214})
200</script> 215</script>
201 216
202<template> 217<template>
@@ -204,7 +219,7 @@ const { facets, isFiltering, filteredSites } = useRepoFilter(allSites, {
204 <div class="ext-toolbar"> 219 <div class="ext-toolbar">
205 <div class="ext-search"> 220 <div class="ext-search">
206 <span class="i-lucide:search" /> 221 <span class="i-lucide:search" />
207 <input v-model="query" type="text" placeholder="Search all sites…" /> 222 <input v-model="query" type="text" :placeholder="searchPlaceholder" />
208 </div> 223 </div>
209 <button 224 <button
210 type="button" 225 type="button"