|
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_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> |
66 | 68 | <div class=" image-container grid grid-cols-[1fr_52px_1fr]"> |
67 | 69 | <span class="pb-2 text-sm font-medium text-gray-500 dark:text-gray-400">{{ $t('Original image') }}</span> |
68 | 70 | <div></div> |
69 | | - <span class="pb-2 text-sm font-medium text-gray-500 dark:text-gray-400">{{ $t('Generated image') }}</span> |
| 71 | + <span class="pb-2 text-xs sm:text-sm font-medium text-gray-500 dark:text-gray-400">{{ $t('Generated image') }}</span> |
70 | 72 | <div |
71 | 73 | 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 | 74 | :class="requestAttachmentFilesUrls.length ? 'cursor-zoom-in' : ''" |
|
77 | 79 | :src="requestAttachmentFilesUrls[0]" |
78 | 80 | class="w-full h-full object-cover" |
79 | 81 | /> |
80 | | - <span v-else class="text-gray-400 dark:text-gray-500 text-sm">{{ $t('No image') }}</span> |
| 82 | + <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 | 83 | </div> |
82 | 84 |
|
83 | 85 | <div class="flex items-center justify-center"> |
|
131 | 133 | /> |
132 | 134 | </div> |
133 | 135 | <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"> |
134 | | - <span v-if="!loadingTimer" class="text-gray-400 dark:text-gray-500 text-sm">{{ $t('Your generated image will appear here') }}</span> |
| 136 | + <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> |
135 | 137 | </div> |
136 | 138 | </div> |
137 | 139 | </div> |
|
161 | 163 | </div> |
162 | 164 | </div> |
163 | 165 | <!-- Modal footer --> |
164 | | - <div class="flex items-center justify-between px-6 py-4 border-t border-gray-200 dark:border-gray-700"> |
| 166 | + <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"> |
165 | 167 | <div class="flex items-center gap-2"> |
166 | 168 | <Button |
167 | 169 | @click="confirmImage" |
168 | 170 | :disabled="loading || images.length === 0" |
169 | 171 | variant="primary" |
| 172 | + class="flex-1 sm:flex-none" |
170 | 173 | >{{ $t('Use image') }}</Button> |
171 | 174 | <Button |
172 | 175 | @click="() => { stopGeneration = true; emit('close') }" |
173 | 176 | variant="secondary" |
| 177 | + class="flex-1 sm:flex-none" |
174 | 178 | >{{ $t('Cancel') }}</Button> |
175 | 179 | </div> |
176 | 180 | <Button |
177 | 181 | @click="generateImages" |
178 | 182 | :disabled="loading" |
179 | 183 | variant="primary" |
| 184 | + class="w-full sm:w-auto" |
180 | 185 | >{{ $t('Generate images') }}</Button> |
181 | 186 | </div> |
182 | 187 |
|
|
0 commit comments