|
9 | 9 | <p>控制识别分类,添加自定义规则,并覆盖弹窗样式。</p> |
10 | 10 | </div> |
11 | 11 | <div class="header-actions"> |
12 | | - <button type="button" :title="`主题:${themeLabel(theme)}(点击切换)`" @click="toggleTheme"> |
| 12 | + <RippleButton :title="`主题:${themeLabel(theme)}(点击切换)`" @click="toggleTheme"> |
13 | 13 | <Sun v-if="theme === 'light'" :size="14" :stroke-width="2" /> |
14 | 14 | <Moon v-else-if="theme === 'dark'" :size="14" :stroke-width="2" /> |
15 | 15 | <Monitor v-else :size="14" :stroke-width="2" /> |
16 | 16 | <span>主题:{{ themeLabel(theme) }}</span> |
17 | | - </button> |
18 | | - <button type="button" @click="openHelp"> |
| 17 | + </RippleButton> |
| 18 | + <RippleButton @click="openHelp"> |
19 | 19 | <BookOpen :size="14" :stroke-width="2" /> |
20 | 20 | <span>使用说明</span> |
21 | | - </button> |
22 | | - <button type="button" title="GitHub 仓库" @click="openRepository"> |
| 21 | + </RippleButton> |
| 22 | + <RippleButton title="GitHub 仓库" @click="openRepository"> |
23 | 23 | <ExternalLink :size="14" :stroke-width="2" /> |
24 | 24 | <span>GitHub 仓库</span> |
25 | | - </button> |
26 | | - <button type="button" class="primary" @click="saveSettings"> |
| 25 | + </RippleButton> |
| 26 | + <RippleButton class="primary" variant="primary" @click="saveSettings"> |
27 | 27 | <Save :size="14" :stroke-width="2" /> |
28 | 28 | <span>保存设置</span> |
29 | | - </button> |
30 | | - <button type="button" @click="resetSettings"> |
| 29 | + </RippleButton> |
| 30 | + <RippleButton @click="resetSettings"> |
31 | 31 | <RotateCcw :size="14" :stroke-width="2" /> |
32 | 32 | <span>恢复默认</span> |
33 | | - </button> |
| 33 | + </RippleButton> |
34 | 34 | </div> |
35 | 35 | </div> |
36 | 36 | </header> |
|
41 | 41 | <div class="panel-head"> |
42 | 42 | <h2>识别开关</h2> |
43 | 43 | <div class="inline-actions"> |
44 | | - <button type="button" @click="setAllCategories(true)">全开</button> |
45 | | - <button type="button" @click="setAllCategories(false)">全关</button> |
| 44 | + <RippleButton @click="setAllCategories(true)">全开</RippleButton> |
| 45 | + <RippleButton @click="setAllCategories(false)">全关</RippleButton> |
46 | 46 | </div> |
47 | 47 | </div> |
48 | 48 | <div class="category-grid"> |
|
75 | 75 | <div class="panel-head"> |
76 | 76 | <h2>自定义规则</h2> |
77 | 77 | <div class="inline-actions"> |
78 | | - <button type="button" @click="openContribute">提交规则贡献</button> |
79 | | - <button type="button" @click="clearRuleForm">清空表单</button> |
| 78 | + <RippleButton @click="openContribute">提交规则贡献</RippleButton> |
| 79 | + <RippleButton @click="clearRuleForm">清空表单</RippleButton> |
80 | 80 | </div> |
81 | 81 | </div> |
82 | 82 |
|
|
135 | 135 | </div> |
136 | 136 |
|
137 | 137 | <div class="form-actions"> |
138 | | - <button type="button" class="primary" @click="addRuleFromForm">添加规则</button> |
139 | | - <button type="button" @click="updateRuleFromForm">更新当前规则</button> |
| 138 | + <RippleButton class="primary" variant="primary" @click="addRuleFromForm">添加规则</RippleButton> |
| 139 | + <RippleButton @click="updateRuleFromForm">更新当前规则</RippleButton> |
140 | 140 | </div> |
141 | 141 |
|
142 | 142 | <div class="rules-list"> |
|
150 | 150 | <div class="rule-meta">{{ ruleListLines[index] }}</div> |
151 | 151 | </div> |
152 | 152 | <div class="rule-actions"> |
153 | | - <button type="button" class="icon-btn" title="编辑此规则" @click="fillRuleForm(rule, index)"> |
| 153 | + <RippleButton class="icon-btn" title="编辑此规则" @click="fillRuleForm(rule, index)"> |
154 | 154 | <Pencil :size="14" :stroke-width="2" /> |
155 | | - </button> |
156 | | - <button type="button" class="icon-btn danger" title="删除此规则" @click="deleteRule(index)"> |
| 155 | + </RippleButton> |
| 156 | + <RippleButton class="icon-btn danger" variant="danger" title="删除此规则" @click="deleteRule(index)"> |
157 | 157 | <Trash2 :size="14" :stroke-width="2" /> |
158 | | - </button> |
| 158 | + </RippleButton> |
159 | 159 | </div> |
160 | 160 | </div> |
161 | 161 | </div> |
|
165 | 165 | <div class="panel-head"> |
166 | 166 | <h2>规则 JSON</h2> |
167 | 167 | <div class="inline-actions"> |
168 | | - <button type="button" @click="importRulesJson">从 JSON 导入</button> |
169 | | - <button type="button" @click="formatRulesJson">格式化</button> |
| 168 | + <RippleButton @click="importRulesJson">从 JSON 导入</RippleButton> |
| 169 | + <RippleButton @click="formatRulesJson">格式化</RippleButton> |
170 | 170 | </div> |
171 | 171 | </div> |
172 | 172 | <textarea v-model="rulesJsonText" rows="13" spellcheck="false"></textarea> |
|
178 | 178 | import { onMounted, reactive, ref, watch, computed } from 'vue' |
179 | 179 | import { BookOpen, ExternalLink, Inbox, Monitor, Moon, Pencil, RotateCcw, Save, Sun, Trash2 } from 'lucide-vue-next' |
180 | 180 | import Select from '@/ui/components/Select.vue' |
| 181 | + import RippleButton from '@/ui/components/RippleButton.vue' |
181 | 182 | import { CATEGORY_ORDER } from '@/utils/category-order' |
182 | 183 | import { applyCustomCss } from '@/utils/apply-custom-css' |
183 | 184 | import { cleanCustomRules, cleanStringArray, defaultSettings, normalizeSettings } from '@/utils/normalize-settings' |
|
0 commit comments