|
128 | 128 | <button |
129 | 129 | type="button" |
130 | 130 | class="search-sidebar-close" |
131 | | - @click="closeMessageSearch" |
| 131 | + @click="closeMessageSearch('close-button')" |
132 | 132 | title="关闭搜索 (Esc)" |
133 | 133 | > |
134 | 134 | <svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
|
175 | 175 | :class="{ 'privacy-blur': privacyMode }" |
176 | 176 | @focus="searchInputFocused = true" |
177 | 177 | @blur="searchInputFocused = false" |
178 | | - @keydown.enter.exact.prevent="runMessageSearch({ reset: true })" |
| 178 | + @keydown.enter.exact.prevent="runMessageSearch({ reset: true, source: 'input-enter' })" |
179 | 179 | @keydown.enter.shift.prevent="onSearchPrev" |
180 | | - @keydown.escape="closeMessageSearch" |
| 180 | + @keydown.escape="closeMessageSearch('input-escape')" |
181 | 181 | /> |
182 | 182 |
|
183 | 183 | <!-- 清除按钮 --> |
184 | 184 | <button |
185 | 185 | v-if="messageSearchQuery" |
186 | 186 | type="button" |
187 | 187 | class="search-clear-inline" |
188 | | - @click="messageSearchQuery = ''; runMessageSearch({ reset: true })" |
| 188 | + @click="messageSearchQuery = ''; runMessageSearch({ reset: true, source: 'clear-button' })" |
189 | 189 | > |
190 | 190 | <svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
191 | 191 | <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/> |
|
197 | 197 | type="button" |
198 | 198 | class="search-btn-inline" |
199 | 199 | :disabled="messageSearchLoading" |
200 | | - @click="runMessageSearch({ reset: true })" |
| 200 | + @click="runMessageSearch({ reset: true, source: 'search-button' })" |
201 | 201 | > |
202 | 202 | <svg v-if="messageSearchLoading" class="animate-spin w-4 h-4" fill="none" viewBox="0 0 24 24"> |
203 | 203 | <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle> |
|
428 | 428 | :key="hit.id + ':' + idx" |
429 | 429 | class="sidebar-result-card" |
430 | 430 | :class="{ 'sidebar-result-card-selected': idx === messageSearchSelectedIndex }" |
| 431 | + @pointerdown="onSearchHitPointerDown(hit, idx, $event)" |
| 432 | + @click.capture="onSearchHitClickCapture(hit, idx, $event)" |
431 | 433 | @click="onSearchHitClick(hit, idx)" |
432 | 434 | > |
433 | 435 | <div class="sidebar-result-row"> |
|
0 commit comments