mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
feat: add signal field to meetups
- Added a new field "Signal" to the meetups form - Included validation for the new signal field in the form backend - Updated landing page to display the signal link if available - Added display of the signal link in the meetup action column - Created a new migration to add the signal field to the meetups table - Included the signal field in the API endpoints for meetups and events.
This commit is contained in:
@@ -46,6 +46,7 @@ class MeetupForm extends Component
|
|||||||
'meetup.twitter_username' => 'string|regex:/^[A-z0-9!@]+$/|nullable|required_without_all:meetup.webpage,meetup.telegram_link,meetup.nostr,meetup.matrix_group',
|
'meetup.twitter_username' => 'string|regex:/^[A-z0-9!@]+$/|nullable|required_without_all:meetup.webpage,meetup.telegram_link,meetup.nostr,meetup.matrix_group',
|
||||||
'meetup.matrix_group' => 'string|nullable|required_without_all:meetup.webpage,meetup.telegram_link,meetup.nostr,meetup.twitter_username',
|
'meetup.matrix_group' => 'string|nullable|required_without_all:meetup.webpage,meetup.telegram_link,meetup.nostr,meetup.twitter_username',
|
||||||
'meetup.simplex' => 'string|nullable',
|
'meetup.simplex' => 'string|nullable',
|
||||||
|
'meetup.signal' => 'string|nullable',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
return new class extends Migration {
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*/
|
||||||
|
public function up(): void
|
||||||
|
{
|
||||||
|
Schema::table('meetups', function (Blueprint $table) {
|
||||||
|
$table->string('signal', 255 * 2)->nullable();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*/
|
||||||
|
public function down(): void
|
||||||
|
{
|
||||||
|
Schema::table('meetups', function (Blueprint $table) {
|
||||||
|
//
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -68,6 +68,19 @@
|
|||||||
</x-button>
|
</x-button>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
@if($row->signal)
|
||||||
|
<div>
|
||||||
|
<x-button
|
||||||
|
xs
|
||||||
|
black
|
||||||
|
target="_blank"
|
||||||
|
:href="$row->signal"
|
||||||
|
>
|
||||||
|
<i class="fa fa-thin fa-external-link mr-2"></i>
|
||||||
|
{{ __('Signal') }}
|
||||||
|
</x-button>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
@if($row->webpage)
|
@if($row->webpage)
|
||||||
<div>
|
<div>
|
||||||
<x-button
|
<x-button
|
||||||
|
|||||||
@@ -99,6 +99,12 @@
|
|||||||
/>
|
/>
|
||||||
</x-input.group>
|
</x-input.group>
|
||||||
|
|
||||||
|
<x-input.group :for="md5('meetup.signal')" :label="__('Signal')">
|
||||||
|
<x-input autocomplete="off" wire:model.debounce="meetup.signal"
|
||||||
|
:placeholder="__('Signal')"
|
||||||
|
/>
|
||||||
|
</x-input.group>
|
||||||
|
|
||||||
<x-input.group :for="md5('meetup.matrix_group')" :label="__('Matrix Group')">
|
<x-input.group :for="md5('meetup.matrix_group')" :label="__('Matrix Group')">
|
||||||
<x-input autocomplete="off" wire:model.debounce="meetup.matrix_group"
|
<x-input autocomplete="off" wire:model.debounce="meetup.matrix_group"
|
||||||
:placeholder="__('Matrix Group')"
|
:placeholder="__('Matrix Group')"
|
||||||
|
|||||||
@@ -140,6 +140,17 @@
|
|||||||
</x-button>
|
</x-button>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
@if($meetup->signal)
|
||||||
|
<x-button
|
||||||
|
target="_blank"
|
||||||
|
:href="$meetup->signal"
|
||||||
|
secondary lg class="mt-4 whitespace-nowrap">
|
||||||
|
<i class="fa fa-thin fa-external-link mr-2"></i>
|
||||||
|
{{ __('Signal') }}
|
||||||
|
</x-button>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@if($meetup->nostr && str($meetup->nostr)->contains('npub1'))
|
@if($meetup->nostr && str($meetup->nostr)->contains('npub1'))
|
||||||
<x-button
|
<x-button
|
||||||
|
|||||||
@@ -49,6 +49,15 @@
|
|||||||
{{ __('SimpleX-Link') }}
|
{{ __('SimpleX-Link') }}
|
||||||
</x-button>
|
</x-button>
|
||||||
@endif
|
@endif
|
||||||
|
@if($meetup->signal)
|
||||||
|
<x-button
|
||||||
|
target="_blank"
|
||||||
|
:href="$meetup->signal"
|
||||||
|
primary lg class="mt-4 whitespace-nowrap">
|
||||||
|
<i class="fa fa-thin fa-external-link mr-2"></i>
|
||||||
|
{{ __('Signal') }}
|
||||||
|
</x-button>
|
||||||
|
@endif
|
||||||
@if($meetup->nostr && str($meetup->nostr)->contains('npub1'))
|
@if($meetup->nostr && str($meetup->nostr)->contains('npub1'))
|
||||||
<x-button
|
<x-button
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
|||||||
@@ -99,6 +99,7 @@ Route::middleware([])
|
|||||||
'twitter_username' => $meetup->twitter_username,
|
'twitter_username' => $meetup->twitter_username,
|
||||||
'website' => $meetup->webpage,
|
'website' => $meetup->webpage,
|
||||||
'simplex' => $meetup->simplex,
|
'simplex' => $meetup->simplex,
|
||||||
|
'signal' => $meetup->signal,
|
||||||
'nostr' => $meetup->nostr,
|
'nostr' => $meetup->nostr,
|
||||||
'next_event' => $meetup->nextEvent,
|
'next_event' => $meetup->nextEvent,
|
||||||
'intro' => $request->has('withIntro') ? $meetup->intro : null,
|
'intro' => $request->has('withIntro') ? $meetup->intro : null,
|
||||||
@@ -134,6 +135,7 @@ Route::middleware([])
|
|||||||
'meetup.twitter_username' => $event->meetup->twitter_username,
|
'meetup.twitter_username' => $event->meetup->twitter_username,
|
||||||
'meetup.website' => $event->meetup->webpage,
|
'meetup.website' => $event->meetup->webpage,
|
||||||
'meetup.simplex' => $event->meetup->simplex,
|
'meetup.simplex' => $event->meetup->simplex,
|
||||||
|
'meetup.signal' => $event->meetup->signal,
|
||||||
'meetup.nostr' => $event->meetup->nostr,
|
'meetup.nostr' => $event->meetup->nostr,
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user