2024-06-04 04:17:43 +00:00
|
|
|
<script lang="ts">
|
|
|
|
import { getAdminDetails } from '$lib/apis/auths';
|
|
|
|
import { onMount, tick, getContext } from 'svelte';
|
|
|
|
|
|
|
|
const i18n = getContext('i18n');
|
|
|
|
|
|
|
|
let adminDetails = null;
|
|
|
|
|
|
|
|
onMount(async () => {
|
|
|
|
adminDetails = await getAdminDetails(localStorage.token).catch((err) => {
|
|
|
|
console.error(err);
|
|
|
|
return null;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<div class="fixed w-full h-full flex z-[999]">
|
|
|
|
<div
|
|
|
|
class="absolute w-full h-full backdrop-blur-lg bg-white/10 dark:bg-gray-900/50 flex justify-center"
|
|
|
|
>
|
|
|
|
<div class="m-auto pb-10 flex flex-col justify-center">
|
|
|
|
<div class="max-w-md">
|
|
|
|
<div class="text-center dark:text-white text-2xl font-medium z-50">
|
2024-06-07 22:16:24 +00:00
|
|
|
{$i18n.t('Account Activation Pending')}<br />
|
|
|
|
{$i18n.t('Contact Admin for WebUI Access')}
|
2024-06-04 04:17:43 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class=" mt-4 text-center text-sm dark:text-gray-200 w-full">
|
2024-06-07 22:16:24 +00:00
|
|
|
{$i18n.t('Your account status is currently pending activation.')}<br />
|
|
|
|
{$i18n.t(
|
|
|
|
'To access the WebUI, please reach out to the administrator. Admins can manage user statuses from the Admin Panel.'
|
|
|
|
)}
|
2024-06-04 04:17:43 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
{#if adminDetails}
|
|
|
|
<div class="mt-4 text-sm font-medium text-center">
|
2024-06-06 05:12:45 +00:00
|
|
|
<div>{$i18n.t('Admin')}: {adminDetails.name} ({adminDetails.email})</div>
|
2024-06-04 04:17:43 +00:00
|
|
|
</div>
|
|
|
|
{/if}
|
|
|
|
|
|
|
|
<div class=" mt-6 mx-auto relative group w-fit">
|
|
|
|
<button
|
|
|
|
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"
|
|
|
|
on:click={async () => {
|
|
|
|
location.href = '/';
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
{$i18n.t('Check Again')}
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<button
|
|
|
|
class="text-xs text-center w-full mt-2 text-gray-400 underline"
|
|
|
|
on:click={async () => {
|
|
|
|
localStorage.removeItem('token');
|
|
|
|
location.href = '/auth';
|
|
|
|
}}>{$i18n.t('Sign Out')}</button
|
|
|
|
>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|