mirror of
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr.git
synced 2026-01-27 06:33:18 +00:00
🚀 Replace fully-qualified class names with imports in Blade and Livewire components, refactor conditionals and formatting for improved readability.
This commit is contained in:
@@ -319,8 +319,6 @@ new class extends Component {
|
||||
</div>
|
||||
|
||||
<flux:card>
|
||||
<div class="flex flex-col md:flex-row md:-mr-px">
|
||||
|
||||
<!-- Sidebar -->
|
||||
<div
|
||||
class="flex flex-nowrap overflow-x-scroll no-scrollbar md:block md:overflow-auto px-3 py-6 border-b md:border-b-0 md:border-r border-gray-200 dark:border-gray-700/60 min-w-60 md:space-y-3">
|
||||
@@ -346,15 +344,15 @@ new class extends Component {
|
||||
|
||||
<!-- Panel body -->
|
||||
<div class="p-6 space-y-6">
|
||||
<h2 class="sm:text-2xl text-[#1B1B1B] dark:text-gray-100 font-bold mb-5">Aktueller Status</h2>
|
||||
<h2 class="sm:text-2xl text-[#1B1B1B] dark:text-gray-100 font-bold mb-5">
|
||||
Aktueller Status
|
||||
</h2>
|
||||
|
||||
<section>
|
||||
|
||||
@if(!$currentPleb)
|
||||
<div class="space-y-2 mb-12">
|
||||
<div class="flex justify-between items-center mb-4">
|
||||
<div class="text-xl text-gray-500 dark:text-gray-400 italic">Empfohlene Nostr
|
||||
Login und Signer-Apps
|
||||
<div class="text-xl text-gray-500 dark:text-gray-400 italic">
|
||||
Empfohlene Nostr Login und Signer-Apps
|
||||
</div>
|
||||
</div>
|
||||
<flux:card>
|
||||
@@ -367,7 +365,8 @@ new class extends Component {
|
||||
href="https://github.com/greenart7c3/Amber">
|
||||
Amber
|
||||
</a>
|
||||
<div class="text-sm">Perfekt für mobile Android Geräte. Eine App, in
|
||||
<div class="text-sm">Perfekt für mobile Android Geräte. Eine
|
||||
App, in
|
||||
der man alle Keys/nsecs verwalten kann.
|
||||
</div>
|
||||
</div>
|
||||
@@ -392,7 +391,8 @@ new class extends Component {
|
||||
Alby - Bitcoin Lightning Wallet & Nostr
|
||||
</a>
|
||||
<div class="text-sm">
|
||||
Browser-Erweiterung in die man seinen Key/nsec eingeben kann.
|
||||
Browser-Erweiterung in die man seinen Key/nsec eingeben
|
||||
kann.
|
||||
Pro Alby-Konto ein nsec.
|
||||
</div>
|
||||
</div>
|
||||
@@ -451,7 +451,6 @@ new class extends Component {
|
||||
</div>
|
||||
</div>
|
||||
</flux:card>
|
||||
@endif
|
||||
|
||||
<div class="flex flex-wrap space-y-2 sm:space-y-0 items-center justify-between">
|
||||
<template x-if="$store.nostr.user">
|
||||
@@ -479,9 +478,9 @@ new class extends Component {
|
||||
<div>Profil in der Datenbank vorhanden.</div>
|
||||
</div>
|
||||
</flux:card>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
@@ -490,15 +489,17 @@ new class extends Component {
|
||||
</h3>
|
||||
<h4 class="text-xs leading-snug text-[#1B1B1B] dark:text-gray-100 font-italic mb-1">
|
||||
Nur Personen können Mitglied werden und zahlen 21.000 Satoshis im Jahr.<br>
|
||||
<a href="https://einundzwanzig.space/verein/" class="text-amber-500">Firmen melden
|
||||
sich bitte direkt an den Vorstand.</a>
|
||||
<a href="https://einundzwanzig.space/verein/" class="text-amber-500">
|
||||
Firmen melden sich bitte direkt an den Vorstand.
|
||||
</a>
|
||||
</h4>
|
||||
<div class="sm:flex sm:items-center space-y-4 sm:space-y-0 sm:space-x-4 mt-5">
|
||||
<div class="sm:w-1/2 flex flex-col space-y-2">
|
||||
<div class="flex items-center space-x-2">
|
||||
<div wire:dirty>
|
||||
<flux:field variant="inline">
|
||||
<flux:checkbox wire:model="form.check" label="Ich stimme den Vereins-Statuten zu"/>
|
||||
<flux:checkbox wire:model="form.check"
|
||||
label="Ich stimme den Vereins-Statuten zu"/>
|
||||
<flux:error name="form.check"/>
|
||||
</flux:field>
|
||||
</div>
|
||||
@@ -512,11 +513,10 @@ new class extends Component {
|
||||
</flux:button>
|
||||
</div>
|
||||
</div>
|
||||
@if($currentPubkey)
|
||||
<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"
|
||||
<svg class="shrink-0 fill-current text-yellow-500 mt-0.75 mr-3"
|
||||
width="16"
|
||||
height="16" viewBox="0 0 16 16">
|
||||
<path
|
||||
@@ -538,7 +538,9 @@ new class extends Component {
|
||||
class="flex flex-col sm:flex-row space-y-2 sm:space-y-0 sm:space-x-2 text-amber-500">
|
||||
<flux:field variant="inline" xl>
|
||||
<flux:label>NEIN</flux:label>
|
||||
<flux:description>Ich informiere mich selbst in der News Sektion und gebe keine E-Mail Adresse raus.</flux:description>
|
||||
<flux:description>Ich informiere mich selbst in der News
|
||||
Sektion und gebe keine E-Mail Adresse raus.
|
||||
</flux:description>
|
||||
<flux:switch
|
||||
wire:model.live="no"
|
||||
wire:dirty
|
||||
@@ -546,45 +548,44 @@ new class extends Component {
|
||||
<flux:error name="no"/>
|
||||
</flux:field>
|
||||
</div>
|
||||
@if($showEmail)
|
||||
<div wire:key="showEmail"
|
||||
class="flex flex-col sm:flex-row space-y-2 sm:space-y-0 sm:space-x-2">
|
||||
<flux:field>
|
||||
<flux:label>Fax-Nummer</flux:label>
|
||||
<flux:input wire:model.live.debounce="fax" wire:dirty placeholder="Fax-Nummer"/>
|
||||
<flux:input wire:model.live.debounce="fax" wire:dirty
|
||||
placeholder="Fax-Nummer"/>
|
||||
<flux:error name="fax"/>
|
||||
</flux:field>
|
||||
<flux:field>
|
||||
<flux:label>E-Mail Adresse</flux:label>
|
||||
<flux:input type="email" wire:model.live.debounce="email" wire:dirty placeholder="E-Mail Adresse"/>
|
||||
<flux:input type="email"
|
||||
wire:model.live.debounce="email" wire:dirty
|
||||
placeholder="E-Mail Adresse"/>
|
||||
<flux:error name="email"/>
|
||||
</flux:field>
|
||||
</div>
|
||||
<div wire:key="showSave" class="flex space-x-2 mt-2">
|
||||
<flux:button wire:click="saveEmail" wire:loading.attr="disabled">
|
||||
<flux:button wire:click="saveEmail"
|
||||
wire:loading.attr="disabled">
|
||||
Speichern
|
||||
</flux:button>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</flux:card>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section>
|
||||
@if($currentPleb && $currentPleb->association_status->value > 1)
|
||||
<div class="flex flex-col space-y-4">
|
||||
<div
|
||||
<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"
|
||||
<svg class="shrink-0 fill-current text-green-500 mt-0.75 mr-3"
|
||||
width="16"
|
||||
height="16" viewBox="0 0 16 16">
|
||||
<path
|
||||
@@ -615,8 +616,8 @@ new class extends Component {
|
||||
<div>
|
||||
<div
|
||||
class="font-medium text-gray-800 dark:text-gray-100 mb-1 space-y-2">
|
||||
<p>Nostr Event für die Zahlung des
|
||||
Mitgliedsbeitrags: <span
|
||||
<p>
|
||||
Nostr Event für die Zahlung des Mitgliedsbeitrags: <span
|
||||
class="break-all">{{ $currentPleb->paymentEvents->last()->event_id }}</span>
|
||||
</p>
|
||||
<div>
|
||||
@@ -625,13 +626,14 @@ new class extends Component {
|
||||
<div class="mt-8">
|
||||
@if(!$currentYearIsPaid)
|
||||
<div class="flex justify-center">
|
||||
<flux:button wire:click="pay('{{ date('Y') }}:{{ $currentPubkey }}')" class="text-2xl">
|
||||
<flux:button
|
||||
wire:click="pay('{{ date('Y') }}:{{ $currentPubkey }}')"
|
||||
class="text-2xl">
|
||||
<i class="fa-sharp-duotone fa-solid fa-bolt-lightning mr-2"></i>
|
||||
Pay {{ $amountToPay }} Sats
|
||||
</flux:button>
|
||||
</div>
|
||||
@else
|
||||
@if($currentYearIsPaid)
|
||||
@elseif($currentYearIsPaid)
|
||||
<div class="flex sm:justify-center">
|
||||
<flux:button disabled class="sm:text-2xl">
|
||||
<i class="fa-sharp-duotone fa-solid fa-check-circle mr-2"></i>
|
||||
@@ -639,7 +641,6 @@ new class extends Component {
|
||||
</flux:button>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
@else
|
||||
<div class="flex sm:justify-center">
|
||||
@@ -698,7 +699,8 @@ 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)
|
||||
<flux:button 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">
|
||||
@@ -718,14 +720,6 @@ new class extends Component {
|
||||
</flux:card>
|
||||
@endif
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</flux:card>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
<?php
|
||||
|
||||
use App\Models\EinundzwanzigPleb;
|
||||
use App\Models\ProjectProposal;
|
||||
use App\Support\NostrAuth;
|
||||
use Flux\Flux;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Livewire\Component;
|
||||
|
||||
new class extends Component {
|
||||
@@ -12,13 +14,13 @@ new class extends Component {
|
||||
|
||||
public string $search = '';
|
||||
|
||||
public \Illuminate\Database\Eloquent\Collection $projects;
|
||||
public Collection $projects;
|
||||
|
||||
public bool $isAllowed = false;
|
||||
|
||||
public ?string $currentPubkey = null;
|
||||
|
||||
public ?\App\Models\EinundzwanzigPleb $currentPleb = null;
|
||||
public ?EinundzwanzigPleb $currentPleb = null;
|
||||
|
||||
protected $listeners = [
|
||||
'nostrLoggedIn' => 'handleNostrLoggedIn',
|
||||
@@ -30,7 +32,7 @@ new class extends Component {
|
||||
$this->loadProjects();
|
||||
if (NostrAuth::check()) {
|
||||
$this->currentPubkey = NostrAuth::pubkey();
|
||||
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $this->currentPubkey)->first();
|
||||
$this->currentPleb = EinundzwanzigPleb::query()->where('pubkey', $this->currentPubkey)->first();
|
||||
$this->isAllowed = true;
|
||||
}
|
||||
}
|
||||
@@ -63,7 +65,7 @@ new class extends Component {
|
||||
{
|
||||
NostrAuth::login($pubkey);
|
||||
$this->currentPubkey = $pubkey;
|
||||
$this->currentPleb = \App\Models\EinundzwanzigPleb::query()->where('pubkey', $pubkey)->first();
|
||||
$this->currentPleb = EinundzwanzigPleb::query()->where('pubkey', $pubkey)->first();
|
||||
$this->isAllowed = true;
|
||||
}
|
||||
|
||||
@@ -98,7 +100,6 @@ new class extends Component {
|
||||
|
||||
<div>
|
||||
<div class="px-4 sm:px-6 lg:px-8 py-8 w-full max-w-9xl mx-auto">
|
||||
|
||||
<!-- Page header -->
|
||||
<div class="sm:flex sm:justify-between sm:items-center mb-5">
|
||||
|
||||
@@ -165,9 +166,9 @@ new class extends Component {
|
||||
<x-project-card :project="$project" :currentPleb="$currentPleb" :section="$activeFilter"/>
|
||||
@endforeach
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!-- Confirmation modal -->
|
||||
<flux:modal name="delete-project" class="min-w-[22rem]">
|
||||
<flux:modal name="delete-project" class="min-w-88">
|
||||
<div class="space-y-6">
|
||||
<div>
|
||||
<flux:heading size="lg">Projektunterstützung löschen</flux:heading>
|
||||
@@ -185,6 +186,4 @@ new class extends Component {
|
||||
</div>
|
||||
</div>
|
||||
</flux:modal>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user