|
57 | 57 | <Icon icon="lucide:a-large-small" class="w-4 h-4 text-muted-foreground" /> |
58 | 58 | <span class="text-sm font-medium">{{ t('settings.display.fontSize') }}</span> |
59 | 59 | </span> |
60 | | - <div class="flex flex-row items-center gap-2 pl-6"> |
61 | | - <Slider |
62 | | - :default-value="[fontSizeLevel]" |
63 | | - :model-value="[fontSizeLevel]" |
64 | | - :min="0" |
65 | | - :max="4" |
66 | | - :step="1" |
67 | | - class="w-full max-w-sm" |
68 | | - @update:model-value="(val) => (fontSizeLevel = val?.[0] ?? 1)" |
69 | | - /> |
70 | | - <span class="text-xs w-16 text-center">{{ |
71 | | - t('settings.display.' + fontSizeClass.toLowerCase()) |
72 | | - }}</span> |
| 60 | + <div class="flex flex-wrap items-center gap-1.5 pl-6"> |
| 61 | + <Button |
| 62 | + v-for="(sizeOption, index) in fontSizeOptions" |
| 63 | + :key="index" |
| 64 | + :variant="fontSizeLevel === index ? 'default' : 'outline'" |
| 65 | + size="sm" |
| 66 | + class="px-2 py-1.5 text-xs flex-shrink-0" |
| 67 | + @click="fontSizeLevel = index" |
| 68 | + > |
| 69 | + {{ t('settings.display.' + sizeOption) }} |
| 70 | + </Button> |
73 | 71 | </div> |
74 | 72 | </div> |
75 | 73 |
|
@@ -172,7 +170,6 @@ import { |
172 | 170 | } from '@/components/ui/dialog' |
173 | 171 | import { Button } from '@/components/ui/button' |
174 | 172 | import { Switch } from '@/components/ui/switch' |
175 | | -import { Slider } from '@/components/ui/slider' |
176 | 173 |
|
177 | 174 | const languageStore = useLanguageStore() |
178 | 175 | const settingsStore = useSettingsStore() |
@@ -200,11 +197,12 @@ watch(selectedLanguage, async (newValue) => { |
200 | 197 | }) |
201 | 198 |
|
202 | 199 | // --- Font Size Settings --- |
| 200 | +const fontSizeOptions = ['text-sm', 'text-base', 'text-lg', 'text-xl', 'text-2xl'] |
| 201 | +
|
203 | 202 | const fontSizeLevel = computed({ |
204 | 203 | get: () => settingsStore.fontSizeLevel, |
205 | 204 | set: (value) => settingsStore.updateFontSizeLevel(value) |
206 | 205 | }) |
207 | | -const fontSizeClass = computed(() => settingsStore.fontSizeClass) |
208 | 206 |
|
209 | 207 | // --- Content Protection Settings --- |
210 | 208 | const contentProtectionEnabled = computed({ |
|
0 commit comments