mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2026-01-27 06:33:18 +00:00
🛠️ Refactor Blade templates: improve HTML structure, standardize indentation, replace custom div with Flux components, and enhance layout for consistency and readability.
This commit is contained in:
@@ -132,7 +132,8 @@ class extends Component {
|
|||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
<header class="mb-6">
|
<header class="mb-6">
|
||||||
<h1 class="text-2xl md:text-3xl text-gray-800 dark:text-gray-100 font-bold">
|
<h1 class="text-2xl md:text-3xl text-gray-800 dark:text-gray-100 font-bold">
|
||||||
News</h1>
|
News
|
||||||
|
</h1>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -150,12 +151,11 @@ class extends Component {
|
|||||||
@foreach(\App\Enums\NewsCategory::selectOptions() as $category)
|
@foreach(\App\Enums\NewsCategory::selectOptions() as $category)
|
||||||
<li class="mr-0.5 md:mr-0 md:mb-0.5"
|
<li class="mr-0.5 md:mr-0 md:mb-0.5"
|
||||||
wire:key="category_{{ $category['value'] }}">
|
wire:key="category_{{ $category['value'] }}">
|
||||||
<div
|
<flux:badge>
|
||||||
class="flex items-center px-2.5 py-2 rounded-lg whitespace-nowrap bg-white dark:bg-gray-800">
|
|
||||||
<i class="fa-sharp-duotone fa-solid fa-{{ $category['icon'] }} shrink-0 fill-current text-amber-500 mr-2"></i>
|
<i class="fa-sharp-duotone fa-solid fa-{{ $category['icon'] }} shrink-0 fill-current text-amber-500 mr-2"></i>
|
||||||
<span
|
<span
|
||||||
class="text-sm font-medium text-amber-500">{{ $category['label'] }}</span>
|
class="text-sm font-medium text-amber-500">{{ $category['label'] }}</span>
|
||||||
</div>
|
</flux:badge>
|
||||||
</li>
|
</li>
|
||||||
@endforeach
|
@endforeach
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ use swentel\nostr\Request\Request;
|
|||||||
use swentel\nostr\Sign\Sign;
|
use swentel\nostr\Sign\Sign;
|
||||||
use swentel\nostr\Subscription\Subscription;
|
use swentel\nostr\Subscription\Subscription;
|
||||||
|
|
||||||
new class extends Component {
|
new class extends Component
|
||||||
|
{
|
||||||
public ApplicationForm $form;
|
public ApplicationForm $form;
|
||||||
|
|
||||||
public bool $no = false;
|
public bool $no = false;
|
||||||
@@ -54,12 +55,12 @@ new class extends Component {
|
|||||||
$this->currentPubkey = NostrAuth::pubkey();
|
$this->currentPubkey = NostrAuth::pubkey();
|
||||||
$this->currentPleb = EinundzwanzigPleb::query()
|
$this->currentPleb = EinundzwanzigPleb::query()
|
||||||
->with([
|
->with([
|
||||||
'paymentEvents' => fn($query) => $query->where('year', date('Y')),
|
'paymentEvents' => fn ($query) => $query->where('year', date('Y')),
|
||||||
])
|
])
|
||||||
->where('pubkey', $this->currentPubkey)->first();
|
->where('pubkey', $this->currentPubkey)->first();
|
||||||
if ($this->currentPleb) {
|
if ($this->currentPleb) {
|
||||||
$this->email = $this->currentPleb->email;
|
$this->email = $this->currentPleb->email;
|
||||||
$this->showEmail = !$this->no;
|
$this->showEmail = ! $this->no;
|
||||||
if ($this->currentPleb->association_status === AssociationStatus::ACTIVE) {
|
if ($this->currentPleb->association_status === AssociationStatus::ACTIVE) {
|
||||||
$this->amountToPay = config('app.env') === 'production' ? 21000 : 1;
|
$this->amountToPay = config('app.env') === 'production' ? 21000 : 1;
|
||||||
}
|
}
|
||||||
@@ -75,7 +76,7 @@ new class extends Component {
|
|||||||
|
|
||||||
public function updatedNo(): void
|
public function updatedNo(): void
|
||||||
{
|
{
|
||||||
$this->showEmail = !$this->no;
|
$this->showEmail = ! $this->no;
|
||||||
$this->currentPleb->update([
|
$this->currentPleb->update([
|
||||||
'no_email' => $this->no,
|
'no_email' => $this->no,
|
||||||
]);
|
]);
|
||||||
@@ -182,7 +183,7 @@ new class extends Component {
|
|||||||
public function save($type): void
|
public function save($type): void
|
||||||
{
|
{
|
||||||
$this->form->validate();
|
$this->form->validate();
|
||||||
if (!$this->form->check) {
|
if (! $this->form->check) {
|
||||||
$this->js('alert("Du musst den Statuten zustimmen.")');
|
$this->js('alert("Du musst den Statuten zustimmen.")');
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@@ -247,7 +248,7 @@ new class extends Component {
|
|||||||
|
|
||||||
$this->events = collect($response[config('services.relay')])
|
$this->events = collect($response[config('services.relay')])
|
||||||
->map(function ($event) {
|
->map(function ($event) {
|
||||||
if (!isset($event->event)) {
|
if (! isset($event->event)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -482,7 +483,11 @@ new class extends Component {
|
|||||||
</svg>
|
</svg>
|
||||||
<div>
|
<div>
|
||||||
<p class="font-medium text-gray-800 dark:text-gray-100">
|
<p class="font-medium text-gray-800 dark:text-gray-100">
|
||||||
Du bist derzeit ein Mitglied des Vereins.
|
@if($currentYearIsPaid)
|
||||||
|
<span class="text-green-600 dark:text-green-400">Du bist derzeit ein Mitglied des Vereins. Das aktuelle Jahr ist bezahlt.</span>
|
||||||
|
@else
|
||||||
|
<span class="text-amber-600 dark:text-amber-400">Du wirst nach Zahlung des Vereinsbeitrages zum Mitglied. Das aktuelle Jahr ist noch nicht bezahlt.</span>
|
||||||
|
@endif
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user