|
1 | 1 | <template> |
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 | | - > |
| 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"> |
13 | 5 | <h2 class="text-xl font-semibold text-gray-900 dark:text-white"> |
14 | 6 | {{ $t('post.editVideo') }} |
15 | 7 | </h2> |
16 | | - <button |
17 | | - @click="closeModal" |
18 | | - class="text-gray-400 hover:text-gray-600 dark:hover:text-gray-300" |
19 | | - > |
| 8 | + <button @click="closeModal" class="text-gray-400 hover:text-gray-600 dark:hover:text-gray-300"> |
20 | 9 | <XMarkIcon class="h-6 w-6" /> |
21 | 10 | </button> |
22 | 11 | </div> |
|
26 | 15 | <label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2"> |
27 | 16 | {{ $t('post.caption') }} |
28 | 17 | </label> |
29 | | - <textarea |
30 | | - v-model="formData.caption" |
| 18 | + <textarea v-model="formData.caption" |
31 | 19 | 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" |
32 | | - rows="4" |
33 | | - :placeholder="$t('post.writeYourCaptionDotDotDot')" |
34 | | - maxlength="500" |
35 | | - /> |
| 20 | + rows="4" :placeholder="$t('post.writeYourCaptionDotDotDot')" maxlength="500" /> |
36 | 21 | <div class="text-right text-sm text-gray-500 dark:text-gray-400 mt-1"> |
37 | 22 | {{ formData.caption.length }}/240 |
38 | 23 | </div> |
39 | 24 | </div> |
40 | 25 |
|
41 | 26 | <div> |
42 | | - <AnimatedButton |
43 | | - @click="showAltText = !showAltText" |
44 | | - type="button" |
45 | | - variant="light" |
46 | | - class="flex w-full" |
47 | | - > |
| 27 | + <AnimatedButton @click="showAltText = !showAltText" type="button" variant="light" |
| 28 | + class="flex w-full"> |
48 | 29 | <div class="flex items-center gap-2 text-sm font-medium"> |
49 | 30 | <div> |
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 | | - /> |
| 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" /> |
63 | 36 | </svg> |
64 | 37 | </div> |
65 | 38 | <div> |
|
75 | 48 | <p class="text-xs text-gray-500 dark:text-gray-400"> |
76 | 49 | {{ $t('studio.altTextHelp') }} |
77 | 50 | </p> |
78 | | - <textarea |
79 | | - v-model="formData.altText" |
| 51 | + <textarea v-model="formData.altText" |
80 | 52 | 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" |
81 | | - rows="3" |
82 | | - :placeholder="$t('studio.describeYourVideoDotDotDotAltText')" |
83 | | - maxlength="2000" |
84 | | - /> |
| 53 | + rows="3" :placeholder="$t('studio.describeYourVideoDotDotDotAltText')" maxlength="2000" /> |
85 | 54 | <div class="text-right text-sm text-gray-500 dark:text-gray-400"> |
86 | 55 | {{ formData.altText.length }}/2000 |
87 | 56 | </div> |
|
155 | 124 | {{ $t('studio.language') }} |
156 | 125 | </label> |
157 | 126 | <div class="relative"> |
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 | | - > |
| 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"> |
162 | 129 | <option value="" disabled selected> |
163 | 130 | {{ $t('studio.selectLanguage') }} |
164 | 131 | </option> |
|
167 | 134 | {{ lang.name }} |
168 | 135 | </option> |
169 | 136 | </select> |
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 | | - /> |
| 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" /> |
185 | 141 | </svg> |
186 | 142 | </div> |
187 | 143 | </div> |
|
212 | 168 | {{ $t('studio.disclosePostContentHelp') }} |
213 | 169 | </p> |
214 | 170 | </div> |
215 | | - <ToggleSwitch |
216 | | - v-model="formData.containsAds" |
217 | | - :disabled="formData.containsAds" |
218 | | - /> |
| 171 | + <ToggleSwitch v-model="formData.containsAds" :disabled="formData.containsAds" /> |
219 | 172 | </div> |
220 | 173 |
|
221 | 174 | <div class="flex items-start justify-between gap-5"> |
|
227 | 180 | {{ $t('studio.containsAlteredContentHelp') }} |
228 | 181 | </p> |
229 | 182 | </div> |
230 | | - <ToggleSwitch |
231 | | - v-model="formData.containsAiContent" |
232 | | - :disabled="formData.containsAiContent" |
233 | | - /> |
| 183 | + <ToggleSwitch v-model="formData.containsAiContent" :disabled="formData.containsAiContent" /> |
234 | 184 | </div> |
235 | 185 | </div> |
236 | 186 |
|
|
245 | 195 | <p class="text-sm text-red-700 dark:text-red-300 mt-1"> |
246 | 196 | {{ $t('post.thisActionCannotBeUndone') }} |
247 | 197 | </p> |
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 | | - > |
| 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"> |
252 | 200 | {{ $t('post.deleteVideo') }} |
253 | 201 | </button> |
254 | 202 | </div> |
|
258 | 206 | </div> |
259 | 207 |
|
260 | 208 | <div |
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 | | - > |
| 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"> |
267 | 212 | {{ $t('common.cancel') }} |
268 | 213 | </button> |
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 | | - > |
| 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"> |
274 | 216 | <Spinner v-if="isSaving" size="sm" class="mr-2" /> |
275 | 217 | {{ isSaving ? $t('common.savingDotDotDot') : $t('post.saveChanges') }} |
276 | 218 | </button> |
|
0 commit comments