This commit is contained in:
Baobhan Sith
2025-04-18 14:38:23 +08:00
parent 1b2466899d
commit d9fa9c3b3e
@@ -94,21 +94,17 @@ watch(searchTerm, (newValue) => {
<!-- 搜索控制按钮 --> <!-- 搜索控制按钮 -->
<div class="search-controls"> <div class="search-controls">
<button @click="toggleSearch" class="icon-button" :title="isSearching ? t('commandInputBar.closeSearch') : t('commandInputBar.openSearch')"> <button @click="toggleSearch" class="icon-button" :title="isSearching ? t('commandInputBar.closeSearch') : t('commandInputBar.openSearch')">
<!-- 使用图标代替文字 --> <!-- 使用 Font Awesome 图标 -->
<span v-if="!isSearching">🔍</span> <!-- 临时使用 emoji --> <i v-if="!isSearching" class="fas fa-search"></i>
<span v-else></span> <!-- 临时使用 emoji --> <i v-else class="fas fa-times"></i>
<!-- <SearchIcon v-if="!isSearching" /> -->
<!-- <CloseIcon v-else /> -->
</button> </button>
<template v-if="isSearching"> <template v-if="isSearching">
<button @click="findPrevious" class="icon-button" :title="t('commandInputBar.findPrevious')"> <button @click="findPrevious" class="icon-button" :title="t('commandInputBar.findPrevious')">
<span></span> <!-- 临时使用 emoji --> <i class="fas fa-arrow-up"></i>
<!-- <ArrowUpIcon /> -->
</button> </button>
<button @click="findNext" class="icon-button" :title="t('commandInputBar.findNext')"> <button @click="findNext" class="icon-button" :title="t('commandInputBar.findNext')">
<span></span> <!-- 临时使用 emoji --> <i class="fas fa-arrow-down"></i>
<!-- <ArrowDownIcon /> -->
</button> </button>
<!-- 搜索结果显示已移除 --> <!-- 搜索结果显示已移除 -->
</template> </template>
@@ -166,22 +162,36 @@ watch(searchTerm, (newValue) => {
.icon-button { .icon-button {
background: none; background: none;
border: none; border: none;
padding: 4px; padding: 0.2rem 0.4rem; /* Match FileManager padding */
cursor: pointer; cursor: pointer;
color: var(--text-color); color: var(--text-color-secondary); /* Match FileManager default color */
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
border-radius: 4px; vertical-align: middle; /* Match FileManager */
transition: background-color 0.2s; border-radius: 3px; /* Match FileManager */
transition: background-color 0.2s ease, color 0.2s ease; /* Match FileManager transition */
} }
.icon-button:hover { .icon-button:hover:not(:disabled) { /* Match FileManager hover */
background-color: var(--hover-bg-color, #eee); /* Use theme variable */ background-color: rgba(0, 0, 0, 0.08);
color: var(--text-color);
} }
.icon-button span { /* 临时 emoji 样式 */ .icon-button:disabled { /* Add disabled state */
font-size: 1.1em; opacity: 0.5;
cursor: not-allowed;
}
/* Style the icon inside the button like FileManager */
.icon-button i {
font-size: 1.1em; /* Match FileManager icon size */
color: var(--button-bg-color); /* Match FileManager icon color */
transition: color 0.2s ease;
}
.icon-button:hover:not(:disabled) i { /* Match FileManager icon hover */
color: var(--button-hover-bg-color, var(--button-bg-color));
} }
/* 实际使用图标库时可以这样设置大小 */ /* 实际使用图标库时可以这样设置大小 */