Added almost all features except language, ads, seo, pages
This commit is contained in:
@@ -21,8 +21,18 @@
|
||||
</div>
|
||||
|
||||
<flux:navlist variant="outline">
|
||||
<flux:button class="cursor-pointer inbox-btn" variant="filled" icon="inbox" x-on:click="$dispatch('getEmail')">Inbox</flux:button>
|
||||
<flux:button class="mt-2 cursor-pointer" variant="filled" icon="refresh-cw" x-on:click="$dispatch('fetchMessages')">Refresh</flux:button>
|
||||
<flux:button class="cursor-pointer inbox-btn" variant="filled" icon="inbox" x-on:click="window.location.href = '{{ route('mailbox') }}'">Inbox</flux:button>
|
||||
{{-- <flux:button class="mt-2 cursor-pointer" variant="filled" icon="refresh-cw" x-on:click="Livewire.dispatch('fetchMessages')">Refresh</flux:button>--}}
|
||||
<button type="button" class="relative items-center font-medium justify-center gap-2 whitespace-nowrap disabled:opacity-75 dark:disabled:opacity-75 disabled:cursor-default disabled:pointer-events-none h-10 text-sm rounded-lg px-4 inline-flex bg-zinc-800/5 hover:bg-zinc-800/10 dark:bg-white/10 dark:hover:bg-white/20 text-zinc-800 dark:text-white [[data-flux-button-group]_&]:border-e [:is([data-flux-button-group]>&:last-child,_[data-flux-button-group]_:last-child>&)]:border-e-0 [[data-flux-button-group]_&]:border-zinc-200/80 dark:[[data-flux-button-group]_&]:border-zinc-900/50 mt-2 cursor-pointer" data-flux-button="data-flux-button" data-flux-group-target="data-flux-group-target" x-on:click="Livewire.dispatch('fetchMessages'); document.getElementById('refresh-icon').classList.add('animate-spin')">
|
||||
<svg id="refresh-icon" class="shrink-0 [:where(&)]:size-4" data-flux-icon="" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" data-slot="icon">
|
||||
<path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"></path>
|
||||
<path d="M21 3v5h-5"></path>
|
||||
<path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"></path>
|
||||
<path d="M8 16H3v5"></path>
|
||||
</svg>
|
||||
|
||||
{{ __('Refresh') }}
|
||||
</button>
|
||||
</flux:navlist>
|
||||
<img src="https://placehold.co/300x250?font=roboto" alt="sideAds" />
|
||||
<flux:spacer />
|
||||
@@ -34,8 +44,9 @@
|
||||
<flux:navlist.item href="#">Contacts</flux:navlist.item>
|
||||
<flux:separator variant="subtle" />
|
||||
</flux:navlist>
|
||||
<p>© {{ config('app.settings.app_name') }}</p>
|
||||
<p class="text-sm font-medium">© {{ config('app.settings.app_name') }}</p>
|
||||
</flux:sidebar>
|
||||
|
||||
<flux:header sticky container class="bg-zinc-50 dark:bg-zinc-900 border-b border-zinc-200 dark:border-zinc-700">
|
||||
<flux:sidebar.toggle class="lg:hidden" icon="bars-3" inset="left" />
|
||||
<flux:separator vertical class="lg:hidden lg:mx-0 mx-3" />
|
||||
@@ -43,14 +54,27 @@
|
||||
<livewire:frontend.email type="header"/>
|
||||
<flux:spacer />
|
||||
<flux:navbar class="me-4">
|
||||
<flux:tooltip content="Language">
|
||||
<flux:button x-data x-on:click="" icon="language" variant="subtle" aria-label="Language" />
|
||||
</flux:tooltip>
|
||||
|
||||
<flux:dropdown position="top" align="start">
|
||||
<flux:tooltip content="Language">
|
||||
<flux:button x-data x-on:click="" icon="language" variant="subtle" aria-label="Language" />
|
||||
</flux:tooltip>
|
||||
<flux:menu>
|
||||
<span>
|
||||
@foreach(config('app.locales') as $item => $language)
|
||||
<span x-on:click="window.location.href ='{{ route('locale', $language) }}'" role="menuitem" class="cursor-pointer group dark:hover:bg-zinc-600/75 dark:hover:text-gray-300 dark:focus:bg-zinc-600/75 dark:focus:text-gray-300 flex items-center px-4 py-2 dark:text-gray-400 text-gray-700 hover:text-gray-900 focus:text-gray-900 text-sm leading-5 hover:bg-gray-100 focus:bg-gray-100 focus:outline-none truncate">{{ config('app.locales_text')[$item] }}</span>
|
||||
@endforeach
|
||||
</span>
|
||||
</flux:menu>
|
||||
</flux:dropdown>
|
||||
|
||||
<flux:tooltip content="Switch Theme">
|
||||
<flux:button x-data x-on:click="$flux.dark = ! $flux.dark" icon="moon" variant="subtle" aria-label="Toggle dark mode" />
|
||||
</flux:tooltip>
|
||||
<flux:dropdown position="top" align="start">
|
||||
<flux:tooltip content="Account">
|
||||
<flux:button icon="circle-user-round" variant="subtle" aria-label="Account" />
|
||||
</flux:tooltip>
|
||||
<flux:menu>
|
||||
<flux:text class="p-1">You are signed in as:</flux:text>
|
||||
<div wire:ignore>
|
||||
@@ -71,57 +95,92 @@
|
||||
</flux:dropdown>
|
||||
</flux:navbar>
|
||||
|
||||
<flux:modal name="create-account" class="md:w-96">
|
||||
<div class="space-y-6">
|
||||
<div>
|
||||
<flux:heading size="lg">Generate Your Temporary Email</flux:heading>
|
||||
</div>
|
||||
|
||||
|
||||
<livewire:frontend.action action="customEmail" />
|
||||
|
||||
<flux:separator text="or" />
|
||||
|
||||
<div class="flex w-full">
|
||||
<div class="w-1/2">
|
||||
<livewire:frontend.action action="random" />
|
||||
</div>
|
||||
<div class="w-1/2">
|
||||
<livewire:frontend.action action="gmail" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</flux:modal>
|
||||
|
||||
<flux:modal name="delete-account" class="min-w-[22rem]">
|
||||
<div class="space-y-6">
|
||||
<div>
|
||||
<flux:heading size="lg">Delete account?</flux:heading>
|
||||
<flux:text class="mt-2">
|
||||
<p>You're about to delete this account.</p>
|
||||
</flux:text>
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<flux:spacer />
|
||||
<flux:modal.close>
|
||||
<flux:button variant="ghost">Cancel</flux:button>
|
||||
</flux:modal.close>
|
||||
<livewire:frontend.action action="delete" />
|
||||
</div>
|
||||
</div>
|
||||
</flux:modal>
|
||||
</flux:header>
|
||||
|
||||
|
||||
<flux:modal name="create-account" class="md:w-96">
|
||||
<div class="space-y-6">
|
||||
<div>
|
||||
<flux:heading size="lg">Generate Your Temporary Email</flux:heading>
|
||||
</div>
|
||||
|
||||
|
||||
<livewire:frontend.action action="customEmail" />
|
||||
|
||||
<flux:separator text="or" />
|
||||
|
||||
<div class="flex w-full">
|
||||
<div class="w-1/2">
|
||||
<livewire:frontend.action action="random" />
|
||||
</div>
|
||||
<div class="w-1/2">
|
||||
<livewire:frontend.action action="gmail" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</flux:modal>
|
||||
|
||||
<flux:modal name="delete-account" class="min-w-[22rem]">
|
||||
<div class="space-y-6">
|
||||
<div>
|
||||
<flux:heading size="lg">Delete account?</flux:heading>
|
||||
<flux:text class="mt-2">
|
||||
<p>You're about to delete this account.</p>
|
||||
</flux:text>
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<flux:spacer />
|
||||
<flux:modal.close>
|
||||
<flux:button variant="ghost">Cancel</flux:button>
|
||||
</flux:modal.close>
|
||||
<livewire:frontend.action action="delete" />
|
||||
</div>
|
||||
</div>
|
||||
</flux:modal>
|
||||
|
||||
<flux:main class="dark:bg-gray-900 bg-gray-100">
|
||||
{{ $slot }}
|
||||
</flux:main>
|
||||
<!-- Toast Container -->
|
||||
|
||||
<div id="toast-container" class="fixed top-5 left-1/2 transform -translate-x-1/2 z-50 space-y-4"></div>
|
||||
|
||||
@fluxScripts
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
setTimeout(() => {
|
||||
const email = '{{ App\Models\ZEmail::getEmail(true) }}';
|
||||
const add_mail_in_title = "{{ json_decode(config('app.settings.configuration_settings'))->add_mail_in_title ? 'yes' : 'no' }}"
|
||||
if(add_mail_in_title === 'yes') {
|
||||
document.title += ` - ${email}`;
|
||||
}
|
||||
Livewire.dispatch('updateEmail');
|
||||
}, 2000);
|
||||
|
||||
|
||||
document.addEventListener('stopLoader', () => {
|
||||
document.querySelectorAll('#refresh-icon').forEach(el => {
|
||||
setTimeout(() => {
|
||||
el.classList.remove('animate-spin');
|
||||
}, 1000);
|
||||
});
|
||||
});
|
||||
let counter = parseInt({{ json_decode(config('app.settings.configuration_settings'))->fetch_seconds }});
|
||||
|
||||
setInterval(() => {
|
||||
if (counter === 0 && document.getElementById('imap-error') === null && !document.hidden) {
|
||||
document.querySelectorAll('#refresh-icon').forEach(el => {
|
||||
el.classList.add('animate-spin');
|
||||
});
|
||||
Livewire.dispatch('fetchMessages');
|
||||
counter = parseInt({{ json_decode(config('app.settings.configuration_settings'))->fetch_seconds }});
|
||||
}
|
||||
|
||||
counter--;
|
||||
if(document.hidden) {
|
||||
counter = 1;
|
||||
}
|
||||
|
||||
}, 1000);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user