Improve design

This commit is contained in:
weeb 2025-05-02 12:12:20 +02:00
parent 28c30e93bd
commit c753373a1f
2 changed files with 50 additions and 64 deletions

View File

@ -1,36 +1,31 @@
<div class="max-w-2xl mx-auto mt-10 flex flex-col gap-6"> <div class="max-w-2xl w-full md:w-xl mx-auto mt-10 flex flex-col gap-6">
@if (session()->has('message')) @if (session()->has('message'))
@if ($applicationUuid) @if ($applicationUuid)
<div class="p-5 mb-4 dark:bg-green-600/50 rounded-lg"> <flux:callout variant="success" icon="check-circle">
<flux:heading>Your application has been submitted</flux:heading> <flux:callout.heading>Your application has been submitted.</flux:callout.heading>
<flux:text class="mt-2"> <flux:callout.text>
You can check its status here: <flux:link You can check its status here: <flux:callout.link
href="{{ route('application', ['uuid' => $applicationUuid]) }}">View Application Status href="{{ route('application', ['uuid' => $applicationUuid]) }}">View Application Status
</flux:link> </flux:callout.link>
</flux:text> <br>Please save or bookmark that link, as the approval process can take 24-48 hours.
<flux:text class="mt-2"> </flux:callout.text>
Please save or bookmark that link, as the approval process can take roughly 24-48 hours. </flux:callout>
</flux:text>
</div>
@endif @endif
@endif @endif
@if (!$applicationUuid) @if (!$applicationUuid)
<form wire:submit.prevent="submit" enctype="multipart/form-data"> <form wire:submit.prevent="submit" enctype="multipart/form-data">
<div class="mb-6"> <div class="flex flex-col gap-4 mb-6">
<div class="p-5 mb-4 dark:bg-pink-950/50 rounded-lg"> <flux:callout variant="secondary" icon="information-circle" heading="Here you can submit your application."
<flux:heading>Here you can submit your application</flux:heading> text="To apply, simply fill out the form below and upload at least one loli photo.
<flux:text class="mt-2">
To apply, simply fill out the form below and upload at least one loli photo.
After submitting, you'll receive a unique link make sure to save it! You can use that After submitting, you'll receive a unique link make sure to save it! You can use that
link to check the status of your application, and if everything is approved, you'll also link to check the status of your application, and if everything is approved, you'll also
receive receive your registration token there." />
your registration token there.
</flux:text>
</div>
<flux:textarea wire:model="message" label="Why do you want to join?" placeholder="Cunny 😭" /> <flux:textarea wire:model="message" label="Why do you want to join?" placeholder="Cunny 😭" />
<br>
<flux:input type="file" wire:model="photos" label="Loli Photos (max. 8MB)" multiple /> <flux:input type="file" wire:model="photos" label="Loli Photos (max. 8MB)" multiple />
<div class="mt-4"> <div class="mt-4">
<div class="flex"> <div class="flex">
<flux:input label="Captcha" wire:model.defer="captchaInput" /> <flux:input label="Captcha" wire:model.defer="captchaInput" />

View File

@ -1,47 +1,16 @@
<div wire:poll.10s="loadApplication" class="max-w-2xl mx-auto mt-10 flex flex-col gap-6"> <div wire:poll.10s="loadApplication" class="max-w-2xl w-full md:w-xl mx-auto mt-10 flex flex-col gap-6">
<div class="max-w-2xl md:w-2xl mx-auto mt-10">
@if ($application->status === 0)
<div class="p-5 mb-4 dark:bg-pink-950/50 rounded-lg">
@elseif ($application->status === 1)
<div class="p-5 mb-4 dark:bg-green-950/50 rounded-lg">
@elseif ($application->status === 2)
<div class="p-5 mb-4 dark:bg-red-950/50 rounded-lg">
@endif
<flux:heading size="xl">Application</flux:heading>
@php
$status = [
0 => 'Pending Review',
1 => 'Approved',
2 => 'Denied',
];
@endphp
<flux:text class="mt-2">
<p>
<strong>Status:</strong>
{{ $status[$application->status] }}
</p>
@if ($application->registration_token)
<p class="pt-2 pb-2">
<strong>Registration Token (valid until
{{ $application->updated_at->addWeek()->format('Y-m-d') }})</strong>
</p>
<flux:input class="mb-2" icon="key" value="{{ $application->registration_token }}" readonly
copyable />
To sign up, you should use <flux:link href="https://element.lolispace.moe">Element Web</flux:link> or
Element Desktop, as the authentication token is not compatible
with the mobile clients.
@endif
</flux:text>
</div>
@if ($application->status === 0) @if ($application->status === 0)
<div class="p-5 mb-4 dark:bg-pink-950/50 rounded-lg"> <flux:callout variant="warning" icon="exclamation-circle">
<flux:heading size="xl">Message</flux:heading> <flux:callout.heading>Application pending</flux:callout.heading>
<flux:text class="mt-2"> <flux:callout.text>
{{ $application->message }} Your application is waiting for review. This process can take 24-48 hours.
</flux:text> <br>
</div> This site automatically refreshes, no need to reload manually.
</flux:callout.text>
</flux:callout>
<flux:callout variant="secondary" icon="information-circle" heading="Message" text="{{ $application->message }}" />
<h2 class="mt-4 font-semibold">Uploaded Photos:</h2> <h2 class="mt-4 font-semibold">Uploaded Photos:</h2>
<div class="flex flex-wrap gap-4 mt-4"> <div class="flex flex-wrap gap-4 mt-4">
@ -52,6 +21,28 @@
</div> </div>
@endforeach @endforeach
</div> </div>
@elseif($application->status === 1)
<flux:callout variant="success" icon="check-circle">
<flux:callout.heading>Application approved</flux:callout.heading>
<flux:callout.text>
@if ($application->registration_token)
<p class="pt-2 pb-2">
<strong>Registration Token (valid until
{{ $application->updated_at->addWeek()->format('Y-m-d') }})</strong>
</p>
<flux:input class="mb-2" icon="key" value="{{ $application->registration_token }}" readonly
copyable />
To sign up, you should use <flux:callout.link href="https://element.lolispace.moe">Element Web
</flux:callout.link>
or
Element Desktop, as the registration token is not compatible
with the mobile clients.
@endif
</flux:callout.text>
</flux:callout>
@elseif($application->status === 2)
<flux:callout variant="danger" icon="x-circle" heading="Application denied"
text="Your application has been denied. You can create a new application." />
@endif @endif
</div>
</div> </div>