Commit 29069d7af4
Unsigned
Layout: unified · split
docs/.vitepress/theme/components/Feedback.vue +59 −10
| @@ -174,14 +174,16 @@ const toggleCard = () => (isCardShown.value = !isCardShown.value) | ||
| 174 | 174 | </div> |
| 175 | 175 | <div v-else-if="feedback.type && !success"> |
| 176 | 176 | <div class="mb-2"> |
| 177 | <p class="desc">{{ helpfulDescription }} - {{ prompt }}</p> | |
| 178 | <span>{{ getFeedbackOption(feedback.type)?.label }}</span> | |
| 177 | <p class="desc">{{ helpfulDescription }}</p> | |
| 178 | <span class="text-[22px] font-bold">{{ getFeedbackOption(feedback.type)?.label }}</span> | |
| 179 | 179 | </div> |
| 180 | 180 | |
| 181 | <div v-if="feedback.type === 'suggestion'" class="mb-2 text-sm"> | |
| 181 | <div v-if="feedback.type === 'submit'" class="mb-2 text-sm"> | |
| 182 | 182 | <details> |
| 183 | <summary> | |
| 184 | <span class="i-lucide-shield-x bg-cerise-400 mb-1 ml-1" /> | |
| 183 | <summary class="flex items-center gap-1"> | |
| 184 | <span class="i-lucide-arrow-right arrow-right" /> | |
| 185 | <span class="i-lucide-arrow-down arrow-down" /> | |
| 186 | <span class="i-lucide-shield-x bg-cerise-400" /> | |
| 185 | 187 | Things we won't add in the wiki |
| 186 | 188 | </summary> |
| 187 | 189 | <ol> |
| @@ -239,8 +241,10 @@ const toggleCard = () => (isCardShown.value = !isCardShown.value) | ||
| 239 | 241 | </ol> |
| 240 | 242 | </details> |
| 241 | 243 | <details> |
| 242 | <summary> | |
| 243 | <span class="i-lucide-shield-alert bg-cerise-400 mb-1 ml-1" /> | |
| 244 | <summary class="flex items-center gap-1"> | |
| 245 | <span class="i-lucide-arrow-right arrow-right" /> | |
| 246 | <span class="i-lucide-arrow-down arrow-down" /> | |
| 247 | <span class="i-lucide-shield-alert bg-yellow-400" /> | |
| 244 | 248 | Things we will try to avoid |
| 245 | 249 | </summary> |
| 246 | 250 | <ol> |
| @@ -260,8 +264,8 @@ const toggleCard = () => (isCardShown.value = !isCardShown.value) | ||
| 260 | 264 | <textarea |
| 261 | 265 | v-model="feedback.message" |
| 262 | 266 | autofocus |
| 263 | class="bg-$vp-c-bg-alt text-$vp-c-text-2 w-full h-[100px] border border-$vp-c-divider rounded px-3 py-1.5 border-$vp-c-divider bg-$vp-c-bg-alt b-rd-4 border-2 border-solid" | |
| 264 | placeholder="Tip: Did you know that starring our GitHub repo doubles the chances that your feedback will be read?" | |
| 267 | class="feedback-textarea bg-$vp-c-bg-alt text-$vp-c-text-2 w-full h-[100px] border border-$vp-c-divider rounded px-3 py-1.5 border-$vp-c-divider bg-$vp-c-bg-alt b-rd-4 border-2 border-solid" | |
| 268 | :placeholder="prompt" | |
| 265 | 269 | /> |
| 266 | 270 | <p class="desc mb-2"> |
| 267 | 271 | If you want a reply to your feedback, feel free to mention a contact |
| @@ -345,6 +349,51 @@ const toggleCard = () => (isCardShown.value = !isCardShown.value) | ||
| 345 | 349 | color: var(--vp-c-text-2); |
| 346 | 350 | } |
| 347 | 351 | |
| 352 | .prompt-text { | |
| 353 | display: block; | |
| 354 | font-size: 10px; | |
| 355 | color: var(--vp-c-text-2); | |
| 356 | opacity: 0.75; | |
| 357 | } | |
| 358 | ||
| 359 | .feedback-textarea { | |
| 360 | font-size: 14px; | |
| 361 | } | |
| 362 | ||
| 363 | .feedback-textarea::placeholder { | |
| 364 | font-size: 12px; | |
| 365 | } | |
| 366 | ||
| 367 | details summary { | |
| 368 | display: flex; | |
| 369 | align-items: center; | |
| 370 | gap: 0.25rem; | |
| 371 | cursor: pointer; | |
| 372 | list-style: none; | |
| 373 | } | |
| 374 | ||
| 375 | details summary::-webkit-details-marker { | |
| 376 | display: none; | |
| 377 | } | |
| 378 | ||
| 379 | details summary .arrow-right { | |
| 380 | display: inline-block; | |
| 381 | flex-shrink: 0; | |
| 382 | } | |
| 383 | ||
| 384 | details summary .arrow-down { | |
| 385 | display: none; | |
| 386 | flex-shrink: 0; | |
| 387 | } | |
| 388 | ||
| 389 | details[open] summary .arrow-right { | |
| 390 | display: none; | |
| 391 | } | |
| 392 | ||
| 393 | details[open] summary .arrow-down { | |
| 394 | display: inline-block; | |
| 395 | } | |
| 396 | ||
| 348 | 397 | .fade-enter-active, |
| 349 | 398 | .fade-leave-active { |
| 350 | 399 | transition: opacity 0.25s ease; |
| @@ -354,4 +403,4 @@ const toggleCard = () => (isCardShown.value = !isCardShown.value) | ||
| 354 | 403 | .fade-leave-to { |
| 355 | 404 | opacity: 0; |
| 356 | 405 | } |
| 357 | </style> | |
| 406 | </style> | |
| \ No newline at end of file | ||