🛠️ Refactor migrations, models, configs, and Blade files to apply consistent formatting, remove unnecessary lines, and improve readability.

This commit is contained in:
HolgerHatGarKeineNode
2026-01-18 19:50:04 +01:00
parent a4aad6ebb6
commit b090336c4f
59 changed files with 246 additions and 199 deletions

View File

@@ -518,9 +518,9 @@ new class extends Component {
</h1>
<div class="grid sm:grid-cols-2 gap-6">
<div
class="bg-white dark:bg-gray-800 shadow-sm rounded-xl">
<div class="flex flex-col h-full p-5">
<header>
<div class="grid sm:grid-cols-2 gap-6">
<flux:card>
<header>
<div class="flex items-center justify-between">
<i class="fa-sharp-duotone fa-solid {{ $positions['presidency']['icon'] }} w-9 h-9 fill-current text-white"></i>
</div>
@@ -562,7 +562,7 @@ new class extends Component {
</div>
</footer>
</div>
</div>
</flux:card>
</div>
<h1 class="mt-6 text-xl leading-snug text-gray-800 dark:text-gray-100 font-bold mb-1 sm:mb-0 ml-2">
@@ -571,8 +571,8 @@ new class extends Component {
<div class="grid gap-6">
<div
class="bg-white dark:bg-gray-800 shadow-sm rounded-xl">
<div class="flex flex-col h-full p-5">
<flux:card>
<div class="flex flex-col h-full p-5">
<div class="grow mt-2">
<div class="text-sm">
<span>Klicke auf den Kandidaten, um seine Position als Vorstandsmitglied zu bestätigen.</span>
@@ -597,7 +597,7 @@ new class extends Component {
@endforeach
</div>
</footer>
</div>
</flux:card>
</div>
</div>
@@ -607,7 +607,7 @@ new class extends Component {
<!-- Log events -->
<div x-cloak x-show="showLog" class="mt-6 hidden sm:block">
<div class="bg-white dark:bg-gray-800 shadow-sm rounded-xl mb-8">
<flux:card mb-8>
<header class="px-5 py-4">
<h2 class="font-semibold text-gray-800 dark:text-gray-100">Präsidium Log <span
class="text-gray-400 dark:text-gray-500 font-medium">{{ count($this->loadedEvents) }}</span>
@@ -671,10 +671,10 @@ new class extends Component {
</table>
</div>
</div>
</div>
</flux:card>
</div>
<div x-cloak x-show="showLog" class="mt-6 hidden sm:block">
<div class="bg-white dark:bg-gray-800 shadow-sm rounded-xl mb-8">
<flux:card mb-8>
<header class="px-5 py-4">
<h2 class="font-semibold text-gray-800 dark:text-gray-100">Board Log <span
class="text-gray-400 dark:text-gray-500 font-medium">{{ count($this->loadedBoardEvents) }}</span>
@@ -738,7 +738,7 @@ new class extends Component {
</table>
</div>
</div>
</div>
</flux:card>
</div>
</div>
@@ -749,13 +749,13 @@ new class extends Component {
</div>
@else
<div class="px-4 sm:px-6 lg:px-8 py-8 w-full max-w-9xl mx-auto">
<div class="bg-white dark:bg-[#1B1B1B] shadow overflow-hidden sm:rounded-lg">
<flux:card>
<div class="px-4 py-5 sm:px-6">
<h3 class="text-lg font-medium leading-6 text-gray-900 dark:text-gray-200">Wahlen</h3>
<p class="mt-1 max-w">
Du bist nicht berechtigt, die Wahlen einzusehen.
</p>
</div>
</flux:card>
</div>
</div>
@endif

View File

@@ -4,9 +4,9 @@ use App\Enums\NewsCategory;
use App\Models\Notification;
use App\Support\NostrAuth;
use Illuminate\Support\Collection;
use Livewire\Component;
use Livewire\Attributes\Layout;
use Livewire\Attributes\Title;
use Livewire\Component;
use Livewire\WithFileUploads;
new
@@ -35,8 +35,11 @@ class extends Component {
$currentPubkey = NostrAuth::pubkey();
$currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $currentPubkey)->first();
if ($currentPleb && $currentPleb->association_status->value > 1 && $currentPleb->paymentEvents()->where('year',
date('Y'))->where('paid', true)->exists()) {
if (
$currentPleb
&& $currentPleb->association_status->value > 1
&& $currentPleb->paymentEvents()->where('year', date('Y'))->where('paid', true)->exists()
) {
$this->isAllowed = true;
}
@@ -158,8 +161,8 @@ class extends Component {
<div class="space-y-2">
@forelse($news as $post)
<article wire:key="post_{{ $post->id }}"
class="bg-white dark:bg-gray-800 shadow-sm rounded-xl p-5">
<div class="flex flex-start space-x-4">
<article wire:key="post_{{ $post->id }}"
<flux:card>
<!-- Avatar -->
<div class="shrink-0 mt-1.5">
<img class="w-8 h-8 rounded-full"
@@ -220,11 +223,11 @@ class extends Component {
</flux:button>
@endif
</div>
</article>
</flux:card>
@empty
<article class="bg-white dark:bg-gray-800 shadow-sm rounded-xl p-5">
<flux:card>
<p>Keine News vorhanden.</p>
</article>
</flux:card>
@endforelse
</div>
@@ -243,7 +246,7 @@ class extends Component {
<div class="space-y-4">
@if($canEdit)
<div class="bg-white dark:bg-gray-800 p-4 rounded-xl">
<flux:card>
<div
class="text-xs font-semibold text-gray-400 dark:text-gray-500 uppercase mb-4">
News anlegen
@@ -269,29 +272,30 @@ class extends Component {
/>
@endforeach
</flux:select>
<flux:error name="form.category" />
<flux:error name="form.category"/>
</flux:field>
</div>
<div wire:dirty>
<flux:field>
<flux:label>Titel</flux:label>
<flux:input wire:model="form.name" placeholder="News-Titel" />
<flux:error name="form.name" />
<flux:input wire:model="form.name" placeholder="News-Titel"/>
<flux:error name="form.name"/>
</flux:field>
</div>
<div wire:dirty>
<flux:field>
<flux:label>Beschreibung</flux:label>
<flux:description>optional</flux:description>
<flux:textarea wire:model="form.description" rows="4" placeholder="Beschreibung..." />
<flux:error name="form.description" />
<flux:textarea wire:model="form.description" rows="4"
placeholder="Beschreibung..."/>
<flux:error name="form.description"/>
</flux:field>
</div>
<flux:button wire:click="save" class="w-full">
Hinzufügen
</flux:button>
</div>
</div>
</flux:card>
@endif
</div>
@@ -304,7 +308,7 @@ class extends Component {
</div>
@else
<div class="px-4 sm:px-6 lg:px-8 py-8 w-full max-w-9xl mx-auto">
<div class="bg-white dark:bg-[#1B1B1B] shadow overflow-hidden sm:rounded-lg">
<flux:card>
<div class="px-4 py-5 sm:px-6">
<h3 class="text-lg font-medium leading-6 text-gray-900 dark:text-gray-200">
News
@@ -312,7 +316,7 @@ class extends Component {
<p class="mt-1 max-w">
Du bist nicht berechtigt, die News einzusehen.
</p>
</div>
</flux:card>
</div>
</div>
@endif

View File

@@ -319,7 +319,7 @@ new class extends Component {
</div>
<div class="bg-white dark:bg-[#1B1B1B] shadow-sm rounded-xl mb-8">
<flux:card mb-8>
<div class="flex flex-col md:flex-row md:-mr-px">
<!-- Sidebar -->
@@ -340,8 +340,7 @@ new class extends Component {
</a>
</li>
</ul>
</div>
</div>
</flux:card>
<!-- Panel -->
<div class="grow">
@@ -359,7 +358,7 @@ new class extends Component {
Login und Signer-Apps
</div>
</div>
<div class="bg-white dark:bg-gray-800 shadow-sm rounded-xl px-5 py-4">
<flux:card>
<div
class="md:flex justify-between items-center space-y-4 md:space-y-0 space-x-2">
<!-- Left side -->
@@ -382,8 +381,8 @@ new class extends Component {
</div>
</div>
</div>
</div>
<div class="bg-white dark:bg-gray-800 shadow-sm rounded-xl px-5 py-4">
</flux:card>
<flux:card>
<div
class="md:flex justify-between items-center space-y-4 md:space-y-0 space-x-2">
<!-- Left side -->
@@ -407,8 +406,8 @@ new class extends Component {
</div>
</div>
</div>
</div>
<div class="bg-white dark:bg-gray-800 shadow-sm rounded-xl px-5 py-4">
</flux:card>
<flux:card>
<div
class="md:flex justify-between items-center space-y-4 md:space-y-0 space-x-2">
<!-- Left side -->
@@ -431,8 +430,8 @@ new class extends Component {
</div>
</div>
</div>
</div>
<div class="bg-white dark:bg-gray-800 shadow-sm rounded-xl px-5 py-4">
</flux:card>
<flux:card>
<div
class="md:flex justify-between items-center space-y-4 md:space-y-0 space-x-2">
<!-- Left side -->
@@ -454,7 +453,7 @@ new class extends Component {
Browser Firefox
</div>
</div>
</div>
</flux:card>
</div>
</div>
@endif
@@ -476,8 +475,8 @@ new class extends Component {
</template>
@if($currentPubkey && $currentPleb->association_status->value < 2)
<div
class="inline-flex min-w-80 px-4 py-2 rounded-lg text-sm bg-white dark:bg-gray-800 shadow-sm border border-gray-200 dark:border-gray-700/60 text-gray-600 dark:text-gray-100">
<div class="flex w-full justify-between items-start">
<flux:card>
<div class="flex w-full justify-between items-start">
<div class="flex">
<svg class="shrink-0 fill-current text-green-500 mt-[3px] mr-3"
width="16" height="16" viewBox="0 0 16 16">
@@ -486,7 +485,7 @@ new class extends Component {
</svg>
<div>Profil in der Datenbank vorhanden.</div>
</div>
</div>
</flux:card>
</div>
@endif
</div>
@@ -524,8 +523,8 @@ new class extends Component {
@endif
@if($currentPubkey)
<div
class="mt-6 inline-flex flex-col w-full px-4 py-2 rounded-lg text-sm bg-white dark:bg-gray-800 shadow-sm border border-gray-200 dark:border-gray-700/60 text-gray-600 dark:text-gray-400">
<div class="flex w-full justify-between items-start">
<flux:card class="mt-6">
<div class="flex w-full justify-between items-start">
<div class="flex w-full">
<svg class="shrink-0 fill-current text-yellow-500 mt-[3px] mr-3"
width="16"
@@ -578,7 +577,7 @@ new class extends Component {
</div>
@endif
</div>
</div>
</flux:card>
</div>
</div>
@endif
@@ -588,8 +587,8 @@ new class extends Component {
@if($currentPleb && $currentPleb->association_status->value > 1)
<div class="flex flex-col space-y-4">
<div
class="inline-flex flex-col w-full max-w-lg px-4 py-2 rounded-lg text-sm bg-white dark:bg-gray-800 shadow-sm border border-gray-200 dark:border-gray-700/60 text-gray-600 dark:text-gray-400">
<div class="flex w-full justify-between items-start">
<flux:card class="max-w-lg">
<div class="flex w-full justify-between items-start">
<div class="flex">
<svg class="shrink-0 fill-current text-green-500 mt-[3px] mr-3"
width="16"
@@ -604,7 +603,7 @@ new class extends Component {
</div>
</div>
</div>
</div>
</flux:card>
</div>
@endif
</section>
@@ -612,8 +611,8 @@ new class extends Component {
<section>
@if($currentPleb && $currentPleb->association_status->value > 1)
<div
class="inline-flex flex-col w-full px-4 py-2 rounded-lg text-sm bg-white dark:bg-gray-800 shadow-sm border border-gray-200 dark:border-gray-700/60 text-gray-600 dark:text-gray-400">
<div class="flex w-full justify-between items-start">
<flux:card>
<div class="flex w-full justify-between items-start">
<div class="flex">
<svg class="shrink-0 fill-current text-yellow-500 mt-[3px] mr-3" width="16"
height="16" viewBox="0 0 16 16">
@@ -717,9 +716,12 @@ new class extends Component {
</td>
<td class="w-full block md:w-auto md:table-cell py-0.5 md:py-2">
@if($payment->btc_pay_invoice)
<x-button target="_blank" xs
label="Quittung"
href="https://pay.einundzwanzig.space/i/{{ $payment->btc_pay_invoice }}/receipt"/>
<flux:button href="https://pay.einundzwanzig.space/i/{{ $payment->btc_pay_invoice }}/receipt"
target="_blank"
size="xs"
variant="subtle">
Quittung
</flux:button>
@endif
</td>
</tr>
@@ -731,7 +733,7 @@ new class extends Component {
</div>
</div>
</div>
</div>
</flux:card>
@endif
</section>

View File

@@ -48,8 +48,7 @@ class extends Component {
<div class="md:flex">
<!-- Left column -->
<div class="w-full md:w-60 mb-4 md:mb-0">
<div
class="bg-white dark:bg-gray-800 shadow-sm rounded-xl p-5">
<flux:card>
<h2 class="text-lg font-semibold text-gray-800 dark:text-gray-100 mb-4">
Details
</h2>
@@ -73,26 +72,25 @@ class extends Component {
</dd>
</div>
</dl>
</div>
</flux:card>
</div>
<!-- Right column -->
<div class="flex-1 md:ml-8">
<div
class="bg-white dark:bg-gray-800 shadow-sm rounded-xl p-5">
<flux:card>
<h2 class="text-lg font-semibold text-gray-800 dark:text-gray-100 mb-4">
Beschreibung
</h2>
<p class="text-sm text-gray-800 dark:text-gray-100">
{{ $project->description ?? 'Keine Beschreibung' }}
</p>
</div>
</flux:card>
</div>
</div>
</div>
@else
<div class="px-4 sm:px-6 lg:px-8 py-8 w-full max-w-9xl mx-auto">
<div class="bg-white dark:bg-[#1B1B1B] shadow overflow-hidden sm:rounded-lg">
<flux:card>
<div class="px-4 py-5 sm:px-6">
<h3 class="text-lg font-medium leading-6 text-gray-900 dark:text-gray-200">
Projektförderung
@@ -100,7 +98,7 @@ class extends Component {
<p class="mt-1 max-w">
Du bist nicht berechtigt, die Projektförderung einzusehen.
</p>
</div>
</flux:card>
</div>
</div>
@endif