|
6 | 6 | <!-- Modal content --> |
7 | 7 | <div class="relative bg-white rounded-xl shadow-2xl dark:bg-gray-800"> |
8 | 8 | <!-- Header --> |
9 | | - <div class="flex items-center justify-between px-6 py-4 border-b border-gray-200 dark:border-gray-700"> |
10 | | - <h3 class="text-lg font-semibold text-gray-900 dark:text-white"> |
| 9 | + <div class="flex items-center justify-between px-4 py-3 sm:px-6 sm:py-4 border-b border-gray-200 dark:border-gray-700"> |
| 10 | + <h3 class="text-base sm:text-lg font-semibold text-gray-900 dark:text-white"> |
11 | 11 | {{ $t('Generate image with AI') }} |
12 | 12 | </h3> |
13 | 13 | <button type="button" |
|
20 | 20 | </button> |
21 | 21 | </div> |
22 | 22 | <!-- Modal body --> |
23 | | - <div class="px-6 py-5 space-y-4"> |
| 23 | + <div class="px-4 py-4 sm:px-6 sm:py-5 space-y-4"> |
24 | 24 | <!-- PROMPT TEXTAREA --> |
25 | 25 | <!-- Textarea --> |
26 | 26 | <textarea |
|
63 | 63 | <Skeleton v-else type="image" class="w-14 h-14" /> |
64 | 64 | </div> |
65 | 65 |
|
66 | | - <div class="grid grid-cols-[1fr_52px_1fr]"> |
67 | | - <span class="pb-2 text-sm font-medium text-gray-500 dark:text-gray-400">{{ $t('Original image') }}</span> |
| 66 | + <div class="grid grid-cols-[1fr_32px_1fr] sm:grid-cols-[1fr_52px_1fr]"> |
| 67 | + <span class="pb-2 text-xs sm:text-sm font-medium text-gray-500 dark:text-gray-400">{{ $t('Original image') }}</span> |
68 | 68 | <div></div> |
69 | | - <span class="pb-2 text-sm font-medium text-gray-500 dark:text-gray-400">{{ $t('Generated image') }}</span> |
| 69 | + <span class="pb-2 text-xs sm:text-sm font-medium text-gray-500 dark:text-gray-400">{{ $t('Generated image') }}</span> |
70 | 70 | <div |
71 | 71 | class="rounded-xl overflow-hidden bg-gray-50 dark:bg-gray-700 border border-gray-200 dark:border-gray-600 aspect-[4/3] flex items-center justify-center" |
72 | 72 | :class="requestAttachmentFilesUrls.length ? 'cursor-zoom-in' : ''" |
|
77 | 77 | :src="requestAttachmentFilesUrls[0]" |
78 | 78 | class="w-full h-full object-cover" |
79 | 79 | /> |
80 | | - <span v-else class="text-gray-400 dark:text-gray-500 text-sm">{{ $t('No image') }}</span> |
| 80 | + <span v-else class="text-gray-400 dark:text-gray-500 text-xs sm:text-sm px-2 text-center">{{ $t('No image') }}</span> |
81 | 81 | </div> |
82 | 82 |
|
83 | 83 | <div class="flex items-center justify-center"> |
|
125 | 125 | /> |
126 | 126 | </div> |
127 | 127 | <div v-if="images.length === 0" class="w-full h-full flex items-center justify-center border-2 border-dashed border-gray-200 dark:border-gray-600 rounded-xl bg-gray-50 dark:bg-gray-700"> |
128 | | - <span v-if="!loadingTimer" class="text-gray-400 dark:text-gray-500 text-sm">{{ $t('Your generated image will appear here') }}</span> |
| 128 | + <span v-if="!loadingTimer" class="text-gray-400 dark:text-gray-500 text-xs sm:text-sm px-2 text-center">{{ $t('Your generated image will appear here') }}</span> |
129 | 129 | </div> |
130 | 130 | </div> |
131 | 131 | </div> |
|
155 | 155 | </div> |
156 | 156 | </div> |
157 | 157 | <!-- Modal footer --> |
158 | | - <div class="flex items-center justify-between px-6 py-4 border-t border-gray-200 dark:border-gray-700"> |
| 158 | + <div class="flex flex-col-reverse gap-3 sm:flex-row sm:items-center sm:justify-between sm:gap-2 px-4 py-3 sm:px-6 sm:py-4 border-t border-gray-200 dark:border-gray-700"> |
159 | 159 | <div class="flex items-center gap-2"> |
160 | 160 | <Button |
161 | 161 | @click="confirmImage" |
162 | 162 | :disabled="loading || images.length === 0" |
163 | 163 | variant="primary" |
| 164 | + class="flex-1 sm:flex-none" |
164 | 165 | >{{ $t('Use image') }}</Button> |
165 | 166 | <Button |
166 | 167 | @click="() => { stopGeneration = true; emit('close') }" |
167 | 168 | variant="secondary" |
| 169 | + class="flex-1 sm:flex-none" |
168 | 170 | >{{ $t('Cancel') }}</Button> |
169 | 171 | </div> |
170 | 172 | <Button |
171 | 173 | @click="generateImages" |
172 | 174 | :disabled="loading" |
173 | 175 | variant="primary" |
| 176 | + class="w-full sm:w-auto" |
174 | 177 | >{{ $t('Generate images') }}</Button> |
175 | 178 | </div> |
176 | 179 |
|
|
0 commit comments