AccountPending.svelte 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <script lang="ts">
  2. import { getAdminDetails } from '$lib/apis/auths';
  3. import { onMount, tick, getContext } from 'svelte';
  4. const i18n = getContext('i18n');
  5. let adminDetails = null;
  6. onMount(async () => {
  7. adminDetails = await getAdminDetails(localStorage.token).catch((err) => {
  8. console.error(err);
  9. return null;
  10. });
  11. });
  12. </script>
  13. <div class="fixed w-full h-full flex z-[999]">
  14. <div
  15. class="absolute w-full h-full backdrop-blur-lg bg-white/10 dark:bg-gray-900/50 flex justify-center"
  16. >
  17. <div class="m-auto pb-10 flex flex-col justify-center">
  18. <div class="max-w-md">
  19. <div class="text-center dark:text-white text-2xl font-medium z-50">
  20. Account Activation Pending<br /> Contact Admin for WebUI Access
  21. </div>
  22. <div class=" mt-4 text-center text-sm dark:text-gray-200 w-full">
  23. Your account status is currently pending activation.<br /> To access the WebUI, please reach
  24. out to the administrator. Admins can manage user statuses from the Admin Panel.
  25. </div>
  26. {#if adminDetails}
  27. <div class="mt-4 text-sm font-medium text-center">
  28. <div>Admin: {adminDetails.name} ({adminDetails.email})</div>
  29. </div>
  30. {/if}
  31. <div class=" mt-6 mx-auto relative group w-fit">
  32. <button
  33. class="relative z-20 flex px-5 py-2 rounded-full bg-white border border-gray-100 dark:border-none hover:bg-gray-100 text-gray-700 transition font-medium text-sm"
  34. on:click={async () => {
  35. location.href = '/';
  36. }}
  37. >
  38. {$i18n.t('Check Again')}
  39. </button>
  40. <button
  41. class="text-xs text-center w-full mt-2 text-gray-400 underline"
  42. on:click={async () => {
  43. localStorage.removeItem('token');
  44. location.href = '/auth';
  45. }}>{$i18n.t('Sign Out')}</button
  46. >
  47. </div>
  48. </div>
  49. </div>
  50. </div>
  51. </div>