Commit a7d3759019

a7d37590198a1f0c71b458da804a09074e53bb17

parent: b7af4889c5

Unsigned

Duck <57977673+woducku@users.noreply.github.com> · 2026-07-28 13:58 UTC

commit

Layout: unified · split

docs/.vitepress/theme/components/search/Search.vue +1 −32
@@ -82,7 +82,6 @@ import {
82 getPageOrder, 82 getPageOrder,
83 buildResultHref, 83 buildResultHref,
84 getSearchResultHref, 84 getSearchResultHref,
85 cycleSearchMode,
86 stripNonCloneable, 85 stripNonCloneable,
87 getPageOrderEntries, 86 getPageOrderEntries,
88 nextFrame 87 nextFrame
@@ -227,9 +226,6 @@ function applyHistory(entry: SearchHistoryEntry) {
227// Settings popup 226// Settings popup
228const showSettingsPopup = ref(false) 227const showSettingsPopup = ref(false)
229 228
230// Page groups & URL search state
231interface PageGroupCount { key: string; count: number }
232
233const urlMatches = shallowRef<PageLink[]>([]) 229const urlMatches = shallowRef<PageLink[]>([])
234const urlPageGroupCounts = shallowRef<PageGroupCount[]>([]) 230const urlPageGroupCounts = shallowRef<PageGroupCount[]>([])
235 231
@@ -1232,7 +1228,6 @@ function onMouseMove(e: MouseEvent) {
1232 ref="searchBarRef" 1228 ref="searchBarRef"
1233 :filter-text="filterText" 1229 :filter-text="filterText"
1234 :search-loading="searchLoading" 1230 :search-loading="searchLoading"
1235 :disable-detailed-view="disableDetailedView"
1236 :show-settings-popup="showSettingsPopup" 1231 :show-settings-popup="showSettingsPopup"
1237 :button-text="buttonText" 1232 :button-text="buttonText"
1238 :disable-reset="disableReset" 1233 :disable-reset="disableReset"
@@ -1240,7 +1235,6 @@ function onMouseMove(e: MouseEvent) {
1240 :form-motion="formMotion" 1235 :form-motion="formMotion"
1241 :translate="translate" 1236 :translate="translate"
1242 @update:filter-text="filterText = $event" 1237 @update:filter-text="filterText = $event"
1243 @cycle-search-mode="cycleSearchMode(searchMode)"
1244 @reset-search="resetSearch" 1238 @reset-search="resetSearch"
1245 @search-bar-click="onSearchBarClick" 1239 @search-bar-click="onSearchBarClick"
1246 @toggle-settings="showSettingsPopup = !showSettingsPopup" 1240 @toggle-settings="showSettingsPopup = !showSettingsPopup"
@@ -1559,11 +1553,6 @@ function onMouseMove(e: MouseEvent) {
1559 font-weight: 500; 1553 font-weight: 500;
1560} 1554}
1561 1555
1562.title-icon {
1563 opacity: 1;
1564 font-weight: 500;
1565}
1566
1567.title svg { 1556.title svg {
1568 opacity: 0.5; 1557 opacity: 0.5;
1569} 1558}
@@ -1645,8 +1634,7 @@ function onMouseMove(e: MouseEvent) {
1645 z-index: 1000; 1634 z-index: 1000;
1646} 1635}
1647 1636
1648.result.selected .titles, 1637.result.selected .titles {
1649.result.selected .title-icon {
1650 color: var(--vp-c-brand-1) !important; 1638 color: var(--vp-c-brand-1) !important;
1651} 1639}
1652 1640
@@ -1654,12 +1642,6 @@ function onMouseMove(e: MouseEvent) {
1654 color: var(--vp-c-brand-1); 1642 color: var(--vp-c-brand-1);
1655} 1643}
1656 1644
1657.no-results {
1658 font-size: 0.9rem;
1659 text-align: center;
1660 padding: 12px;
1661}
1662
1663svg { 1645svg {
1664 flex: none; 1646 flex: none;
1665} 1647}
@@ -1709,19 +1691,6 @@ svg {
1709 color: var(--vp-c-text-2); 1691 color: var(--vp-c-text-2);
1710} 1692}
1711 1693
1712.url-path .icon-tip {
1713 display: inline-flex;
1714 align-items: center;
1715 line-height: 1;
1716 vertical-align: middle;
1717}
1718
1719.url-path .icon-tip > span {
1720 width: 1em;
1721 height: 1em;
1722 min-width: 1em;
1723}
1724
1725.url-link { 1694.url-link {
1726 align-self: flex-start; 1695 align-self: flex-start;
1727 max-width: 100%; 1696 max-width: 100%;
docs/.vitepress/theme/components/search/SearchBar.vue +10 −105
@@ -1,21 +1,13 @@
1<script setup lang="ts"> 1<script setup lang="ts">
2import { 2import {
3 Globe,
4 List,
5 LocateOff,
6 Regex,
7 Settings, 3 Settings,
8 TextAlignStart,
9 X 4 X
10} from 'lucide-vue-next' 5} from 'lucide-vue-next'
11import { ref } from 'vue' 6import { ref } from 'vue'
12import { searchMode, showDetailedList } from '../../searchState'
13import type { SearchSortMode } from '../../searchState'
14 7
15defineProps<{ 8defineProps<{
16 filterText: string 9 filterText: string
17 searchLoading: boolean 10 searchLoading: boolean
18 disableDetailedView: boolean
19 showSettingsPopup: boolean 11 showSettingsPopup: boolean
20 buttonText: string 12 buttonText: string
21 disableReset: boolean 13 disableReset: boolean
@@ -26,7 +18,6 @@ defineProps<{
26 18
27const emit = defineEmits<{ 19const emit = defineEmits<{
28 'update:filterText': [value: string] 20 'update:filterText': [value: string]
29 cycleSearchMode: []
30 resetSearch: [] 21 resetSearch: []
31 searchBarClick: [event: PointerEvent] 22 searchBarClick: [event: PointerEvent]
32 toggleSettings: [] 23 toggleSettings: []
@@ -37,29 +28,6 @@ const searchInput = ref<HTMLInputElement>()
37const settingsButtonRef = ref<HTMLButtonElement>() 28const settingsButtonRef = ref<HTMLButtonElement>()
38 29
39defineExpose({ searchInput, settingsButtonRef }) 30defineExpose({ searchInput, settingsButtonRef })
40
41function onViewDetailClick() {
42 showDetailedList.value = true
43}
44
45function onViewListClick() {
46 showDetailedList.value = false
47}
48
49function onExactClick() {
50 if (searchMode.value === 'exact') emit('cycleSearchMode')
51 else searchMode.value = 'exact' as SearchSortMode
52}
53
54function onFuzzyClick() {
55 if (searchMode.value === 'fuzzy') emit('cycleSearchMode')
56 else searchMode.value = 'fuzzy' as SearchSortMode
57}
58
59function onUrlClick() {
60 if (searchMode.value === 'url') emit('cycleSearchMode')
61 else searchMode.value = 'url' as SearchSortMode
62}
63</script> 31</script>
64 32
65<template> 33<template>
@@ -118,58 +86,8 @@ function onUrlClick() {
118 alt="Bubba loading" 86 alt="Bubba loading"
119 /> 87 />
120 </button> 88 </button>
121 <div 89
122 v-if="!disableDetailedView && searchMode !== 'url'" 90
123 class="view-group toolbar-group"
124 >
125 <button
126 type="button"
127 class="mode-btn"
128 :class="{ 'mode-active': showDetailedList }"
129 title="Detail view (Consumes more RAM)"
130 @click="onViewDetailClick"
131 >
132 <TextAlignStart :size="18" stroke-width="2" />
133 </button>
134 <button
135 type="button"
136 class="mode-btn"
137 :class="{ 'mode-active': !showDetailedList }"
138 title="List view (Consumes less RAM)"
139 @click="onViewListClick"
140 >
141 <List :size="18" stroke-width="2" />
142 </button>
143 </div>
144 <div class="search-mode-group toolbar-group">
145 <button
146 type="button"
147 class="mode-btn"
148 :class="{ 'mode-active': searchMode === 'exact' }"
149 title="Exact search"
150 @click="onExactClick"
151 >
152 <Regex :size="18" stroke-width="2" />
153 </button>
154 <button
155 type="button"
156 class="mode-btn"
157 :class="{ 'mode-active': searchMode === 'fuzzy' }"
158 title="Fuzzy search"
159 @click="onFuzzyClick"
160 >
161 <LocateOff :size="18" stroke-width="2" />
162 </button>
163 <button
164 type="button"
165 class="mode-btn"
166 :class="{ 'mode-active': searchMode === 'url' }"
167 title="URL search"
168 @click="onUrlClick"
169 >
170 <Globe :size="18" stroke-width="2" />
171 </button>
172 </div>
173 <button 91 <button
174 ref="settingsButtonRef" 92 ref="settingsButtonRef"
175 type="button" 93 type="button"
@@ -291,8 +209,7 @@ function onUrlClick() {
291 padding: 8px; 209 padding: 8px;
292} 210}
293 211
294.search-actions button:not([disabled]):hover, 212.search-actions button:not([disabled]):hover {
295.toggle-layout-button.detailed-list {
296 color: var(--vp-c-brand-1); 213 color: var(--vp-c-brand-1);
297} 214}
298 215
@@ -300,14 +217,7 @@ function onUrlClick() {
300 opacity: 0.37; 217 opacity: 0.37;
301} 218}
302 219
303.toolbar-group + .toolbar-group {
304 margin-left: 6px;
305}
306 220
307.search-mode-group,
308.view-group {
309 display: none;
310}
311 221
312.mode-btn { 222.mode-btn {
313 display: flex; 223 display: flex;
@@ -322,10 +232,6 @@ function onUrlClick() {
322 border-radius: 0; 232 border-radius: 0;
323} 233}
324 234
325.mode-btn + .mode-btn {
326 border-left: 1px solid var(--vp-c-divider);
327}
328
329.mode-btn:hover { 235.mode-btn:hover {
330 color: var(--vp-c-text-1); 236 color: var(--vp-c-text-1);
331 background: var(--vp-c-default-soft); 237 background: var(--vp-c-default-soft);
@@ -336,11 +242,7 @@ function onUrlClick() {
336 background: color-mix(in srgb, var(--vp-c-brand-1) 10%, transparent); 242 background: color-mix(in srgb, var(--vp-c-brand-1) 10%, transparent);
337} 243}
338 244
339.exact-match-button.exact-match-active { 245
340 color: var(--vp-c-brand-1);
341 background-color: color-mix(in srgb, var(--vp-c-brand-1) 10%, transparent);
342 border-radius: 4px;
343}
344 246
345.search-actions .settings-toggle-btn, 247.search-actions .settings-toggle-btn,
346.search-actions .clear-button { 248.search-actions .clear-button {
@@ -393,13 +295,16 @@ html.effects-disabled .clear-button:active {
393 display: none; 295 display: none;
394 align-items: center; 296 align-items: center;
395 justify-content: center; 297 justify-content: center;
396 padding: 0; 298 padding: 8px;
397 border: none; 299 border: none;
398 background: transparent; 300 background: transparent;
399 color: var(--vp-c-text-1); 301 color: var(--vp-c-text-1);
400 cursor: pointer; 302 cursor: pointer;
401 width: 24px; 303 transition: color 0.15s;
402 height: 24px; 304}
305
306.back-button:hover {
307 color: var(--vp-c-brand-1);
403} 308}
404 309
405@media (max-width: 767px) { 310@media (max-width: 767px) {
docs/.vitepress/theme/components/search/SearchHistory.vue −1
@@ -1,7 +1,6 @@
1<script setup lang="ts"> 1<script setup lang="ts">
2import { ArrowRight, Globe, LocateOff, Regex, X } from 'lucide-vue-next' 2import { ArrowRight, Globe, LocateOff, Regex, X } from 'lucide-vue-next'
3import { searchHistory, type SearchHistoryEntry } from '../../searchState' 3import { searchHistory, type SearchHistoryEntry } from '../../searchState'
4import type { SearchSortMode } from '../../searchState'
5 4
6defineProps<{ 5defineProps<{
7 searchMotionDiv: string | object 6 searchMotionDiv: string | object
docs/.vitepress/theme/components/search/SearchKeyboardShortcuts.vue −1
@@ -1,6 +1,5 @@
1<script setup lang="ts"> 1<script setup lang="ts">
2import { ArrowLeft, ArrowLeftToLine, ArrowRight, ArrowRightToLine } from 'lucide-vue-next' 2import { ArrowLeft, ArrowLeftToLine, ArrowRight, ArrowRightToLine } from 'lucide-vue-next'
3import type { FooterTranslations } from './types'
4 3
5defineProps<{ 4defineProps<{
6 searchMotionDiv: string | object 5 searchMotionDiv: string | object