PopUp.svelte 838 B

12345678910111213141516171819202122232425262728
  1. <script>
  2. import { onMount } from 'svelte';
  3. import { goto } from '$app/navigation';
  4. import { tokenValidation } from '$lib/utils/store';
  5. $: showPopup = $tokenValidation;
  6. function returnLogin() {
  7. goto('/login');
  8. }
  9. </script>
  10. {#if showPopup}
  11. <div class="fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50">
  12. <div class="w-full max-w-md space-y-6 rounded-2xl bg-white p-8 text-center shadow-lg">
  13. <h1 class="text-xl font-semibold text-gray-800">Token expirado</h1>
  14. <p class="text-gray-600">
  15. Sua sessão expirou. Retorne ao login para realizar a validação novamente.
  16. </p>
  17. <button
  18. onclick={returnLogin}
  19. class="rounded-lg bg-red-400 px-6 py-2 text-white transition duration-300 hover:bg-red-600"
  20. >
  21. Voltar ao login
  22. </button>
  23. </div>
  24. </div>
  25. {/if}