Add Livewire Flux components and new tests for project proposal and editing forms

This commit is contained in:
HolgerHatGarKeineNode
2026-01-18 15:19:00 +01:00
parent 30e78711c9
commit 0694a2d837
19 changed files with 816 additions and 444 deletions

View File

@@ -70,14 +70,18 @@
@if(\App\Support\NostrAuth::check())
<form method="post" action="{{ route('logout') }}"
@submit="$dispatch('nostrLoggedOut')">
@csrf
<x-button secondary label="Logout" type="submit"/>
</form>
@else
<x-button wire:key="loginBtn" label="Mit Nostr verbinden" @click="openNostrLogin"
x-show="!$store.nostr.user"/>
<form method="post" action="{{ route('logout') }}"
@submit="$dispatch('nostrLoggedOut')">
@csrf
<flux:button secondary type="submit">
Logout
</flux:button>
</form>
@else
<flux:button wire:key="loginBtn" @click="openNostrLogin"
x-show="!$store.nostr.user">
Mit Nostr verbinden
</flux:button>
@endif
<!-- Info button -->

View File

@@ -88,26 +88,30 @@
@if(
($currentPleb && $currentPleb->id === $project->einundzwanzig_pleb_id)
|| ($currentPleb && in_array($currentPleb->npub, config('einundzwanzig.config.current_board'), true))
)
<x-button
)
<flux:button
icon="trash"
xs
negative
wire:click="confirmDelete({{ $project->id }})"
label="Löschen"/>
<x-button
wire:loading.attr="disabled">
Löschen
</flux:button>
<flux:button
icon="pencil"
xs
secondary
:href="route('association.projectSupport.edit', ['projectProposal' => $project])"
label="Editieren"/>
:href="route('association.projectSupport.edit', ['projectProposal' => $project])">
Editieren
</flux:button>
@endif
@if(($currentPleb && $currentPleb->association_status->value > 2) || $project->accepted)
<x-button
<flux:button
icon="folder-open"
xs
:href="route('association.projectSupport.item', ['projectProposal' => $project])"
label="Öffnen"/>
:href="route('association.projectSupport.item', ['projectProposal' => $project])">
Öffnen
</flux:button>
@endif
</div>
<div class="py-2">