|
1 | 1 | <template> |
2 | | - <div v-if="isOpen" class="fixed inset-0 z-50 flex items-center justify-center bg-black/90" @click.self="closeModal"> |
3 | | - <div class="bg-white dark:bg-slate-900 rounded-lg shadow-xl w-full max-w-md mx-4 max-h-[90vh] overflow-y-auto"> |
4 | | - <div class="flex items-center justify-between p-6 border-b border-gray-200 dark:border-slate-700"> |
| 2 | + <div |
| 3 | + v-if="isOpen" |
| 4 | + class="fixed inset-0 z-50 flex items-center justify-center bg-black/90" |
| 5 | + @click.self="closeModal" |
| 6 | + > |
| 7 | + <div |
| 8 | + class="bg-white dark:bg-slate-900 rounded-lg shadow-xl w-full max-w-md mx-4 max-h-[90vh] overflow-y-auto" |
| 9 | + > |
| 10 | + <div |
| 11 | + class="flex items-center justify-between p-6 border-b border-gray-200 dark:border-slate-700" |
| 12 | + > |
5 | 13 | <h2 class="text-xl font-semibold text-gray-900 dark:text-white"> |
6 | 14 | {{ $t('post.editVideo') }} |
7 | 15 | </h2> |
8 | | - <button @click="closeModal" class="text-gray-400 hover:text-gray-600 dark:hover:text-gray-300"> |
| 16 | + <button |
| 17 | + @click="closeModal" |
| 18 | + class="text-gray-400 hover:text-gray-600 dark:hover:text-gray-300" |
| 19 | + > |
9 | 20 | <XMarkIcon class="h-6 w-6" /> |
10 | 21 | </button> |
11 | 22 | </div> |
|
15 | 26 | <label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2"> |
16 | 27 | {{ $t('post.caption') }} |
17 | 28 | </label> |
18 | | - <textarea v-model="formData.caption" |
| 29 | + <textarea |
| 30 | + v-model="formData.caption" |
19 | 31 | class="w-full px-3 py-2 border border-gray-300 dark:border-slate-600 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-[#F02C56] focus:border-[#F02C56] dark:bg-slate-800 dark:text-white resize-none" |
20 | | - rows="4" :placeholder="$t('post.writeYourCaptionDotDotDot')" maxlength="500" /> |
| 32 | + rows="4" |
| 33 | + :placeholder="$t('post.writeYourCaptionDotDotDot')" |
| 34 | + maxlength="500" |
| 35 | + /> |
21 | 36 | <div class="text-right text-sm text-gray-500 dark:text-gray-400 mt-1"> |
22 | 37 | {{ formData.caption.length }}/240 |
23 | 38 | </div> |
24 | 39 | </div> |
25 | 40 |
|
26 | 41 | <div> |
27 | | - <AnimatedButton @click="showAltText = !showAltText" type="button" variant="light" |
28 | | - class="flex w-full"> |
| 42 | + <AnimatedButton |
| 43 | + @click="showAltText = !showAltText" |
| 44 | + type="button" |
| 45 | + variant="light" |
| 46 | + class="flex w-full" |
| 47 | + > |
29 | 48 | <div class="flex items-center gap-2 text-sm font-medium"> |
30 | 49 | <div> |
31 | | - <svg :class="{ 'rotate-90': showAltText }" |
32 | | - class="h-4 w-4 transition-transform duration-200" fill="none" viewBox="0 0 24 24" |
33 | | - stroke="currentColor"> |
34 | | - <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" |
35 | | - d="M9 5l7 7-7 7" /> |
| 50 | + <svg |
| 51 | + :class="{ 'rotate-90': showAltText }" |
| 52 | + class="h-4 w-4 transition-transform duration-200" |
| 53 | + fill="none" |
| 54 | + viewBox="0 0 24 24" |
| 55 | + stroke="currentColor" |
| 56 | + > |
| 57 | + <path |
| 58 | + stroke-linecap="round" |
| 59 | + stroke-linejoin="round" |
| 60 | + stroke-width="2" |
| 61 | + d="M9 5l7 7-7 7" |
| 62 | + /> |
36 | 63 | </svg> |
37 | 64 | </div> |
38 | 65 | <div> |
|
48 | 75 | <p class="text-xs text-gray-500 dark:text-gray-400"> |
49 | 76 | {{ $t('studio.altTextHelp') }} |
50 | 77 | </p> |
51 | | - <textarea v-model="formData.altText" |
| 78 | + <textarea |
| 79 | + v-model="formData.altText" |
52 | 80 | class="w-full px-3 py-2 border border-gray-300 dark:border-slate-600 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-[#F02C56] focus:border-[#F02C56] dark:bg-slate-800 dark:text-white resize-none" |
53 | | - rows="3" :placeholder="$t('studio.describeYourVideoDotDotDotAltText')" maxlength="2000" /> |
| 81 | + rows="3" |
| 82 | + :placeholder="$t('studio.describeYourVideoDotDotDotAltText')" |
| 83 | + maxlength="2000" |
| 84 | + /> |
54 | 85 | <div class="text-right text-sm text-gray-500 dark:text-gray-400"> |
55 | 86 | {{ formData.altText.length }}/2000 |
56 | 87 | </div> |
|
124 | 155 | {{ $t('studio.language') }} |
125 | 156 | </label> |
126 | 157 | <div class="relative"> |
127 | | - <select v-model="formData.lang" |
128 | | - class="block w-full px-4 py-2 pr-8 text-gray-700 bg-white border border-gray-300 rounded-lg shadow-sm appearance-none focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors"> |
| 158 | + <select |
| 159 | + v-model="formData.lang" |
| 160 | + class="block w-full px-4 py-2 pr-8 text-gray-700 bg-white border border-gray-300 rounded-lg shadow-sm appearance-none focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-colors" |
| 161 | + > |
129 | 162 | <option value="" disabled selected> |
130 | 163 | {{ $t('studio.selectLanguage') }} |
131 | 164 | </option> |
|
134 | 167 | {{ lang.name }} |
135 | 168 | </option> |
136 | 169 | </select> |
137 | | - <div class="absolute inset-y-0 right-0 flex items-center px-2 pointer-events-none"> |
138 | | - <svg class="w-5 h-5 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
139 | | - <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" |
140 | | - d="M19 9l-7 7-7-7" /> |
| 170 | + <div |
| 171 | + class="absolute inset-y-0 right-0 flex items-center px-2 pointer-events-none" |
| 172 | + > |
| 173 | + <svg |
| 174 | + class="w-5 h-5 text-gray-400" |
| 175 | + fill="none" |
| 176 | + stroke="currentColor" |
| 177 | + viewBox="0 0 24 24" |
| 178 | + > |
| 179 | + <path |
| 180 | + stroke-linecap="round" |
| 181 | + stroke-linejoin="round" |
| 182 | + stroke-width="2" |
| 183 | + d="M19 9l-7 7-7-7" |
| 184 | + /> |
141 | 185 | </svg> |
142 | 186 | </div> |
143 | 187 | </div> |
|
168 | 212 | {{ $t('studio.disclosePostContentHelp') }} |
169 | 213 | </p> |
170 | 214 | </div> |
171 | | - <ToggleSwitch v-model="formData.containsAds" :disabled="formData.containsAds" /> |
| 215 | + <ToggleSwitch |
| 216 | + v-model="formData.containsAds" |
| 217 | + :disabled="formData.containsAds" |
| 218 | + /> |
172 | 219 | </div> |
173 | 220 |
|
174 | 221 | <div class="flex items-start justify-between gap-5"> |
|
180 | 227 | {{ $t('studio.containsAlteredContentHelp') }} |
181 | 228 | </p> |
182 | 229 | </div> |
183 | | - <ToggleSwitch v-model="formData.containsAiContent" :disabled="formData.containsAiContent" /> |
| 230 | + <ToggleSwitch |
| 231 | + v-model="formData.containsAiContent" |
| 232 | + :disabled="formData.containsAiContent" |
| 233 | + /> |
184 | 234 | </div> |
185 | 235 | </div> |
186 | 236 |
|
|
195 | 245 | <p class="text-sm text-red-700 dark:text-red-300 mt-1"> |
196 | 246 | {{ $t('post.thisActionCannotBeUndone') }} |
197 | 247 | </p> |
198 | | - <button @click="confirmDelete" |
199 | | - class="mt-3 bg-red-600 hover:bg-red-700 text-white text-sm font-medium py-2 px-4 rounded-md transition-colors duration-200"> |
| 248 | + <button |
| 249 | + @click="confirmDelete" |
| 250 | + class="mt-3 bg-red-600 hover:bg-red-700 text-white text-sm font-medium py-2 px-4 rounded-md transition-colors duration-200" |
| 251 | + > |
200 | 252 | {{ $t('post.deleteVideo') }} |
201 | 253 | </button> |
202 | 254 | </div> |
|
206 | 258 | </div> |
207 | 259 |
|
208 | 260 | <div |
209 | | - class="flex items-center justify-end gap-3 px-6 py-4 border-t border-gray-200 dark:border-slate-700 bg-gray-50 dark:bg-slate-800 rounded-b-lg"> |
210 | | - <button @click="closeModal" |
211 | | - class="px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-slate-700 border border-gray-300 dark:border-slate-600 rounded-md hover:bg-gray-50 dark:hover:bg-slate-600 transition-colors duration-200 cursor-pointer"> |
| 261 | + class="flex items-center justify-end gap-3 px-6 py-4 border-t border-gray-200 dark:border-slate-700 bg-gray-50 dark:bg-slate-800 rounded-b-lg" |
| 262 | + > |
| 263 | + <button |
| 264 | + @click="closeModal" |
| 265 | + class="px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 bg-white dark:bg-slate-700 border border-gray-300 dark:border-slate-600 rounded-md hover:bg-gray-50 dark:hover:bg-slate-600 transition-colors duration-200 cursor-pointer" |
| 266 | + > |
212 | 267 | {{ $t('common.cancel') }} |
213 | 268 | </button> |
214 | | - <button @click="saveChanges" :disabled="isSaving" |
215 | | - class="px-4 py-2 text-sm font-medium text-white bg-[#F02C56] hover:bg-red-600 disabled:bg-red-300 disabled:cursor-not-allowed rounded-md transition-colors duration-200 flex items-center cursor-pointer"> |
| 269 | + <button |
| 270 | + @click="saveChanges" |
| 271 | + :disabled="isSaving" |
| 272 | + class="px-4 py-2 text-sm font-medium text-white bg-[#F02C56] hover:bg-red-600 disabled:bg-red-300 disabled:cursor-not-allowed rounded-md transition-colors duration-200 flex items-center cursor-pointer" |
| 273 | + > |
216 | 274 | <Spinner v-if="isSaving" size="sm" class="mr-2" /> |
217 | 275 | {{ isSaving ? $t('common.savingDotDotDot') : $t('post.saveChanges') }} |
218 | 276 | </button> |
|
0 commit comments