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 | </div> | 174 | </div> |
| 175 | <div v-else-if="feedback.type && !success"> | 175 | <div v-else-if="feedback.type && !success"> |
| 176 | <div class="mb-2"> | 176 | <div class="mb-2"> |
| 177 | <p class="desc">{{ helpfulDescription }} - {{ prompt }}</p> | 177 | <p class="desc">{{ helpfulDescription }}</p> |
| 178 | <span>{{ getFeedbackOption(feedback.type)?.label }}</span> | 178 | <span class="text-[22px] font-bold">{{ getFeedbackOption(feedback.type)?.label }}</span> |
| 179 | </div> | 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 | <details> | 182 | <details> |
| 183 | <summary> | 183 | <summary class="flex items-center gap-1"> |
| 184 | <span class="i-lucide-shield-x bg-cerise-400 mb-1 ml-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 | Things we won't add in the wiki | 187 | Things we won't add in the wiki |
| 186 | </summary> | 188 | </summary> |
| 187 | <ol> | 189 | <ol> |
| @@ -239,8 +241,10 @@ const toggleCard = () => (isCardShown.value = !isCardShown.value) | |||
| 239 | </ol> | 241 | </ol> |
| 240 | </details> | 242 | </details> |
| 241 | <details> | 243 | <details> |
| 242 | <summary> | 244 | <summary class="flex items-center gap-1"> |
| 243 | <span class="i-lucide-shield-alert bg-cerise-400 mb-1 ml-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 | Things we will try to avoid | 248 | Things we will try to avoid |
| 245 | </summary> | 249 | </summary> |
| 246 | <ol> | 250 | <ol> |
| @@ -260,8 +264,8 @@ const toggleCard = () => (isCardShown.value = !isCardShown.value) | |||
| 260 | <textarea | 264 | <textarea |
| 261 | v-model="feedback.message" | 265 | v-model="feedback.message" |
| 262 | autofocus | 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" | 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" |
| 264 | placeholder="Tip: Did you know that starring our GitHub repo doubles the chances that your feedback will be read?" | 268 | :placeholder="prompt" |
| 265 | /> | 269 | /> |
| 266 | <p class="desc mb-2"> | 270 | <p class="desc mb-2"> |
| 267 | If you want a reply to your feedback, feel free to mention a contact | 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 | color: var(--vp-c-text-2); | 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 | .fade-enter-active, | 397 | .fade-enter-active, |
| 349 | .fade-leave-active { | 398 | .fade-leave-active { |
| 350 | transition: opacity 0.25s ease; | 399 | transition: opacity 0.25s ease; |
| @@ -354,4 +403,4 @@ const toggleCard = () => (isCardShown.value = !isCardShown.value) | |||
| 354 | .fade-leave-to { | 403 | .fade-leave-to { |
| 355 | opacity: 0; | 404 | opacity: 0; |
| 356 | } | 405 | } |
| 357 | </style> | 406 | </style>\ No newline at end of file |