fix(ui): enable text wrapping for toast messages

- Add max-w-3xl to limit toast width (768px on desktop, 90vw on mobile)
- Use whitespace-pre-wrap to allow automatic line breaks
- Add break-words to prevent long words from overflowing
- Long error messages now wrap instead of extending off-screen
This commit is contained in:
t8y2 2026-06-22 14:58:56 +08:00
parent 4346192713
commit 7adee1cacf
1 changed files with 1 additions and 1 deletions

View File

@ -1548,7 +1548,7 @@ onUnmounted(() => {
</div>
<Teleport to="body">
<Transition name="toast">
<div v-if="toastVisible" class="fixed bottom-6 inset-x-0 w-max mx-auto z-99999 px-4 py-2 rounded-lg bg-foreground text-background text-sm shadow-lg select-text">
<div v-if="toastVisible" class="fixed bottom-6 inset-x-0 w-max max-w-[90vw] sm:max-w-3xl mx-auto z-99999 px-4 py-2 rounded-lg bg-foreground text-background text-sm shadow-lg select-text whitespace-pre-wrap break-words">
{{ toastMessage }}
</div>
</Transition>