From 78f019bc4c5abb70fe6428133f33cc293ab51c08 Mon Sep 17 00:00:00 2001 From: user Date: Thu, 20 Nov 2025 23:20:14 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9B=A0=EF=B8=8F=20Refactor=20association?= =?UTF-8?q?=20profile=20view:=20optimize=20imports=20and=20improve=20forma?= =?UTF-8?q?tting.=20=E2=9E=95=20Add=20conditional=20rendering=20for=20reco?= =?UTF-8?q?mmended=20Nostr=20apps=20section.=20=F0=9F=8C=90=20Update=20UI?= =?UTF-8?q?=20styles=20and=20error=20messaging.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/pages/association/profile.blade.php | 198 ++++++++++-------- 1 file changed, 108 insertions(+), 90 deletions(-) diff --git a/resources/views/pages/association/profile.blade.php b/resources/views/pages/association/profile.blade.php index f7340ae..b0d26ee 100644 --- a/resources/views/pages/association/profile.blade.php +++ b/resources/views/pages/association/profile.blade.php @@ -1,21 +1,18 @@ where('year', date('Y')) ->first(); if ($paymentEvent->btc_pay_invoice) { - return redirect('https://pay.einundzwanzig.space/i/' . $paymentEvent->btc_pay_invoice); + return redirect('https://pay.einundzwanzig.space/i/'.$paymentEvent->btc_pay_invoice); } try { $response = Http::withHeaders([ - 'Authorization' => 'token ' . config('services.btc_pay.api_key'), + 'Authorization' => 'token '.config('services.btc_pay.api_key'), ])->post( 'https://pay.einundzwanzig.space/api/v1/stores/98PF86BoMd3C8P1nHHyFdoeznCwtcm5yehcAgoCYDQ2a/invoices', [ @@ -138,7 +135,7 @@ $pay = function ($comment) { 'metadata' => [ 'orderId' => $comment, 'orderUrl' => url()->route('association.profile'), - 'itemDesc' => 'Mitgliedsbeitrag ' . date('Y') . ' von nostr:' . $this->currentPleb->npub, + 'itemDesc' => 'Mitgliedsbeitrag '.date('Y').' von nostr:'.$this->currentPleb->npub, 'posData' => [ 'event' => $paymentEvent->event_id, 'pubkey' => $this->currentPleb->pubkey, @@ -160,7 +157,7 @@ $pay = function ($comment) { } catch (Exception $e) { $notification = new Notification($this); $notification->error( - 'Fehler beim Erstellen der Rechnung. Bitte versuche es später erneut: ' . $e->getMessage(), + 'Fehler beim Erstellen der Rechnung. Bitte versuche es später erneut: '.$e->getMessage(), ); } }; @@ -172,10 +169,10 @@ $listenForPayment = function () { ->first(); if ($paymentEvent->btc_pay_invoice) { $response = Http::withHeaders([ - 'Authorization' => 'token ' . config('services.btc_pay.api_key'), + 'Authorization' => 'token '.config('services.btc_pay.api_key'), ]) ->get( - 'https://pay.einundzwanzig.space/api/v1/stores/98PF86BoMd3C8P1nHHyFdoeznCwtcm5yehcAgoCYDQ2a/invoices/' . $paymentEvent->btc_pay_invoice, + 'https://pay.einundzwanzig.space/api/v1/stores/98PF86BoMd3C8P1nHHyFdoeznCwtcm5yehcAgoCYDQ2a/invoices/'.$paymentEvent->btc_pay_invoice, ); if ($response->json()['status'] === 'Expired') { $paymentEvent->btc_pay_invoice = null; @@ -215,12 +212,12 @@ $createPaymentEvent = function () { $note = new NostrEvent(); $note->setKind(32121); $note->setContent( - 'Dieses Event dient der Zahlung des Mitgliedsbeitrags für das Jahr ' . date( + 'Dieses Event dient der Zahlung des Mitgliedsbeitrags für das Jahr '.date( 'Y', - ) . '. Bitte bezahle den Betrag von ' . number_format($this->amountToPay, 0, ',', '.') . ' Satoshis.', + ).'. Bitte bezahle den Betrag von '.number_format($this->amountToPay, 0, ',', '.').' Satoshis.', ); $note->setTags([ - ['d', $this->currentPleb->pubkey . ',' . date('Y')], + ['d', $this->currentPleb->pubkey.','.date('Y')], ['zap', 'daf83d92768b5d0005373f83e30d4203c0b747c170449e02fea611a0da125ee6', config('services.relay'), '1'], ]); $signer = new Sign(); @@ -261,8 +258,8 @@ $loadEvents = function () { $response = $request->send(); $this->events = collect($response[config('services.relay')]) - ->map(function($event) { - if(!isset($event->event)) { + ->map(function ($event) { + if (!isset($event->event)) { return false; } return [ @@ -361,93 +358,112 @@ $loadEvents = function () {
-
-
-
Empfohlene Nostr Login und Signer-Apps
-
-
-
- -
-
- - Amber - -
Perfekt für mobile Android Geräte. Eine App, in der man alle Keys/nsecs verwalten kann.
-
-
- -
-
- Android -
+ @if(!$currentPleb) +
+
+
Empfohlene Nostr + Login und Signer-Apps
-
-
-
- -
-
- - Alby - Bitcoin Lightning Wallet & Nostr - -
- Browser-Erweiterung in die man seinen Key/nsec eingeben kann. Pro Alby-Konto ein nsec. +
+
+ +
+
+ + Amber + +
Perfekt für mobile Android Geräte. Eine App, in + der man alle Keys/nsecs verwalten kann. +
+
+
+ +
+
+ Android
- -
-
- Browser Chrome/Firefox -
-
-
-
-
- -
-
- - nos2x - -
- Browser-Erweiterung für Chrome Browser. Multi-Key fähig. +
+
+ +
+
+ + Alby - Bitcoin Lightning Wallet & Nostr + +
+ Browser-Erweiterung in die man seinen Key/nsec eingeben kann. + Pro Alby-Konto ein nsec. +
+
+
+ +
+
+ Browser Chrome/Firefox
- -
-
- Browser Chrome -
-
-
-
-
- -
-
- - nos2x-fox - -
- Browser-Erweiterung für Firefox Browser. Multi-Key fähig. +
+
+ +
+
+ + nos2x + +
+ Browser-Erweiterung für Chrome Browser. Multi-Key fähig. +
+
+
+ +
+
+ Browser Chrome
- -
-
- Browser Firefox +
+
+
+ +
+
+ + nos2x-fox + +
+ Browser-Erweiterung für Firefox Browser. Multi-Key fähig. +
+
+
+ +
+
+ Browser Firefox +
-
+ @endif
{{-- https://v.nostr.build/bomfuwLnOTIDrP4y.mp4 --}} @@ -622,7 +638,7 @@ $loadEvents = function () { 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">
- - Unser Nostr-Relay konnte derzeit nicht erreicht werden, um eine Zahlung zu initialisieren. Bitte versuche es später noch einmal. + Unser Nostr-Relay konnte derzeit nicht erreicht + werden, um eine Zahlung zu initialisieren. Bitte + versuche es später noch einmal.
@endif