From 1cd70cc15e92ed95c32797304042493d25cb0b37 Mon Sep 17 00:00:00 2001 From: HolgerHatGarKeineNode <123783602+HolgerHatGarKeineNode@users.noreply.github.com> Date: Mon, 22 Jun 2026 16:26:13 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Refactor=20Livewire=20views=20an?= =?UTF-8?q?d=20tests=20for=20updated=20storage=20benefits=20on=20Blossom?= =?UTF-8?q?=20Media?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Removed unused `copyRelayUrl` and `copyWatchtowerUrl` methods in `Profile` Livewire component. - Updated storage details in `association.profile` and `association.benefits` views with size and file limits. - Enhanced `BenefitsTest` to validate new storage capacity information. --- .../livewire/association/benefits.blade.php | 10 ++++++++++ .../livewire/association/profile.blade.php | 15 +------------- .../Livewire/Association/BenefitsTest.php | 20 ++++--------------- 3 files changed, 15 insertions(+), 30 deletions(-) diff --git a/resources/views/livewire/association/benefits.blade.php b/resources/views/livewire/association/benefits.blade.php index 1d59321..4e4d074 100644 --- a/resources/views/livewire/association/benefits.blade.php +++ b/resources/views/livewire/association/benefits.blade.php @@ -399,6 +399,10 @@ new class extends Component
Dein eigener Speicher für Bilder & Videos auf Nostr – betrieben vom Verein.
+
+ Dein Kontingent: 5 GB Speicherplatz pro Mitglied, einzelne Dateien
+ bis maximal 1 GB. Deine hochgeladenen Medien kannst du jederzeit auf
+
Sicher: Die Anmeldung passiert automatisch über deinen Nostr-Schlüssel –
nur Vereinsmitglieder können hochladen, und deine privaten Schlüssel verlassen
diff --git a/resources/views/livewire/association/profile.blade.php b/resources/views/livewire/association/profile.blade.php
index b2fa673..5f5a478 100644
--- a/resources/views/livewire/association/profile.blade.php
+++ b/resources/views/livewire/association/profile.blade.php
@@ -620,20 +620,6 @@ new class extends Component {
->unique('id')
->toArray();
}
-
- public function copyRelayUrl(): void
- {
- $relayUrl = 'wss://nostr.einundzwanzig.space';
- $this->js("navigator.clipboard.writeText('{$relayUrl}')");
- Flux::toast('Relay-Adresse in die Zwischenablage kopiert!');
- }
-
- public function copyWatchtowerUrl(): void
- {
- $watchtowerUrl = '03a09f56bba3d2c200cc55eda2f1f069564a97c1fb74345e1560e2868a8ab3d7d0@62.171.139.240:9911';
- $this->js("navigator.clipboard.writeText('{$watchtowerUrl}')");
- Flux::toast('Watchtower-Adresse in die Zwischenablage kopiert!');
- }
}
?>
@@ -696,6 +682,7 @@ new class extends Component {
Eigener Speicher für Bilder & Videos auf Nostr.
+5 GB Speicher · max. 1 GB pro Datei
diff --git a/tests/Feature/Livewire/Association/BenefitsTest.php b/tests/Feature/Livewire/Association/BenefitsTest.php index 1c46784..9ab6220 100644 --- a/tests/Feature/Livewire/Association/BenefitsTest.php +++ b/tests/Feature/Livewire/Association/BenefitsTest.php @@ -4,30 +4,18 @@ use App\Models\EinundzwanzigPleb; use App\Support\NostrAuth; use Livewire\Livewire; -function activePaidPleb(): EinundzwanzigPleb -{ - $pleb = EinundzwanzigPleb::factory()->active()->create(); - - $pleb->paymentEvents()->create([ - 'year' => date('Y'), - 'amount' => 21000, - 'event_id' => 'event-benefits', - 'paid' => true, - ]); - - return $pleb; -} - it('shows the locked state with all four services for guests', function () { Livewire::test('association.benefits') ->assertSet('currentYearIsPaid', false) ->assertSee('Dienste gesperrt') ->assertSee('Blossom-Medienserver') + ->assertSee('5 GB Speicher') + ->assertSee('max. 1 GB pro Datei') ->assertDontSee('https://blossom.einundzwanzig.space'); }); it('unlocks the blossom server for active paid members', function () { - $pleb = activePaidPleb(); + $pleb = EinundzwanzigPleb::factory()->active()->withPaidCurrentYear()->create(); NostrAuth::login($pleb->pubkey); Livewire::test('association.benefits') @@ -38,7 +26,7 @@ it('unlocks the blossom server for active paid members', function () { }); it('copies the blossom url for active members', function () { - $pleb = activePaidPleb(); + $pleb = EinundzwanzigPleb::factory()->active()->withPaidCurrentYear()->create(); NostrAuth::login($pleb->pubkey); Livewire::test('association.benefits')