mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
stream calendar
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Models\Meetup;
|
use App\Models\Meetup;
|
||||||
|
use App\Models\MeetupEvent;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Spatie\IcalendarGenerator\Components\Calendar;
|
use Spatie\IcalendarGenerator\Components\Calendar;
|
||||||
use Spatie\IcalendarGenerator\Components\Event;
|
use Spatie\IcalendarGenerator\Components\Event;
|
||||||
@@ -18,14 +19,19 @@ class DownloadMeetupCalendar extends Controller
|
|||||||
*/
|
*/
|
||||||
public function __invoke(Request $request)
|
public function __invoke(Request $request)
|
||||||
{
|
{
|
||||||
|
if ($request->has('meetup')) {
|
||||||
$meetup = Meetup::query()
|
$meetup = Meetup::query()
|
||||||
->with([
|
->with([
|
||||||
'meetupEvents',
|
'meetupEvents',
|
||||||
])
|
])
|
||||||
->findOrFail($request->input('meetup'));
|
->findOrFail($request->input('meetup'));
|
||||||
|
$events = $meetup->meetupEvents;
|
||||||
|
} else {
|
||||||
|
$events = MeetupEvent::query()->get();
|
||||||
|
}
|
||||||
|
|
||||||
$entries = [];
|
$entries = [];
|
||||||
foreach ($meetup->meetupEvents as $event) {
|
foreach ($events as $event) {
|
||||||
$entries[] = Event::create()
|
$entries[] = Event::create()
|
||||||
->name($meetup->name)
|
->name($meetup->name)
|
||||||
->uniqueIdentifier(str($meetup->name)->slug.$event->id)
|
->uniqueIdentifier(str($meetup->name)->slug.$event->id)
|
||||||
|
|||||||
@@ -11,10 +11,10 @@
|
|||||||
x-data="{
|
x-data="{
|
||||||
textToCopy: '{{ route('meetup.ics', ['country' => $country, 'meetup' => $row->id]) }}',
|
textToCopy: '{{ route('meetup.ics', ['country' => $country, 'meetup' => $row->id]) }}',
|
||||||
}"
|
}"
|
||||||
@click.prevent="window.navigator.clipboard.writeText(textToCopy);window.$wireui.notify({title:'Kalendar URL kopiert!',description:'Füge den Kalender Stream-Link in eine kompatible Kalender-App ein.',icon:'success'});"
|
@click.prevent="window.navigator.clipboard.writeText(textToCopy);window.$wireui.notify({title:'{{ __('Calendar Stream Url copied!') }}',description:'{{ __('Paste the calendar stream link into a compatible calendar app.') }}',icon:'success'});"
|
||||||
amber>
|
amber>
|
||||||
<i class="fa fa-thin fa-calendar-arrow-down mr-2"></i>
|
<i class="fa fa-thin fa-calendar-arrow-down mr-2"></i>
|
||||||
{{ __('Stream Calendar (WIP)') }} ({{ $row->meetup_events_count }})
|
{{ __('Calendar Stream-Url') }} ({{ $row->meetup_events_count }})
|
||||||
</x-button>
|
</x-button>
|
||||||
@endif
|
@endif
|
||||||
@if($row->meetup_events_count < 1)
|
@if($row->meetup_events_count < 1)
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
x-data="{
|
x-data="{
|
||||||
textToCopy: 'lightning:{{ $this->lnurl }}',
|
textToCopy: 'lightning:{{ $this->lnurl }}',
|
||||||
}"
|
}"
|
||||||
@click.prevent="window.navigator.clipboard.writeText(textToCopy);window.$wireui.notify({title:'URL kopiert!',icon:'success'});"
|
@click.prevent="window.navigator.clipboard.writeText(textToCopy);window.$wireui.notify({title:'{{ __('URL copied!') }}',icon:'success'});"
|
||||||
>
|
>
|
||||||
<x-button
|
<x-button
|
||||||
xs
|
xs
|
||||||
@@ -52,7 +52,8 @@
|
|||||||
@endif
|
@endif
|
||||||
|
|
||||||
<div class="pt-12">
|
<div class="pt-12">
|
||||||
<p class="text-xs">{{ __('Zeus bug:') }} <a target="_blank" href="https://github.com/ZeusLN/zeus/issues/1045">https://github.com/ZeusLN/zeus/issues/1045</a>
|
<p class="text-xs">{{ __('Zeus bug:') }} <a target="_blank"
|
||||||
|
href="https://github.com/ZeusLN/zeus/issues/1045">https://github.com/ZeusLN/zeus/issues/1045</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -10,10 +10,10 @@
|
|||||||
x-data="{
|
x-data="{
|
||||||
textToCopy: '{{ route('bitcoinEvent.ics', ['country' => $country]) }}',
|
textToCopy: '{{ route('bitcoinEvent.ics', ['country' => $country]) }}',
|
||||||
}"
|
}"
|
||||||
@click.prevent="window.navigator.clipboard.writeText(textToCopy);window.$wireui.notify({title:'Kalendar URL kopiert!',description:'Füge den Kalender Stream-Link in eine kompatible Kalender-App ein.',icon:'success'});"
|
@click.prevent="window.navigator.clipboard.writeText(textToCopy);window.$wireui.notify({title:'{{ __('Calendar Stream Url copied!') }}',description:'{{ __('Paste the calendar stream link into a compatible calendar app.') }}',icon:'success'});"
|
||||||
amber>
|
amber>
|
||||||
<i class="fa fa-thin fa-calendar-arrow-down mr-2"></i>
|
<i class="fa fa-thin fa-calendar-arrow-down mr-2"></i>
|
||||||
{{ __('Stream Calendar (WIP)') }} ({{ $events->count() }})
|
{{ __('Calendar Stream-Url') }} ({{ $events->count() }})
|
||||||
</x-button>
|
</x-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -136,18 +136,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="w-full flex justify-end">
|
|
||||||
<x-button
|
|
||||||
x-data="{
|
|
||||||
textToCopy: '{{ route('bitcoinEvent.ics', ['country' => $country]) }}',
|
|
||||||
}"
|
|
||||||
@click.prevent="window.navigator.clipboard.writeText(textToCopy);window.$wireui.notify({title:'Kalendar URL kopiert!',description:'Füge den Kalender Stream-Link in eine kompatible Kalender-App ein.',icon:'success'});"
|
|
||||||
amber>
|
|
||||||
<i class="fa fa-thin fa-calendar-arrow-down mr-2"></i>
|
|
||||||
{{ __('Stream Calendar (WIP)') }} ({{ $events->count() }})
|
|
||||||
</x-button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<livewire:tables.bitcoin-event-table :country="$country->code"/>
|
<livewire:tables.bitcoin-event-table :country="$country->code"/>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|||||||
@@ -3,7 +3,19 @@
|
|||||||
<livewire:frontend.header :country="$country"/>
|
<livewire:frontend.header :country="$country"/>
|
||||||
{{-- MAIN --}}
|
{{-- MAIN --}}
|
||||||
<section class="w-full mb-12">
|
<section class="w-full mb-12">
|
||||||
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10 space-y-4 flex flex-col sm:flex-row">
|
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10 space-y-4 py-4">
|
||||||
|
<div class="w-full flex justify-end">
|
||||||
|
<x-button
|
||||||
|
x-data="{
|
||||||
|
textToCopy: '{{ route('meetup.ics', ['country' => $country]) }}',
|
||||||
|
}"
|
||||||
|
@click.prevent="window.navigator.clipboard.writeText(textToCopy);window.$wireui.notify({title:'{{ __('Calendar Stream Url copied!') }}',description:'{{ __('Paste the calendar stream link into a compatible calendar app.') }}',icon:'success'});"
|
||||||
|
amber>
|
||||||
|
<i class="fa fa-thin fa-calendar-arrow-down mr-2"></i>
|
||||||
|
{{ __('Calendar Stream-Url for all meetup events') }}
|
||||||
|
</x-button>
|
||||||
|
</div>
|
||||||
|
<div class="flex flex-col sm:flex-row">
|
||||||
<h1 class="mb-6 text-5xl font-extrabold leading-none tracking-normal text-gray-200 sm:text-6xl md:text-6xl lg:text-7xl md:tracking-tight">
|
<h1 class="mb-6 text-5xl font-extrabold leading-none tracking-normal text-gray-200 sm:text-6xl md:text-6xl lg:text-7xl md:tracking-tight">
|
||||||
{{ __('Bitcoiner') }} <span
|
{{ __('Bitcoiner') }} <span
|
||||||
class="w-full text-transparent bg-clip-text bg-gradient-to-r from-amber-400 via-amber-500 to-amber-200 lg:inline">{{ __('Meetups') }}</span><br
|
class="w-full text-transparent bg-clip-text bg-gradient-to-r from-amber-400 via-amber-500 to-amber-200 lg:inline">{{ __('Meetups') }}</span><br
|
||||||
@@ -58,6 +70,7 @@
|
|||||||
<div id="map" style="width: 100%;" class="h-[200px] sm:h-[400px] my-4 sm:my-0"></div>
|
<div id="map" style="width: 100%;" class="h-[200px] sm:h-[400px] my-4 sm:my-0"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10 space-y-4" id="table">
|
<div class="max-w-screen-2xl mx-auto px-2 sm:px-10 space-y-4" id="table">
|
||||||
<livewire:tables.meetup-table :country="$country->code"/>
|
<livewire:tables.meetup-table :country="$country->code"/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user