ishatalkin commited on
Commit
973387a
·
unverified ·
1 Parent(s): 415831f

feat: Enhance toast display to improve user experience (#1689) (#1690)

Browse files

1. Updated the Toast component to add a maximum width for the message to prevent it from stretching across the full screen.
2. Increased the timeout duration for error toasts from 3 seconds to 10 seconds to ensure long messages are readable.

src/lib/components/Toast.svelte CHANGED
@@ -14,6 +14,6 @@
14
  class="pointer-events-auto flex items-center rounded-full bg-white/90 px-3 py-1 shadow-sm dark:bg-gray-900/80"
15
  >
16
  <IconDazzled classNames="text-2xl mr-2" />
17
- <h2 class="font-semibold">{message}</h2>
18
  </div>
19
  </div>
 
14
  class="pointer-events-auto flex items-center rounded-full bg-white/90 px-3 py-1 shadow-sm dark:bg-gray-900/80"
15
  >
16
  <IconDazzled classNames="text-2xl mr-2" />
17
+ <h2 class="max-w-2xl font-semibold">{message}</h2>
18
  </div>
19
  </div>
src/routes/+layout.svelte CHANGED
@@ -43,7 +43,7 @@
43
  errorToastTimeout = setTimeout(() => {
44
  $error = null;
45
  currentError = null;
46
- }, 3000);
47
  }
48
 
49
  async function deleteConversation(id: string) {
 
43
  errorToastTimeout = setTimeout(() => {
44
  $error = null;
45
  currentError = null;
46
+ }, 10000);
47
  }
48
 
49
  async function deleteConversation(id: string) {