|
1 | 1 | <template> |
2 | | - <div class="container pt-5"> |
3 | | - <h1 class="mb-5">Settings</h1> |
| 2 | + <div class="space-y-6"> |
| 3 | + <h1>Settings</h1> |
4 | 4 |
|
5 | | - <UFormGroup label="API Key" name="apiKey" help="Visit Settings -> Account to find your API Key." class="mb-6"> |
6 | | - <UInput v-model="apiKey" autocomplete="off" :ui="{ icon: { trailing: { pointer: '' } } }" :type="showPassword ? 'text' : 'password'"> |
| 5 | + <UFormField |
| 6 | + label="API Key" |
| 7 | + name="apiKey" |
| 8 | + help="Visit Settings -> Account to find your API Key." |
| 9 | + class="w-full" |
| 10 | + > |
| 11 | + <UInput |
| 12 | + v-model="apiKey" |
| 13 | + autocomplete="off" |
| 14 | + class="w-full" |
| 15 | + :ui="{ icon: { trailing: { pointer: '' } } }" |
| 16 | + :type="showPassword ? 'text' : 'password'" |
| 17 | + > |
7 | 18 | <template #trailing> |
8 | 19 | <UButton |
9 | 20 | color="gray" |
10 | 21 | variant="link" |
11 | 22 | :icon="showPassword ? 'i-heroicons-eye-slash' : 'i-heroicons-eye'" |
12 | 23 | :padded="false" |
| 24 | + class="cursor-pointer" |
13 | 25 | @click="toggleShowPassword" |
14 | 26 | /> |
15 | 27 | </template> |
16 | 28 | </UInput> |
17 | | - </UFormGroup> |
| 29 | + </UFormField> |
18 | 30 |
|
19 | | - <UFormGroup label='World of Warcraft "_retail_" Folder' name="folder" class="mb-6"> |
20 | | - <UInput v-model="folder" readonly @click="openFolderDialog"> |
| 31 | + <UFormField |
| 32 | + label='World of Warcraft "_retail_" Folder' |
| 33 | + name="folder" |
| 34 | + class="w-full" |
| 35 | + > |
| 36 | + <UInput |
| 37 | + v-model="folder" |
| 38 | + readonly |
| 39 | + class="w-full" |
| 40 | + :ui="{ |
| 41 | + root: 'cursor-pointer', |
| 42 | + base: 'cursor-pointer select-none', |
| 43 | + trailing: 'cursor-pointer pointer-events-auto text-right' |
| 44 | + }" |
| 45 | + @click="openFolderDialog" |
| 46 | + > |
21 | 47 | <template #trailing> |
22 | | - <span class="text-gray-500 dark:text-gray-400 text-xs">Choose Directory</span> |
| 48 | + <span |
| 49 | + class="text-gray-500 dark:text-gray-400 text-xs cursor-pointer" |
| 50 | + @click.stop="openFolderDialog" |
| 51 | + > |
| 52 | + Choose Directory |
| 53 | + </span> |
23 | 54 | </template> |
24 | 55 | </UInput> |
25 | | - </UFormGroup> |
| 56 | + </UFormField> |
26 | 57 |
|
27 | | - <UCheckbox label="Enable desktop notifications" v-model="notificationsEnabled" class="mb-2" /> |
| 58 | + <div class="space-y-3"> |
| 59 | + <UCheckbox |
| 60 | + label="Enable desktop notifications" |
| 61 | + v-model="notificationsEnabled" |
| 62 | + class="w-full justify-start" |
| 63 | + /> |
28 | 64 |
|
29 | | - <UCheckbox label="Launch WoWthing Sync when you start your computer" v-model="autoStart" class="mb-2" /> |
| 65 | + <UCheckbox |
| 66 | + label="Launch WoWthing Sync when you start your computer" |
| 67 | + v-model="autoStart" |
| 68 | + class="w-full justify-start" |
| 69 | + /> |
| 70 | + </div> |
30 | 71 | </div> |
31 | 72 | </template> |
32 | 73 |
|
33 | 74 | <script setup lang="ts"> |
34 | 75 | import { open } from '@tauri-apps/plugin-dialog'; |
35 | | - import { enable, isEnabled, disable } from "@tauri-apps/plugin-autostart"; |
36 | 76 |
|
37 | 77 | const apiKey = useApiKeys(); |
38 | 78 | const autoStart = useAutoStart(); |
|
0 commit comments