Added Create Custom, Random, Gmail Generation

This commit is contained in:
Gitea
2025-04-25 17:43:35 +05:30
parent b799ac3f9a
commit 9aa1b3ab8e
39 changed files with 1867 additions and 136 deletions

View File

@@ -0,0 +1,51 @@
<div>
<div class="bg-white shadow rounded-lg p-6">
<!-- Email Address Display -->
<div class="mb-6">
<h2 class="text-2xl font-bold mb-2">Your Disposable Email</h2>
<div class="flex items-center space-x-4">
<input type="text" value="{{ $currentEmail }}" readonly class="flex-1 p-2 border rounded bg-gray-50" />
<button wire:click="generateNewEmail" class="bg-blue-500 text-white px-4 py-2 rounded hover:bg-blue-600">
Generate New
</button>
</div>
</div>
<!-- Messages List -->
<div class="space-y-4">
@if(count($messages) > 0)
@foreach($messages as $message)
<div class="border rounded p-4 hover:bg-gray-50 cursor-pointer {{ $selectedMessage === $message->id ? 'bg-blue-50' : '' }}"
wire:click="selectMessage({{ $message->id }})">
<div class="flex justify-between items-start">
<div>
<h3 class="font-semibold">{{ $message->subject }}</h3>
<p class="text-sm text-gray-600">From: {{ $message->from }}</p>
<p class="text-sm text-gray-500">{{ $message->date }}</p>
</div>
<button wire:click.stop="deleteMessage({{ $message->id }})"
class="text-red-500 hover:text-red-700">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />
</svg>
</button>
</div>
</div>
@endforeach
@else
<div class="text-center py-8 text-gray-500">
No messages yet. They will appear here automatically.
</div>
@endif
</div>
</div>
<!-- Auto-refresh script -->
<script>
document.addEventListener('livewire:load', function () {
setInterval(() => {
@this.loadMessages()
}, {{ $this->getPollingInterval() }});
});
</script>
</div>

View File

@@ -0,0 +1,54 @@
<div class="-mx-2">
<nav class="flex items-center">
<flux:icon.chevron-left variant="mini"/>
<flux:text>Back</flux:text>
</nav>
<div class="mt-2 md:flex md:items-center md:justify-between">
<div class="flex-1 min-w-0">
<h2 class="dark:text-gray-300 text-gray-900 text-2xl font-bold leading-7 sm:truncate">
Resend Verification Email
</h2>
</div>
<div class="flex flex-shrink-0 mt-4 overflow-y-auto md:ml-4 md:mt-0 gap-2">
<flux:button iconVariant="mini" iconLeading="download">Download</flux:button>
<flux:button iconVariant="mini" iconLeading="file">Source</flux:button>
<flux:button iconVariant="mini" iconLeading="printer">Print</flux:button>
<flux:button iconVariant="mini" iconLeading="trash">Delete</flux:button>
</div>
</div>
<div class="mt-4 px-4 py-5 bg-white border-b border-gray-200 dark:border-gray-900 shadow overflow-hidden sm:px-6 sm:rounded-md">
<div class="flex flex-wrap items-center justify-between -ml-4 -mt-4 sm:flex-nowrap">
<div class="ml-4 mt-4">
<div class="flex items-center">
<div class="flex-shrink-0">
<img src="{{ asset('images/user.webp') }}" class="size-12" alt="inbox-logo" />
</div>
<div class="ml-4">
<div class="text-gray-700 text-lg font-medium leading-6">
Fake-IT
<span class="text-gray-700 text-sm font-normal leading-5">register@receivefreesms.co.uk</span>
</div>
<div class="flex items-center mt-2 text-gray-500 text-sm leading-5">
<svg fill="currentColor" viewBox="0 0 20 20" class="flex-shrink-0 mr-1.5 w-5 h-5 text-gray-400">
<path fill-rule="evenodd" d="M2.003 5.884L10 9.882l7.997-3.998A2 2 0 0016 4H4a2 2 0 00-1.997 1.884zM18 8.118l-8 4-8-4V14a2 2 0 002 2h12a2 2 0 002-2V8.118z" clip-rule="evenodd"></path>
</svg>
<span class="truncate"><a href="mailto:czxcc@oakon.com"
class="ml-1">czxcc@oakon.com;</a></span></div>
</div>
</div>
</div>
<div class="flex flex-shrink-0 ml-4 mt-4">
<time datetime="2025-04-24T10:11:55+00:00" class="text-gray-500 truncate">
16 minutes ago
</time>
</div>
</div>
<div class="px-4 py-5 sm:px-6">
<iframe src="https://www.youtube-nocookie.com/embed/dQw4w9WgXcQ?si=fAMHSQ_S73NGoCMX" class="w-full iframe-min-height">
</iframe>
</div>
</div>
</div>

View File

@@ -0,0 +1,42 @@
<span>
@if($action == "random")
<flux:button wire:click="random()" class="cursor-pointer w-full btn-primary" type="submit" variant="filled">Random Email</flux:button>
@elseif($action == "gmail")
<flux:button wire:click="gmail()" class="cursor-pointer w-full ml-2 btn-warning" type="submit" variant="filled">Disposable Gmail</flux:button>
@elseif($action == "delete")
<flux:button wire:click="deleteEmail()" class="cursor-pointer" type="submit" variant="danger">Delete account</flux:button>
@elseif($action == "customEmail")
<div>
<form wire:submit.prevent="create" method="post">
<div>
<div class="mt-2">
<div class="flex items-center rounded-md dark:bg-zinc-700 pl-3 outline-1 -outline-offset-1 outline-zinc-200 has-[input:focus-within]:outline-2 has-[input:focus-within]:-outline-offset-2 dark:has-[input:focus-within]:outline-white has-[input:focus-within]:outline-zinc-900">
<div class="shrink-0 text-base text-gray-500 select-none sm:text-sm/6 mr-1.5">
<flux:icon.mail variant="mini"/>
</div>
<input type="text" name="username" id="username" wire:model.defer="username" class="block min-w-0 grow py-2 pr-3 pl-1 text-base dark:text-white text-gray-900 placeholder:text-gray-400 focus:outline-none sm:text-sm/6" placeholder="Enter Username">
<div class="grid shrink-0 grid-cols-1 focus-within:relative">
<select id="domain" name="domain" aria-label="Domain" wire:model="domain" class="col-start-1 row-start-1 w-full appearance-none rounded-md py-1.5 pr-7 pl-3 text-base text-gray-500 placeholder:text-gray-400 focus:outline-2 focus:-outline-offset-2 dark:focus:outline-white focus:outline-zinc-900 sm:text-sm/6">
<option class="dark:bg-zinc-700 dark:text-white bg-zinc-100 accent-gray-700" selected>Choose a domain</option>
@foreach(array_reverse($domains) as $domain)
<option x-on:click="$refs.domain.value = '{{ $domain }}'; $wire.setDomain('{{ $domain }}')" class="dark:bg-zinc-700 dark:text-white bg-zinc-100 accent-gray-700">{{ $domain }}</option>
@endforeach
</select>
<svg class="pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" data-slot="icon">
<path fill-rule="evenodd" d="M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" />
</svg>
</div>
</div>
</div>
</div>
<div class="flex mt-6">
<div class="flex w-full">
<flux:button x-on:click="$dispatch('closeModal')" class="w-1/2" type="submit" variant="outline">Cancel</flux:button>
<flux:button class="ml-2 w-1/2 btn-success" type="submit" variant="primary">Create Account</flux:button>
</div>
</div>
</form>
</div>
@endif
</span>

View File

@@ -0,0 +1,3 @@
<div>
{{-- Success is as dangerous as failure. --}}
</div>

View File

@@ -0,0 +1,13 @@
<span>
@if($type === "header")<p class="px-2 text-sm cursor-pointer truncate">{{ $email ?? __('...') }}</p>
@else<flux:text class="p-1" variant="subtle">{{ $email ?? __('...') }}</flux:text>
@if($list)
@foreach(array_reverse($emails) as $email_list_item)
<span>
<flux:menu.separator />
<span wire:click="switchEmail('{{$email_list_item}}')" 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">{{ $email_list_item }}</span>
</span>
@endforeach
@endif
@endif
</span>

View File

@@ -0,0 +1,11 @@
<div>
<flux:heading class="mb-3" size="xl" level="1">Inbox</flux:heading>
<div class="mb-3"></div>
@php
for ($i=0; $i<=10; $i++) {
@endphp
<livewire:inbox />
@php
}
@endphp
</div>

View File

@@ -0,0 +1,48 @@
<div class="inbox-list cursor-pointer" x-on:click="">
<div class="block rounded-lg bg-white shadow-md dark:bg-zinc-700 text-left">
<div class="flex items-center px-4 py-4 sm:px-6">
<div class="flex flex-1 items-center min-w-0">
<div class="flex-shrink-0">
<span class="relative inline-block">
<img src="{{ asset('images/user.webp') }}" class="size-12" alt="inbox-logo" />
<span class="shadow-solid absolute bottom-0 right-0 block w-3 h-3 dark:text-gray-500 text-white bg-amber-300 dark:bg-amber-400 rounded-full"></span>
</span>
</div>
<div class="flex-1 px-4 min-w-0 md:grid md:gap-4 md:grid-cols-2">
<div>
<div class="dark:text-accent text-accent-content text-sm font-medium leading-5 truncate">
Fake-IT
</div>
<div class="flex items-center mt-2 dark:text-gray-400 text-gray-500 text-sm leading-5">
<svg fill="currentColor" viewBox="0 0 20 20"
class="flex-shrink-0 mr-1.5 w-5 h-5 text-gray-400">
<path fill-rule="evenodd"
d="M2.003 5.884L10 9.882l7.997-3.998A2 2 0 0016 4H4a2 2 0 00-1.997 1.884zM18 8.118l-8 4-8-4V14a2 2 0 002 2h12a2 2 0 002-2V8.118z"
clip-rule="evenodd"></path>
</svg>
<span class="truncate">register@receivefreesms.co.uk</span></div>
</div>
<div class="hidden md:block">
<div>
<div class="dark:text-gray-300 text-gray-900 text-sm leading-5 truncate">
Resend Verification Email
</div>
<div
class="flex items-center mt-2 text-gray-400 dark:text-gray-400 text-sm leading-5 truncate">
Hi czxcc, Welcome on board, to complete your registration process. Please verify
your email by visting following link in your…
</div>
</div>
</div>
</div>
</div>
<div>
<svg fill="currentColor" viewBox="0 0 20 20" class="w-5 h-5 text-gray-400">
<path fill-rule="evenodd"
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
clip-rule="evenodd"></path>
</svg>
</div>
</div>
</div>
</div>