diff --git a/app/Http/Controllers/Export/MeetupEventAttendeesExportController.php b/app/Http/Controllers/Export/MeetupEventAttendeesExportController.php deleted file mode 100644 index 60516ca5..00000000 --- a/app/Http/Controllers/Export/MeetupEventAttendeesExportController.php +++ /dev/null @@ -1,19 +0,0 @@ -download($meetupEvent->start->toDateString().'_'.$meetupEvent->meetup->slug.'.xlsx'); - } -} diff --git a/app/Http/Livewire/Auth/Auth47Component.php b/app/Http/Livewire/Auth/Auth47Component.php deleted file mode 100644 index e51f4eba..00000000 --- a/app/Http/Livewire/Auth/Auth47Component.php +++ /dev/null @@ -1,28 +0,0 @@ -k1 = bin2hex(str()->random(32)); - $this->url = 'auth47://'.$this->k1.'?c=https://einundzwanzig.eu-1.sharedwithexpose.com/auth/auth47-callback&r=https://einundzwanzig.eu-1.sharedwithexpose.com/auth/auth47-callback'; - $this->qrCode = base64_encode(QrCode::format('png') - ->size(600) - ->errorCorrection('L') - ->generate($this->url)); - } - - public function render() - { - return view('livewire.auth.auth47-component')->layout('layouts.guest'); - } -} diff --git a/app/Http/Livewire/Auth/LNUrlAuth.php b/app/Http/Livewire/Auth/LNUrlAuth.php deleted file mode 100644 index bcc493b4..00000000 --- a/app/Http/Livewire/Auth/LNUrlAuth.php +++ /dev/null @@ -1,73 +0,0 @@ -k1 = bin2hex(str()->random(32)); - if (app()->environment('local')) { - $this->url = 'https://einundzwanzig.eu-1.sharedwithexpose.com/api/lnurl-auth-callback?tag=login&k1='.$this->k1.'&action=login'; - } else { - $this->url = url('/api/lnurl-auth-callback?tag=login&k1='.$this->k1.'&action=login'); - } - $this->lnurl = lnurl\encodeUrl($this->url); - $this->qrCode = base64_encode(QrCode::format('png') - ->size(300) - ->merge('/public/android-chrome-192x192.png', .3) - ->errorCorrection('H') - ->generate($this->lnurl)); - } - - public function checkAuth() - { - $loginKey = LoginKey::query() - ->where('k1', $this->k1) - ->whereDate('created_at', '>=', now()->subMinutes(5)) - ->first(); - // you should also restrict this 👆🏻 by time, and find only the $k1 that were created in the last 5 minutes - - if ($loginKey) { - $user = User::find($loginKey->user_id); - - \App\Models\User::find(1) - ->notify(new ModelCreatedNotification($user, 'users')); - auth()->login($user); - - return to_route('welcome'); - } - - return true; - } - - public function render() - { - return view('livewire.auth.ln-url-auth')->layout('layouts.guest'); - } -} diff --git a/app/Http/Livewire/Auth/Login.php b/app/Http/Livewire/Auth/Login.php deleted file mode 100644 index 55673a3d..00000000 --- a/app/Http/Livewire/Auth/Login.php +++ /dev/null @@ -1,72 +0,0 @@ - 'required|string', - 'userProfile.pubkey' => 'required|string', - - 'userProfile.banner' => 'required|string', - 'userProfile.image' => 'required|string', - - 'userProfile.name' => 'required|string', - 'userProfile.username' => 'required|string', - 'userProfile.website' => 'required|string', - 'userProfile.about' => 'required|string', - 'userProfile.displayName' => 'required|string', - 'userProfile.lud16' => 'required|string', - 'userProfile.nip05' => 'required|string', - ]; - } - - public function login($value) - { - if ($value) { - $firstUser = User::query()->where('nostr', $value)->first(); - if ($firstUser) { - auth()->login($firstUser, true); - - return to_route('welcome'); - } else { - $fakeName = str()->random(10); - // create User - $user = User::create([ - 'is_lecturer' => true, - 'name' => $fakeName, - 'email' => str($fakeName)->slug() . '@portal.einundzwanzig.space', - 'email_verified_at' => now(), - 'lnbits' => [ - 'read_key' => null, - 'url' => null, - 'wallet_id' => null, - ], - 'nostr' => $value, - ]); - $user->ownedTeams() - ->save(Team::forceCreate([ - 'user_id' => $user->id, - 'name' => $fakeName . "'s Team", - 'personal_team' => true, - ])); - auth()->login($user, true); - - return to_route('welcome'); - } - } - } - - public function render() - { - return view('livewire.auth.login')->layout('layouts.guest'); - } -} diff --git a/app/Http/Livewire/Auth/LoginWithNDK.php b/app/Http/Livewire/Auth/LoginWithNDK.php deleted file mode 100644 index 8f677711..00000000 --- a/app/Http/Livewire/Auth/LoginWithNDK.php +++ /dev/null @@ -1,44 +0,0 @@ - 'required|string', - 'userProfile.pubkey' => 'required|string', - - 'userProfile.banner' => 'required|string', - 'userProfile.image' => 'required|string', - - 'userProfile.name' => 'required|string', - 'userProfile.username' => 'required|string', - 'userProfile.website' => 'required|string', - 'userProfile.about' => 'required|string', - 'userProfile.displayName' => 'required|string', - 'userProfile.lud16' => 'required|string', - 'userProfile.nip05' => 'required|string', - ]; - } - - public function updatedUserProfile($value) - { - if (User::query()->where('nostr', $value['npub'])->exists()) { - $this->existingAccount = true; - } - } - - public function render() - { - return view('livewire.auth.login-with-n-d-k')->layout('layouts.guest'); - } -} diff --git a/app/Http/Livewire/Banner/MempoolWeather.php b/app/Http/Livewire/Banner/MempoolWeather.php deleted file mode 100644 index 01ea2e2e..00000000 --- a/app/Http/Livewire/Banner/MempoolWeather.php +++ /dev/null @@ -1,30 +0,0 @@ -has('mempool-weather')) { - $this->weather = cache()->get('mempool-weather'); - } else { - Artisan::call(CacheRecommendedFees::class); - $this->weather = cache()->get('mempool-weather'); - } - $this->changed = cache()->get('mempool-weather-changed');*/ - } - - public function render() - { - return view('livewire.banner.mempool-weather'); - } -} diff --git a/app/Http/Livewire/BitcoinEvent/BitcoinEventTable.php b/app/Http/Livewire/BitcoinEvent/BitcoinEventTable.php deleted file mode 100644 index 30fe07a8..00000000 --- a/app/Http/Livewire/BitcoinEvent/BitcoinEventTable.php +++ /dev/null @@ -1,95 +0,0 @@ -year) { - $this->year = now()->year; - } - } - - public function render() - { - return view('livewire.bitcoin-event.bitcoin-event-table', [ - 'markers' => BitcoinEvent::query() - ->with([ - 'venue.city.country', - ]) - ->where('bitcoin_events.from', '>=', now()) - ->where(fn ($query) => $query - ->whereHas('venue.city.country', - fn ($query) => $query->where('countries.code', $this->country->code)) - ->orWhere('show_worldwide', true) - ) - ->get() - ->map(fn ($event) => [ - 'id' => $event->id, - 'name' => $event->title, - 'coords' => [$event->venue->city->latitude, $event->venue->city->longitude], - ]), - 'events' => BitcoinEvent::query() - ->where('bitcoin_events.from', '>=', now()) - ->where(fn ($query) => $query - ->whereHas('venue.city.country', - fn ($query) => $query->where('countries.code', $this->country->code)) - ->orWhere('show_worldwide', true) - ) - ->get() - ->map(fn ($event) => [ - 'id' => $event->id, - 'startDate' => $event->from, - 'endDate' => $event->to, - 'location' => $event->title, - 'description' => $event->description, - ]), - ])->layout('layouts.app', [ - 'SEOData' => new SEOData( - title: __('Bitcoin Events'), - description: __('Search out a Bitcoin Event'), - image: asset('img/screenshot.png') - ), - ]); - } - - public function filterByMarker($id) - { - return to_route('bitcoinEvent.table.bitcoinEvent', [ - '#table', - 'country' => $this->country->code, - 'year' => $this->year, - 'bitcoin_events' => [ - 'filters' => [ - 'byid' => $id, - ], - ], - ]); - } - - public function popover($content, $ids) - { - return to_route('bitcoinEvent.table.bitcoinEvent', [ - '#table', - 'country' => $this->country->code, - 'year' => $this->year, - 'bitcoin_events' => [ - 'filters' => [ - 'byid' => $ids, - ], - ], - ]); - } -} diff --git a/app/Http/Livewire/BitcoinEvent/Form/BitcoinEventForm.php b/app/Http/Livewire/BitcoinEvent/Form/BitcoinEventForm.php deleted file mode 100644 index 519cd092..00000000 --- a/app/Http/Livewire/BitcoinEvent/Form/BitcoinEventForm.php +++ /dev/null @@ -1,90 +0,0 @@ - [ - 'except' => null, - ], - ]; - - public function rules() - { - return [ - 'image' => [Rule::requiredIf(!$this->bitcoinEvent->id), 'nullable', 'mimes:jpeg,png,jpg,gif', 'max:10240'], - - 'bitcoinEvent.venue_id' => 'required', - 'bitcoinEvent.from' => 'required', - 'bitcoinEvent.to' => 'required', - 'bitcoinEvent.title' => 'required', - 'bitcoinEvent.description' => 'required', - 'bitcoinEvent.link' => 'required|url', - 'bitcoinEvent.show_worldwide' => 'bool', - ]; - } - - public function mount() - { - if (!$this->bitcoinEvent) { - $this->bitcoinEvent = new BitcoinEvent( - [ - 'description' => '', - 'show_worldwide' => true, - ] - ); - } elseif (!auth() - ->user() - ->can('update', $this->bitcoinEvent)) { - abort(403); - } - - if (!$this->fromUrl) { - $this->fromUrl = url()->previous(); - } - } - - public function deleteMe() - { - $this->bitcoinEvent->delete(); - - return redirect($this->fromUrl); - } - - public function submit() - { - $this->validate(); - $this->bitcoinEvent->save(); - - if ($this->image) { - $this->bitcoinEvent->addMedia($this->image) - ->usingFileName(md5($this->image->getClientOriginalName()).'.'.$this->image->getClientOriginalExtension()) - ->toMediaCollection('logo'); - } - - return redirect($this->fromUrl); - } - - public function render() - { - return view('livewire.bitcoin-event.form.bitcoin-event-form'); - } -} diff --git a/app/Http/Livewire/BookCase/BookCaseTable.php b/app/Http/Livewire/BookCase/BookCaseTable.php deleted file mode 100644 index 319ca8e1..00000000 --- a/app/Http/Livewire/BookCase/BookCaseTable.php +++ /dev/null @@ -1,48 +0,0 @@ - ! isset($this->table['filters']['byids']) ? [] - : BookCase::query() - ->whereIn('id', str($this->table['filters']['byids'] ?? '')->explode(',')) - ->get() - ->map(fn ($b) => [ - 'title' => $b->title, - 'lat' => $b->latitude, - 'lng' => $b->longitude, - 'url' => route('bookCases.comment.bookcase', ['country' => $this->country, 'bookCase' => $b]), - 'icon' => asset('img/btc-logo-6219386_1280.png'), - 'icon_size' => [42, 42], - ]) - ->toArray(), - 'bookCases' => BookCase::query()->active()->get(), - 'countries' => Country::query() - ->select(['code', 'name']) - ->get(), - ])->layout('layouts.app', [ - 'SEOData' => new SEOData( - title: __('Bookcases'), - description: __('Search out a public bookcase'), - image: asset('img/screenshot.png') - ), - ]); - } -} diff --git a/app/Http/Livewire/BookCase/CityTable.php b/app/Http/Livewire/BookCase/CityTable.php deleted file mode 100644 index b07c4204..00000000 --- a/app/Http/Livewire/BookCase/CityTable.php +++ /dev/null @@ -1,31 +0,0 @@ - [ - 'except' => false, - ], - ]; - - public function render() - { - return view('livewire.book-case.city-table')->layout('layouts.app', [ - 'SEOData' => new SEOData( - title: __('Bookcases'), - description: __('Search out a public bookcase'), - image: asset('img/screenshot.png') - ), - ]); - } -} diff --git a/app/Http/Livewire/BookCase/CommentBookCase.php b/app/Http/Livewire/BookCase/CommentBookCase.php deleted file mode 100644 index 3f9a0328..00000000 --- a/app/Http/Livewire/BookCase/CommentBookCase.php +++ /dev/null @@ -1,67 +0,0 @@ -validate([ - 'photo' => 'image|max:4096', // 4MB Max - ]); - - $this->bookCase - ->addMedia($this->photo) - ->usingFileName(md5($this->photo->getClientOriginalName()).'.'.$this->photo->getClientOriginalExtension()) - ->toMediaCollection('images'); - - return to_route('bookCases.comment.bookcase', ['country' => $this->country, 'bookCase' => $this->bookCase->id]); - } - - public function deletePhoto($id) - { - Media::find($id) - ->delete(); - - return to_route('bookCases.comment.bookcase', ['country' => $this->country, 'bookCase' => $this->bookCase->id]); - } - - public function render() - { - return view('livewire.book-case.comment-book-case') - ->layout('layouts.app', [ - 'SEOData' => new SEOData( - title: $this->bookCase->title, - description: $this->bookCase->address, - image: $this->bookCase->getFirstMediaUrl('images', 'seo') ?? asset('img/bookcase.jpg'), - ), - ]); - } - - protected function url_to_absolute($url) - { - if (str($url)->contains('http')) { - return $url; - } - if (!str($url)->contains('http')) { - return str($url)->prepend('https://'); - } - } -} diff --git a/app/Http/Livewire/BookCase/Form/OrangePillForm.php b/app/Http/Livewire/BookCase/Form/OrangePillForm.php deleted file mode 100644 index ad072c7c..00000000 --- a/app/Http/Livewire/BookCase/Form/OrangePillForm.php +++ /dev/null @@ -1,91 +0,0 @@ - ['except' => '']]; - - public function rules() - { - return [ - 'orangePill.book_case_id' => ['required'], - 'orangePill.user_id' => ['required'], - 'orangePill.amount' => ['required', 'numeric'], - 'orangePill.date' => ['required', 'date'], - 'orangePill.comment' => ['required', 'string'], - - 'image' => ['max:8192', Rule::requiredIf(!$this->orangePill->id), 'image', 'nullable'], // 8MB Max - ]; - } - - public function mount() - { - if (!$this->orangePill) { - $this->orangePill = new OrangePill([ - 'user_id' => auth()->id(), - 'book_case_id' => $this->bookCase->id, - 'date' => now(), - 'amount' => 1, - ]); - } elseif ($this->orangePill->user_id !== auth()->id()) { - abort(403); - } - if (!$this->fromUrl) { - $this->fromUrl = url()->previous(); - } - } - - public function save() - { - if (!auth()->check()) { - return to_route('auth.login'); - } - $this->validate(); - $this->orangePill->save(); - - if ($this->image) { - $this->orangePill - ->addMedia($this->image) - ->usingFileName(md5($this->image->getClientOriginalName()).'.'.$this->image->getClientOriginalExtension()) - ->toMediaCollection('images'); - } - - return redirect($this->fromUrl); - } - - public function deleteMe() - { - $this->orangePill->delete(); - auth() - ->user() - ->undoPoint(new BookCaseOrangePilled($this->orangePill)); - - return redirect($this->fromUrl); - } - - public function render() - { - return view('livewire.book-case.form.orange-pill-form'); - } -} diff --git a/app/Http/Livewire/BookCase/Heatmap.php b/app/Http/Livewire/BookCase/Heatmap.php deleted file mode 100644 index 52d403ea..00000000 --- a/app/Http/Livewire/BookCase/Heatmap.php +++ /dev/null @@ -1,34 +0,0 @@ -active() - ->whereHas('orangePills') - ->get() - ->map(fn ($bookCase) => [ - 'lat' => $bookCase->latitude, - 'lng' => $bookCase->longitude, - ]); - - return view('livewire.book-case.heatmap', [ - 'heatmap_data' => $data->toArray(), - ])->layout('layouts.app', [ - 'SEOData' => new SEOData( - title: __('Heatmap of Bookcases'), - description: __('On this map you can see the success and spread of the Bitcoin books.'), - image: asset('img/heatmap_bookcases.png'), - ), - ]); - } -} diff --git a/app/Http/Livewire/BookCase/HighscoreTable.php b/app/Http/Livewire/BookCase/HighscoreTable.php deleted file mode 100644 index 8d00d5f1..00000000 --- a/app/Http/Livewire/BookCase/HighscoreTable.php +++ /dev/null @@ -1,63 +0,0 @@ - User::query() - ->with([ - 'reputations', - ]) - ->withCount([ - 'orangePills', - ]) - ->where('reputation', '>', 0) - ->orderByDesc('reputation') - ->get(), - ])->layout('layouts.app', [ - 'SEOData' => new SEOData( - title: __('Highscore Table'), - description: __('Hall of fame of our honorable plebs'), - image: asset('img/highscore_table_screenshot.png'), - ), - ]); - } - - public function toggleChat() - { - $this->emit('toggleHighscoreChat'); - } - - public function openModal($id) - { - $this->modal = User::query() - ->with([ - 'orangePills', - 'reputations', - ]) - ->where('id', $id) - ->first(); - - $this->viewingModal = true; - } - - public function resetModal() - { - $this->modal = null; - $this->viewingModal = false; - } -} diff --git a/app/Http/Livewire/BookCase/Stats.php b/app/Http/Livewire/BookCase/Stats.php deleted file mode 100644 index 172b4496..00000000 --- a/app/Http/Livewire/BookCase/Stats.php +++ /dev/null @@ -1,18 +0,0 @@ - OrangePill::query()->count(), - 'plebs' => User::query()->whereHas('orangePills')->count(), - ]); - } -} diff --git a/app/Http/Livewire/BookCase/WorldMap.php b/app/Http/Livewire/BookCase/WorldMap.php deleted file mode 100644 index b5f07b66..00000000 --- a/app/Http/Livewire/BookCase/WorldMap.php +++ /dev/null @@ -1,41 +0,0 @@ - BookCase::query() - ->select(['id', 'latitude', 'longitude']) - ->withCount('orangePills') - ->active() - ->get() - ->map(fn ($bookCase) => [ - 'lat' => $bookCase->latitude, - 'lng' => $bookCase->longitude, - 'url' => url()->route('bookCases.comment.bookcase', - [ - 'country' => $this->country, - 'bookCase' => $bookCase, - ]), - 'op' => $bookCase->orange_pills_count, - ]) - ->toArray(), - ])->layout('layouts.app', [ - 'SEOData' => new SEOData( - title: __('World Map of Bookcases'), - description: __('On this map you can see bookcases that have been orange pilled. You can also click on a marker to go to the search result.'), - image: asset('img/world_map_bookcases.png') - ), - ]); - } -} diff --git a/app/Http/Livewire/Chat/HighscoreChat.php b/app/Http/Livewire/Chat/HighscoreChat.php deleted file mode 100644 index ec0915c5..00000000 --- a/app/Http/Livewire/Chat/HighscoreChat.php +++ /dev/null @@ -1,72 +0,0 @@ - 'required|min:1|max:255', - ]; - } - - public function getListeners() - { - return [ - 'toggleHighscoreChat' => 'toggle', - 'echo:plebchannel,.App\Events\ChatMessageSentEvent' => 'chatMessageSent', - ]; - } - - public function mount() - { - $this->messages = cache()->get('highscore_chat_messages', []); - } - - public function toggle() - { - $this->open = ! $this->open; - } - - public function chatMessageSent() - { - if (auth()->check()) { - $this->messages = cache()->get('highscore_chat_messages', []); - $this->dispatchBrowserEvent('chat-updated'); - } - } - - public function sendMessage() - { - $this->validate(); - $newMessages = collect(cache()->get('highscore_chat_messages', [])) - ->push([ - 'fromId' => auth()->id(), - 'fromName' => str(auth()->user()->name)->limit(2), - 'userImg' => str(auth()->user()->profile_photo_url)->replace('background=EBF4FF', 'background=F7931A'), - 'message' => $this->myNewMessage, - 'time' => now()->asDateTime(), - ]) - ->take(-21) - ->toArray(); - cache()->set('highscore_chat_messages', $newMessages); - event(new ChatMessageSentEvent()); - $this->messages = $newMessages; - $this->myNewMessage = ''; - } - - public function render() - { - return view('livewire.chat.highscore-chat'); - } -} diff --git a/app/Http/Livewire/City/Form/CityForm.php b/app/Http/Livewire/City/Form/CityForm.php deleted file mode 100644 index 7be7187f..00000000 --- a/app/Http/Livewire/City/Form/CityForm.php +++ /dev/null @@ -1,63 +0,0 @@ - [ - 'except' => null, - ], - ]; - - public function rules() - { - return [ - 'city.country_id' => 'required', - 'city.name' => [ - 'required', - Rule::unique('cities', 'name') - ->ignore($this->city), - ], - 'city.longitude' => 'required', - 'city.latitude' => 'required', - ]; - } - - public function mount() - { - if (!$this->city) { - $this->city = new City(); - } - if (!$this->fromUrl) { - $this->fromUrl = url()->previous(); - } - } - - public function save() - { - $this->validate(); - $this->city->longitude = str($this->city->longitude) - ->replace(',', '.') - ->toFloat(); - $this->city->latitude = str($this->city->latitude) - ->replace(',', '.') - ->toFloat(); - $this->city->save(); - - return redirect($this->fromUrl ?? url()->route('welcome')); - } - - public function render() - { - return view('livewire.city.form.city-form'); - } -} diff --git a/app/Http/Livewire/ContentCreator/Form/ContentCreatorForm.php b/app/Http/Livewire/ContentCreator/Form/ContentCreatorForm.php deleted file mode 100644 index aa775d0e..00000000 --- a/app/Http/Livewire/ContentCreator/Form/ContentCreatorForm.php +++ /dev/null @@ -1,76 +0,0 @@ - ['except' => '']]; - - public function rules() - { - return [ - 'image' => [Rule::requiredIf(!$this->lecturer->id), 'nullable', 'mimes:jpeg,png,jpg,gif', 'max:10240'], - - 'lecturer.name' => [ - 'required', - Rule::unique('lecturers', 'name') - ->ignore($this->lecturer), - ], - 'lecturer.active' => 'boolean', - 'lecturer.subtitle' => 'nullable|string', - 'lecturer.intro' => 'nullable|string', - 'lecturer.paynym' => 'nullable|string', - 'lecturer.nostr' => 'nullable|string', - 'lecturer.twitter_username' => 'nullable|string', - 'lecturer.website' => 'nullable|url', - 'lecturer.lightning_address' => 'nullable|string', - 'lecturer.lnurl' => 'nullable|string', - 'lecturer.node_id' => 'nullable|string', - ]; - } - - public function mount() - { - if (!$this->lecturer) { - $this->lecturer = new Lecturer([ - 'intro' => '', - 'active' => true, - ]); - } - if (!$this->fromUrl) { - $this->fromUrl = url()->previous(); - } - } - - public function save() - { - $this->validate(); - $this->lecturer->save(); - - if ($this->image) { - $this->lecturer->addMedia($this->image) - ->usingFileName(md5($this->image->getClientOriginalName()).'.'.$this->image->getClientOriginalExtension()) - ->toMediaCollection('avatar'); - } - - return redirect($this->fromUrl); - } - - public function render() - { - return view('livewire.content-creator.form.content-creator-form'); - } -} diff --git a/app/Http/Livewire/Frontend/Footer.php b/app/Http/Livewire/Frontend/Footer.php deleted file mode 100644 index 18cfd055..00000000 --- a/app/Http/Livewire/Frontend/Footer.php +++ /dev/null @@ -1,37 +0,0 @@ -where('language', $l) - ->first(); - if (!$language || str($l)->contains('ey')) { - $language = Language::query() - ->where('language', config('app.locale')) - ->first(); - } - $translated = $language->translations() - ->whereNotNull('value') - ->where('value', '<>', '') - ->count(); - $toTranslate = Translation::query() - ->where('language_id', $language->id) - ->count(); - $toTranslate = $toTranslate > 0 ? $toTranslate : 1; - - return view('livewire.frontend.footer', [ - 'percentTranslated' => $l === 'en' ? 100 : round(($translated / $toTranslate) * 100), - 'language' => $language, - ]); - } -} diff --git a/app/Http/Livewire/Frontend/Header.php b/app/Http/Livewire/Frontend/Header.php deleted file mode 100644 index abaa1956..00000000 --- a/app/Http/Livewire/Frontend/Header.php +++ /dev/null @@ -1,162 +0,0 @@ - '$refresh']; - - public function rules() - { - return [ - 'c' => 'required', - 'l' => 'required', - 'timezone' => 'required', - ]; - } - - public function mount() - { - $this->timezone = config('app.user-timezone'); - $this->l = Cookie::get('lang') ?: config('app.locale'); - $this->c = Cookie::get('country') ?: config('app.country'); - if (!$this->country) { - $this->country = Country::query() - ->where('code', $this->c) - ->first(); - } - $this->currentRouteName = Route::currentRouteName(); - } - - public function updatedTimezone($value) - { - auth() - ->user() - ->update(['timezone' => $value]); - - return redirect(request()->header('Referer')); - } - - public function updatedC($value) - { - Cookie::queue('country', $value, 60 * 24 * 365); - $url = str(request()->header('Referer'))->explode('/'); - $url[3] = $value; - - return redirect($url->implode('/')); - } - - public function updatedL($value) - { - Cookie::queue('lang', $value, 60 * 24 * 365); - - return redirect(request()->header('Referer')); - } - - public function render() - { - return view('livewire.frontend.header', [ - 'news' => LibraryItem::query() - ->with([ - 'createdBy.roles', - 'lecturer', - 'tags', - ]) - ->where('type', 'markdown_article') - ->where('approved', true) - ->where('news', true) - ->orderByDesc('created_at') - ->take(2) - ->get(), - 'meetups' => MeetupEvent::query() - ->with([ - 'meetup.users', - 'meetup.city.country', - ]) - ->where('start', '>', now()) - ->orderBy('start') - ->take(2) - ->get(), - 'courseEvents' => CourseEvent::query() - ->with([ - 'venue.city.country', - 'course.lecturer', - ]) - ->where('from', '>', now()) - ->orderBy('from') - ->take(2) - ->get(), - 'libraryItems' => LibraryItem::query() - ->with([ - 'lecturer', - ]) - ->where('type', '<>', 'markdown_article') - ->orderByDesc('created_at') - ->take(2) - ->get(), - 'bitcoinEvents' => BitcoinEvent::query() - ->with([ - 'venue', - ]) - ->where('from', '>', now()) - ->orderBy('from') - ->take(2) - ->get(), - 'orangePills' => OrangePill::query() - ->with([ - 'user', - 'bookCase', - ]) - ->orderByDesc('date') - ->take(2) - ->get(), - 'projectProposals' => ProjectProposal::query() - ->with([ - 'votes', - 'user', - ]) - ->take(2) - ->get(), - 'cities' => City::query() - ->select(['latitude', 'longitude']) - ->get(), - 'countries' => Country::query() - ->select('id', 'name', 'code') - ->orderBy('name') - ->get() - ->map(function (Country $country) { - $country->name = config('countries.emoji_flags')[str($country->code) - ->upper() - ->toString()].' '.$country->name; - - return $country; - }), - ]); - } -} diff --git a/app/Http/Livewire/Frontend/SearchTabs.php b/app/Http/Livewire/Frontend/SearchTabs.php deleted file mode 100644 index 691835c9..00000000 --- a/app/Http/Livewire/Frontend/SearchTabs.php +++ /dev/null @@ -1,15 +0,0 @@ - 'required', - 'l' => 'required', - ]; - } - - public function mount() - { - $this->l = Cookie::get('lang') ?: config('app.locale'); - $this->c = Cookie::get('country') ?: config('app.country'); - Cookie::queue('lang', $this->l, 60 * 24 * 365); - Cookie::queue('country', $this->c, 60 * 24 * 365); - } - - public function updated($property, $value) - { - $this->validate(); - if ($property === 'c') { - $c = $value; - } else { - $c = $this->c; - } - if ($property === 'l') { - $l = $value; - } else { - $l = $this->l; - } - - Cookie::queue('lang', $this->l, 60 * 24 * 365); - Cookie::queue('country', $this->c, 60 * 24 * 365); - - return to_route('welcome', ['c' => $c, 'l' => $l]); - } - - public function render() - { - return view('livewire.frontend.welcome', [ - 'countries' => Country::query() - ->select('id', 'name', 'code') - ->orderBy('name') - ->get() - ->map(function (Country $country) { - $country->name = config('countries.emoji_flags')[str($country->code) - ->upper() - ->toString()].' '.$country->name; - - return $country; - }), - ])->layout('layouts.guest', [ - 'SEOData' => new SEOData( - title: __('Welcome'), - description: __('Welcome to the portal of the Einundzwanzig Community.'), - image: url()->route('imgPublic', ['path' => 'img/screenshot.png', 'h' => 630, 'w' => 1200, 'fit' => 'crop']) - ), - ]); - } -} diff --git a/app/Http/Livewire/Guest/Welcome.php b/app/Http/Livewire/Guest/Welcome.php deleted file mode 100644 index 8ebe9337..00000000 --- a/app/Http/Livewire/Guest/Welcome.php +++ /dev/null @@ -1,13 +0,0 @@ -layout('layouts.guest'); - } -} diff --git a/app/Http/Livewire/Hello.php b/app/Http/Livewire/Hello.php deleted file mode 100644 index e7fdf965..00000000 --- a/app/Http/Livewire/Hello.php +++ /dev/null @@ -1,87 +0,0 @@ - 'required|string|max:1000', - ]; - } - - public function mount() - { - try { - // {"url":"","wallet_id":"","read_key":""} - $invoice = $this->createInvoice( - sats: 21, - memo: 'Payment for: Bitcoin im Ländle 2023 - Code is Speech', - lnbits: [ - 'url' => config('services.lnbits.url'), - 'wallet_id' => config('services.lnbits.wallet_id'), - 'read_key' => config('services.lnbits.read_key'), - ], - ); - } catch (\Exception $e) { - $this->notification() - ->error('LNBits error: '.$e->getMessage()); - - return; - } - - $this->paymentHash = $invoice['payment_hash']; - $this->qrCode = base64_encode(QrCode::format('png') - ->size(300) - ->merge('/public/img/markus_turm.png', .3) - ->errorCorrection('H') - ->generate($invoice['payment_request'])); - $this->invoice = $invoice['payment_request']; - $this->checkid = $invoice['checking_id']; - } - - public function checkPaymentHash() - { - try { - $invoice = $this->check($this->checkid, [ - 'url' => config('services.lnbits.url'), - 'wallet_id' => config('services.lnbits.wallet_id'), - 'read_key' => config('services.lnbits.read_key'), - ]); - } catch (\Exception $e) { - $this->notification() - ->error('LNBits error: '.$e->getMessage()); - - return; - } - if (isset($invoice['paid']) && $invoice['paid']) { - $this->invoicePaid = true; - event(new PaidMessageEvent($this->message, $this->checkid)); - } else { - Log::error(json_encode($invoice, JSON_THROW_ON_ERROR)); - } - } - - public function render() - { - return view('livewire.hello')->layout('layouts.guest'); - } -} diff --git a/app/Http/Livewire/Library/Form/LibraryItemForm.php b/app/Http/Livewire/Library/Form/LibraryItemForm.php deleted file mode 100644 index 1b356be5..00000000 --- a/app/Http/Livewire/Library/Form/LibraryItemForm.php +++ /dev/null @@ -1,198 +0,0 @@ - ['except' => ''], - 'lecturer' => ['except' => false], - 'isBindle' => ['except' => false], - ]; - - public function rules() - { - return [ - 'image' => [Rule::requiredIf(!$this->libraryItem->id), 'nullable', 'mimes:jpeg,png,jpg,gif', 'max:10240'], - - 'library' => 'required', - - 'selectedTags' => 'array|min:1', - - 'libraryItem.lecturer_id' => 'required', - 'libraryItem.name' => 'required', - 'libraryItem.type' => 'required', - 'libraryItem.language_code' => 'required', - 'libraryItem.value' => [ - Rule::when($this->libraryItem->type !== LibraryItemType::DownloadableFile(), 'required'), - Rule::when( - $this->libraryItem->type !== LibraryItemType::MarkdownArticle() - && $this->libraryItem->type !== LibraryItemType::MarkdownArticleExtern(), ['url'] - ), - ], - 'libraryItem.subtitle' => - [ - Rule::when( - $this->libraryItem->type !== 'bindle', - 'required', - ) - ], - 'libraryItem.excerpt' => - [ - Rule::when( - $this->libraryItem->type !== 'bindle', - 'required', - ) - ], - 'libraryItem.main_image_caption' => - [ - Rule::when( - $this->libraryItem->type !== 'bindle', - 'required', - ) - ], - 'libraryItem.read_time' => - [ - Rule::when( - $this->libraryItem->type !== 'bindle', - 'required', - ) - ], - 'libraryItem.approved' => - [ - Rule::when( - $this->libraryItem->type !== 'bindle', - 'required', - ) - ], - ]; - } - - public function mount() - { - if (!$this->libraryItem) { - $this->libraryItem = new LibraryItem([ - 'approved' => true, - 'read_time' => 1, - 'value' => '' - ]); - if ($this->lecturer) { - $this->library = Library::query() - ->firstWhere('name', '=', 'Dozentenmaterial')?->id; - } - } else { - $this->selectedTags = $this->libraryItem->tags() - ->where('type', 'library_item') - ->get() - ->map(fn($tag) => $tag->name) - ->toArray(); - $this->library = $this->libraryItem->libraries() - ->first() - ->id; - } - if (!$this->fromUrl) { - $this->fromUrl = url()->previous(); - } - if ($this->isBindle) { - $this->library = 21; - $this->libraryItem->lecturer_id = 125; - $this->libraryItem->type = 'bindle'; - $this->libraryItem->language_code = 'de'; - $this->selectedTags = ['Bindle']; - } - } - - public function save() - { - $this->validate(); - $this->libraryItem->save(); - $this->libraryItem->setStatus('published'); - - $this->libraryItem->syncTagsWithType( - $this->selectedTags, - 'library_item' - ); - - if ($this->image) { - $this->libraryItem->addMedia($this->image) - ->usingFileName(md5($this->image->getClientOriginalName()) . '.' . $this->image->getClientOriginalExtension()) - ->toMediaCollection('main'); - } - - if ($this->file) { - $this->libraryItem->addMedia($this->file) - ->usingFileName(md5($this->file->getClientOriginalName()) . '.' . $this->file->getClientOriginalExtension()) - ->toMediaCollection('single_file'); - } - - $this->libraryItem->libraries() - ->syncWithoutDetaching([(int)$this->library]); - - if ($this->libraryItem->type === 'bindle') { - return to_route('bindles'); - } - - return to_route('library.table.libraryItems', ['country' => $this->country]); - } - - public function render() - { - $types = Options::forEnum(LibraryItemType::class) - ->filter( - fn($type) => $type !== LibraryItemType::PodcastEpisode - && $type !== LibraryItemType::MarkdownArticle - ) - ->toArray(); - $libaries = Library::query() - ->when(auth()->id() != config('portal.bonus.fiat-tracker-user-id'), - fn($query) => $query->where('name', '!=', 'Bindle') - ) - ->get() - ->map(fn($library) => [ - 'id' => $library->id, - 'name' => $library->name, - ]) - ->toArray(); - - if (auth()->id() == config('portal.bonus.fiat-tracker-user-id')) { - $types = collect($types)->prepend([ - 'label' => 'Bindle', - 'value' => 'bindle', - ]); - } - - return view('livewire.library.form.library-item-form', [ - 'types' => $types, - 'libraries' => $libaries, - ]); - } -} diff --git a/app/Http/Livewire/Library/LibraryTable.php b/app/Http/Livewire/Library/LibraryTable.php deleted file mode 100644 index e0207f92..00000000 --- a/app/Http/Livewire/Library/LibraryTable.php +++ /dev/null @@ -1,129 +0,0 @@ - ['except' => '*'], - 'filters' => ['except' => ''], - 'search' => ['except' => ''], - ]; - - public function loadMore() - { - $this->perPage += 9; - } - - public function mount() - { - if (str(request() - ->route() - ->getName())->contains(['.lecturer'])) { - $this->isLecturerPage = true; - } - } - - public function resetFiltering($isLecturerPage = false) - { - if ($isLecturerPage) { - return to_route('library.table.lecturer', ['country' => $this->country, 'currentTab' => '*']); - } else { - return to_route('library.table.libraryItems', ['country' => $this->country, 'currentTab' => '*']); - } - } - - public function render() - { - $shouldBePublic = !$this->isLecturerPage; - $libraries = \App\Models\Library::query() - ->where('name', '!=', 'Bindle') - ->whereNull('parent_id') - ->where('is_public', $shouldBePublic) - ->orderBy('name') - ->get(); - $tabs = collect([ - [ - 'name' => '*', - ], - ]); - foreach ($libraries as $library) { - $tabs->push([ - 'name' => $library->name, - ]); - } - - if ($this->currentTab !== '*') { - $parentLibrary = Library::query() - ->where('name', $this->currentTab) - ->first(); - } - $searchTags = []; - if ($this->search) { - $searchTags = Tag::where('name', 'ilike', '%' . $this->search . '%') - ->pluck('id') - ->toArray(); - } - - return view('livewire.library.library-table', [ - 'libraries' => $tabs, - 'libraryItems' => LibraryItem::query() - ->with([ - 'lecturer', - 'tags', - ]) - ->where('type', '!=', 'bindle') - ->when($this->search, fn($query) => $query - ->where('name', 'ilike', '%' . $this->search . '%') - ->orWhere(fn($query) => $query - ->when(count($searchTags) > 0 && count($this->filters) < 1, - fn($query) => $query->whereHas('tags', - fn($query) => $query->whereIn('tags.id', $searchTags))) - ) - ) - ->when($this->currentTab !== '*', fn($query) => $query - ->whereHas('libraries', - fn($query) => $query - ->where('libraries.name', $this->currentTab) - ) - ) - ->when(isset($this->filters['lecturer_id']), - fn($query) => $query->where('library_items.lecturer_id', - $this->filters['lecturer_id']) - ) - ->when(isset($this->filters['tag']), fn($query) => $query->whereHas('tags', - fn($query) => $query->whereIn('tags.id', $this->filters['tag']))) - ->when(isset($this->filters['language']), - fn($query) => $query->whereIn('language_code', $this->filters['language'])) - ->whereHas('libraries', - fn($query) => $query->where('libraries.is_public', $shouldBePublic)) - ->orderByDesc('library_items.created_at') - ->paginate($this->perPage), - ])->layout('layouts.app', [ - 'SEOData' => new SEOData( - title: __('Library'), - description: __('Here you can find all content that are available in the library.'), - image: asset('img/screenshot.png') - ), - ]); - } -} diff --git a/app/Http/Livewire/Library/PodcastEpisodesTable.php b/app/Http/Livewire/Library/PodcastEpisodesTable.php deleted file mode 100644 index 3b68ae6f..00000000 --- a/app/Http/Livewire/Library/PodcastEpisodesTable.php +++ /dev/null @@ -1,60 +0,0 @@ - ['except' => ''], - 'search' => ['except' => ''], - ]; - - public function loadMore() - { - $this->perPage += 9; - } - - public function resetFiltering($isLecturerPage = false) - { - return to_route('library.table.podcastsEpisodes', ['country' => $this->country]); - } - - public function render() - { - return view('livewire.library.podcast-episodes-table', [ - 'episodes' => Episode::query() - ->with(['podcast']) - ->whereNot('data->link', '=', '') - ->when($this->search, - fn($query, $search) => $query - ->where('data->title', 'ilike', "%{$search}%") - ->orWhere('data->description', 'ilike', "%{$search}%") - ->orWhereHas('podcast', - fn($query) => $query->where('data->title', 'ilike', "%{$search}%")) - ) - ->orderByDesc('data->datePublished') - ->paginate($this->perPage), - ])->layout('layouts.app', [ - 'SEOData' => new SEOData( - title: __('Podcast Episodes'), - description: __('Search and find Bitcoin Podcast episodes.'), - image: asset('img/Screenshot_Podcast_Episodes.png') - ), - ]); - } -} diff --git a/app/Http/Livewire/Library/SearchByTagComponent.php b/app/Http/Livewire/Library/SearchByTagComponent.php deleted file mode 100644 index 69d36ef7..00000000 --- a/app/Http/Livewire/Library/SearchByTagComponent.php +++ /dev/null @@ -1,51 +0,0 @@ - ['except' => ''], - ]; - - public function render() - { - $shouldBePublic = request() - ->route() - ->getName() !== 'library.table.lecturer'; - - return view('livewire.library.search-by-tag-component', [ - 'languages' => LibraryItem::query() - ->pluck('language_code') - ->unique() - ->sort() - ->map(fn ($item) => str($item) - ->before('_') - ->toString()) - ->values() - ->toArray(), - 'tags' => Tag::query() - ->with([ - 'libraryItems.libraries', - 'libraryItems.lecturer', - ]) - ->withCount([ - 'libraryItems', - ]) - ->where('type', 'library_item') - ->whereHas('libraryItems.libraries', - fn ($query) => $query->where('is_public', $shouldBePublic)) - ->orderByDesc('library_items_count') - ->orderBy('tags.id') - ->get(), - ]); - } -} diff --git a/app/Http/Livewire/Meetup/Embed/CountryMap.php b/app/Http/Livewire/Meetup/Embed/CountryMap.php deleted file mode 100644 index 9317eda9..00000000 --- a/app/Http/Livewire/Meetup/Embed/CountryMap.php +++ /dev/null @@ -1,46 +0,0 @@ - ['except' => false]]; - - public function render() - { - return view('livewire.meetup.embed.country-map', [ - 'markers' => Meetup::query() - ->with([ - 'city.country', - ]) - ->whereHas('city.country', - fn($query) => $query->where('countries.code', $this->country->code)) - ->get() - ->map(fn($meetup) => [ - 'id' => $meetup->id, - 'name' => $meetup->name, - 'coords' => [$meetup->city->latitude, $meetup->city->longitude], - 'url' => url()->route('meetup.landing', [ - 'country' => $meetup->city->country->code, - 'meetup' => $meetup, - ]), - ]), - ])->layout('layouts.app', [ - 'darkModeDisabled' => !$this->darkMode, - 'SEOData' => new SEOData( - title: __('Meetups'), - description: __('Bitcoiner Meetups are a great way to meet other Bitcoiners in your area. You can learn from each other, share ideas, and have fun!'), - image: asset('img/screenshot.png') - ), - ]); - } -} diff --git a/app/Http/Livewire/Meetup/Form/MeetupEventForm.php b/app/Http/Livewire/Meetup/Form/MeetupEventForm.php deleted file mode 100644 index cc2338b7..00000000 --- a/app/Http/Livewire/Meetup/Form/MeetupEventForm.php +++ /dev/null @@ -1,174 +0,0 @@ - ['except' => '']]; - - public function rules() - { - return [ - 'meetupEvent.meetup_id' => 'required', - 'meetupEvent.start' => 'required', - 'meetupEvent.location' => 'string|max:255|nullable', - 'meetupEvent.description' => 'string|nullable', - 'meetupEvent.link' => 'url|max:255|nullable', - - 'series' => 'array', - 'series.*.start' => 'required', - - 'recurring' => 'bool', - 'repetitions' => 'numeric|min:1', - ]; - } - - public function mount() - { - if (!$this->meetupEvent) { - $this->meetupEvent = new MeetupEvent( - [ - 'start' => now() - ->startOfDay() - ->addHours(17), - ] - ); - } elseif (!auth() - ->user() - ->can('update', $this->meetupEvent)) { - abort(403); - } - if (!$this->fromUrl) { - $this->fromUrl = url()->previous(); - } - } - - public function updatedMeetupEventStart($value) - { - $this->validateOnly('meetupEvent.start'); - if ($this->recurring) { - $this->updatedRecurring(true); - } - } - - public function updatedRecurring($value) - { - $this->validateOnly('recurring'); - $series = []; - if ($value && $this->meetupEvent->start) { - for ($i = 0; $i < $this->repetitions; $i++) { - $series[] = [ - 'start' => $this->meetupEvent->start->addMonths($i + 1) - ->toDateTimeString(), - ]; - } - } - $this->series = $series; - } - - public function updatedRepetitions($value) - { - $this->validateOnly('repetitions'); - if ($this->recurring) { - $this->updatedRecurring(true, $value); - } - } - - public function deleteMe() - { - $this->dialog() - ->confirm( - [ - 'title' => __('Delete event'), - 'description' => __('Are you sure you want to delete this event? This action cannot be undone.'), - 'icon' => 'warning', - 'accept' => [ - 'label' => __('Yes, delete'), - 'method' => 'deleteEvent', - ], - 'reject' => [ - 'label' => __('No, cancel'), - 'method' => 'cancel', - ], - ] - ); - } - - public function deleteEvent() - { - $this->meetupEvent->delete(); - - return to_route('meetup.table.meetupEvent', ['country' => $this->country]); - } - - public function submit() - { - $this->validate(); - if (!$this->meetupEvent->id) { - $hasAppointmentsOnThisDate = MeetupEvent::query() - ->where('meetup_id', $this->meetupEvent->meetup_id) - ->where('start', '>', Carbon::parse($this->meetupEvent->start) - ->startOfDay()) - ->where('start', '<', Carbon::parse($this->meetupEvent->start) - ->endOfDay()) - ->exists(); - if ($hasAppointmentsOnThisDate) { - $this->notification() - ->warning(__('There is already an event on this date. Please choose another date or delete the existing events.')); - - return; - } - } - - $this->meetupEvent->save(); - - if ($this->recurring) { - foreach ($this->series as $event) { - $hasAppointmentsOnThisDate = MeetupEvent::query() - ->where('meetup_id', $this->meetupEvent->meetup_id) - ->where('start', '>', Carbon::parse($event['start']) - ->startOfDay()) - ->where('start', '<', Carbon::parse($event['start']) - ->endOfDay()) - ->exists(); - - if ($hasAppointmentsOnThisDate) { - continue; - } - - $this->meetupEvent->replicate() - ->fill($event) - ->saveQuietly(); - } - } - - $this->notification() - ->success(__('Event saved successfully.')); - - return to_route('meetup.table.meetupEvent', ['country' => $this->country]); - } - - public function render() - { - return view('livewire.meetup.form.meetup-event-form'); - } -} diff --git a/app/Http/Livewire/Meetup/Form/MeetupForm.php b/app/Http/Livewire/Meetup/Form/MeetupForm.php deleted file mode 100644 index a2213908..00000000 --- a/app/Http/Livewire/Meetup/Form/MeetupForm.php +++ /dev/null @@ -1,93 +0,0 @@ - [ - 'except' => null, - ], - ]; - - public function rules() - { - return [ - 'image' => [Rule::requiredIf(!$this->meetup->id), 'nullable', 'mimes:jpeg,png,jpg,gif', 'max:10240'], - - 'meetup.city_id' => 'required', - 'meetup.name' => [ - 'required', - Rule::unique('meetups', 'name') - ->ignore($this->meetup), - ], - 'meetup.community' => 'required', - 'meetup.telegram_link' => 'string|nullable|required_without_all:meetup.webpage,meetup.nostr,meetup.twitter_username,meetup.matrix_group', - 'meetup.intro' => 'string|nullable', - 'meetup.webpage' => 'string|url|nullable|required_without_all:meetup.telegram_link,meetup.nostr,meetup.twitter_username,meetup.matrix_group', - 'meetup.nostr' => 'string|nullable|required_without_all:meetup.webpage,meetup.telegram_link,meetup.twitter_username,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.simplex' => 'string|nullable', - ]; - } - - public function mount() - { - if (!$this->meetup) { - $this->meetup = new Meetup([ - 'community' => 'einundzwanzig', - ]); - } elseif ( - !auth() - ->user() - ->can('update', $this->meetup) - ) { - abort(403); - } - if (!$this->fromUrl) { - $this->fromUrl = url()->previous(); - } - } - - public function submit() - { - $this->validate(); - $this->meetup->save(); - - if ($this->image) { - $this->meetup->addMedia($this->image) - ->usingFileName(md5($this->image->getClientOriginalName()) . '.' . $this->image->getClientOriginalExtension()) - ->toMediaCollection('logo'); - } - - auth() - ->user() - ->meetups() - ->syncWithoutDetaching($this->meetup->id); - - return redirect($this->fromUrl); - } - - public function render() - { - return view('livewire.meetup.form.meetup-form'); - } -} diff --git a/app/Http/Livewire/Meetup/LandingPage.php b/app/Http/Livewire/Meetup/LandingPage.php deleted file mode 100644 index 1377b63c..00000000 --- a/app/Http/Livewire/Meetup/LandingPage.php +++ /dev/null @@ -1,68 +0,0 @@ -meetup->load([ - 'media', - ]); - } - - public function render() - { - return view('livewire.meetup.landing-page', [ - 'meetupEvents' => MeetupEvent::query() - ->with([ - 'meetup.city.country', - ]) - ->where('meetup_events.meetup_id', $this->meetup->id) - ->where('meetup_events.start', '>=', now()->subDay()) - ->orderBy('start') - ->get(), - 'events' => MeetupEvent::query() - ->with([ - 'meetup.city.country', - ]) - ->where('meetup_events.meetup_id', $this->meetup->id) - ->where('meetup_events.start', '>=', now()->subDay()) - ->orderBy('start') - ->get() - ->map(fn ($event) => [ - 'id' => $event->id, - 'startDate' => $event->start, - 'endDate' => $event->start->addHours(1), - 'location' => $event->location, - 'description' => $event->description, - ]), - ]) - ->layout('layouts.guest', [ - 'SEOData' => new SEOData( - title: $this->meetup->name, - description: __('Bitcoiner Meetups are a great way to meet other Bitcoiners in your area. You can learn from each other, share ideas, and have fun!'), - image: $this->meetup->getFirstMediaUrl('logo'), - ), - ]); - } - - public function showEvent($id) - { - $this->activeEvent = $id; - } -} diff --git a/app/Http/Livewire/Meetup/LandingPageEvent.php b/app/Http/Livewire/Meetup/LandingPageEvent.php deleted file mode 100644 index 4087dc75..00000000 --- a/app/Http/Livewire/Meetup/LandingPageEvent.php +++ /dev/null @@ -1,209 +0,0 @@ - [ - 'required', - new UniqueAttendeeName($this->meetupEvent), - ], - ]; - } - - public function mount() - { - $this->meetupEvent->load('meetup.users'); - $this->meetup = $this->meetupEvent->meetup; - $this->name = auth()->check() ? auth()->user()->name : ''; - $this->checkShowUp(); - } - - public function checkShowUp() - { - $attendees = collect($this->meetupEvent->attendees); - $mightAttendees = collect($this->meetupEvent->might_attendees); - - if (auth()->check() && $attendees->contains(fn($value) => str($value)->contains('id_'.auth()->id()))) { - $this->name = str($attendees->filter(fn($value) => str($value)->contains('id_'.auth()->id())) - ->first()) - ->after('|') - ->toString(); - $this->willShowUp = true; - } - - if (!auth()->check() && $attendees->contains(fn($value) => str($value)->contains('anon_'.session()->getId()))) { - $this->name = str($attendees->filter(fn($value) => str($value)->contains('anon_'.session()->getId())) - ->first()) - ->after('|') - ->toString(); - $this->willShowUp = true; - } - - if (auth()->check() && $mightAttendees->contains(fn($value) => str($value)->contains('id_'.auth()->id()))) { - $this->name = str($mightAttendees->filter(fn($value) => str($value)->contains('id_'.auth()->id())) - ->first()) - ->after('|') - ->toString(); - $this->perhapsShowUp = true; - } - - if (!auth()->check() && $mightAttendees->contains(fn($value - ) => str($value)->contains('anon_'.session()->getId()))) { - $this->name = str($mightAttendees->filter(fn($value) => str($value)->contains('anon_'.session()->getId())) - ->first()) - ->after('|') - ->toString(); - $this->perhapsShowUp = true; - } - - $this->attendees = $this->mapAttendees($attendees); - $this->mightAttendees = $this->mapAttendees($mightAttendees); - } - - private function mapAttendees($collection) { - return $collection->map(function ($value) { - if (str($value)->contains('anon_')) { - $id = -1; - } else { - $id = str($value) - ->before('|') - ->after('id_') - ->toString(); - } - - return [ - 'id' => $id, - 'user' => $id > 0 ? User::withoutEvents(static fn() => User::query() - ->select([ - 'id', - 'name', - 'profile_photo_path', - ]) - ->find($id) - ?->append('profile_photo_url') - ->toArray()) - : null, - 'name' => str($value) - ->after('|') - ->toString(), - ]; - }) - ->toArray(); - } - - public function cannotCome() - { - $attendees = collect($this->meetupEvent->attendees); - $mightAttendees = collect($this->meetupEvent->might_attendees); - - if (auth()->check() && $attendees->contains(fn($value) => str($value)->contains('id_'.auth()->id()))) { - $attendees = $attendees->filter(fn($value) => !str($value)->contains('id_'.auth()->id())); - $this->willShowUp = false; - } - - if (!auth()->check() && $attendees->contains(fn($value) => str($value)->contains('anon_'.session()->getId()))) { - $attendees = $attendees->filter(fn($value) => !str($value)->contains('anon_'.session()->getId())); - $this->willShowUp = false; - } - - if (auth()->check() && $mightAttendees->contains(fn($value) => str($value)->contains('id_'.auth()->id()))) { - $mightAttendees = $mightAttendees->filter(fn($value) => !str($value)->contains('id_'.auth()->id())); - $this->perhapsShowUp = false; - } - - if (!auth()->check() && $mightAttendees->contains(fn($value - ) => str($value)->contains('anon_'.session()->getId()))) { - $mightAttendees = $mightAttendees->filter(fn($value) => !str($value)->contains('anon_'.session()->getId())); - $this->perhapsShowUp = false; - } - - $this->meetupEvent->update([ - 'attendees' => $attendees->toArray(), - 'might_attendees' => $mightAttendees->toArray(), - ]); - - $this->checkShowUp(); - } - - public function attend() - { - $this->validate(); - $attendees = collect($this->meetupEvent->attendees); - - if (auth()->check() && !$attendees->contains('id_'.auth()->id().'|'.$this->name)) { - $attendees->push('id_'.auth()->id().'|'.$this->name); - $this->willShowUp = true; - } - - if (!auth()->check() && !$attendees->contains('anon_'.session()->getId().'|'.$this->name)) { - $attendees->push('anon_'.session()->getId().'|'.$this->name); - $this->willShowUp = true; - } - - $this->meetupEvent->update([ - 'attendees' => $attendees->toArray(), - ]); - - $this->checkShowUp(); - } - - public function mightAttend() - { - $this->validate(); - $mightAttendees = collect($this->meetupEvent->might_attendees); - - if (auth()->check() && !$mightAttendees->contains('id_'.auth()->id().'|'.$this->name)) { - $mightAttendees->push('id_'.auth()->id().'|'.$this->name); - $this->perhapsShowUp = true; - } - - if (!auth()->check() && !$mightAttendees->contains('anon_'.session()->getId().'|'.$this->name)) { - $mightAttendees->push('anon_'.session()->getId().'|'.$this->name); - $this->perhapsShowUp = true; - } - - $this->meetupEvent->update([ - 'might_attendees' => $mightAttendees->toArray(), - ]); - - $this->checkShowUp(); - } - - public function render() - { - return view('livewire.meetup.landing-page-event')->layout('layouts.guest', [ - 'SEOData' => new SEOData( - title: $this->meetupEvent->start->asDateTime().' - '.$this->meetup->name, - description: __('Here you can confirm your participation and find more information about the Meetup.').' - '.$this->meetupEvent->description, - image: $this->meetup->getFirstMediaUrl('logo'), - ), - ]); - } -} diff --git a/app/Http/Livewire/Meetup/MeetupEventTable.php b/app/Http/Livewire/Meetup/MeetupEventTable.php deleted file mode 100644 index d6ba6bea..00000000 --- a/app/Http/Livewire/Meetup/MeetupEventTable.php +++ /dev/null @@ -1,97 +0,0 @@ -year) { - $this->year = now()->year; - } - } - - public function render() - { - return view('livewire.meetup.meetup-event-table', [ - 'markers' => MeetupEvent::query() - ->with([ - 'meetup.city.country', - ]) - ->where('meetup_events.start', '>=', now()->subDay()) - ->whereHas('meetup.city.country', - fn($query) => $query->where('countries.code', $this->country->code)) - ->get() - ->map(fn($event) => [ - 'id' => $event->id, - 'name' => $event->meetup->name . ': ' . $event->location, - 'coords' => [$event->meetup->city->latitude, $event->meetup->city->longitude], - ]), - 'events' => MeetupEvent::query() - ->with([ - 'meetup.city.country', - ]) - ->where('meetup_events.start', '>=', now()->subDay()) - ->whereHas('meetup.city.country', - fn($query) => $query->where('countries.code', $this->country->code)) - ->get() - ->map(fn($event) => [ - 'id' => $event->id, - 'startDate' => $event->start, - 'endDate' => $event->start->addHours(1), - 'location' => $event->location, - 'description' => $event->description, - ]), - ])->layout('layouts.app', [ - 'SEOData' => new SEOData( - title: __('Meetup dates'), - description: __('List of all meetup dates'), - image: asset('img/screenshot.png') - ), - ]); - } - - public function filterByMarker($id) - { - return to_route('meetup.table.meetupEvent', [ - '#table', - 'country' => $this->country->code, - 'year' => $this->year, - 'meetup_events' => [ - 'filters' => [ - 'byid' => $id, - ], - ], - ]); - } - - public function popover($content, $ids) - { - return to_route('meetup.table.meetupEvent', [ - '#table', - 'year' => $this->year, - 'country' => $this->country->code, - 'meetup_events' => [ - 'filters' => [ - 'byid' => $ids, - ], - ], - ]); - } -} diff --git a/app/Http/Livewire/Meetup/MeetupTable.php b/app/Http/Livewire/Meetup/MeetupTable.php deleted file mode 100644 index bc6e8c1c..00000000 --- a/app/Http/Livewire/Meetup/MeetupTable.php +++ /dev/null @@ -1,54 +0,0 @@ -find($id); - - return to_route('meetup.landing', [ - 'country' => $meetup->city->country->code, - 'meetup' => $meetup, - ]); - } - - public function render() - { - // let markers = [{name: 'VAK', coords: [50.0091294, 9.0371812], status: 'closed', offsets: [0, 2]}]; - - return view('livewire.meetup.meetup-table', [ - 'markers' => Meetup::query() - ->where('visible_on_map', true) - ->with([ - 'city.country', - ]) - ->whereHas('city.country', - fn($query) => $query->where('countries.code', $this->country->code)) - ->get() - ->map(fn($meetup) => [ - 'id' => $meetup->id, - 'name' => $meetup->name, - 'coords' => [$meetup->city->latitude, $meetup->city->longitude], - ]), - ])->layout('layouts.app', [ - 'SEOData' => new SEOData( - title: __('Meetups'), - description: __('Bitcoiner Meetups are a great way to meet other Bitcoiners in your area. You can learn from each other, share ideas, and have fun!'), - image: asset('img/screenshot.png') - ), - ]); - } -} diff --git a/app/Http/Livewire/Meetup/WorldMap.php b/app/Http/Livewire/Meetup/WorldMap.php deleted file mode 100644 index 73637e53..00000000 --- a/app/Http/Livewire/Meetup/WorldMap.php +++ /dev/null @@ -1,46 +0,0 @@ -find($id); - - return to_route('meetup.landing', [ - 'country' => $meetup->city->country->code, - 'meetup' => $meetup, - ]); - } - - public function render() - { - return view('livewire.meetup.world-map', [ - 'allMarkers' => Meetup::query() - ->where('visible_on_map', true) - ->with([ - 'city.country', - ]) - ->get() - ->map(fn($meetup) => [ - 'id' => $meetup->id, - 'name' => $meetup->name, - 'coords' => [$meetup->city->latitude, $meetup->city->longitude], - ]), - ])->layout('layouts.app', [ - 'SEOData' => new SEOData( - title: __('World map of meetups'), - image: asset('img/screenshot.png') - ), - ]); - } -} diff --git a/app/Http/Livewire/News/ArticleOverview.php b/app/Http/Livewire/News/ArticleOverview.php deleted file mode 100644 index 1e9cc5d7..00000000 --- a/app/Http/Livewire/News/ArticleOverview.php +++ /dev/null @@ -1,103 +0,0 @@ - ['except' => ''], - ]; - - public function loadMore() - { - $this->perPage += 9; - } - - public function nostr($id) - { - $libraryItem = LibraryItem::query() - ->with([ - 'lecturer', - ]) - ->find($id); - $libraryItem->setStatus('published'); - $libraryItemName = $libraryItem->name; - if ($libraryItem->lecturer->nostr) { - $libraryItemName .= ' von @'.$libraryItem->lecturer->nostr; - } else { - $libraryItemName .= ' von '.$libraryItem->lecturer->name; - } - $text = sprintf("Ein neuer News-Artikel wurde verfasst:\n\n%s\n\n%s\n\n#Bitcoin #News #Einundzwanzig #gesundesgeld #einundzwanzig_portal_%s", - $libraryItemName, - url()->route('article.view', - ['libraryItem' => $libraryItem->slug]), - str($libraryItem->slug)->replace('-', '_') - ); - $result = $this->publishOnNostr($libraryItem, $text); - if ($result['success']) { - $this->notification() - ->success(title: __('Published on Nostr'), description: $result['output']); - } else { - $this->notification() - ->error(title: __('Failed'), - description: 'Exit Code: '.$result['exitCode'].' Reason: '.$result['errorOutput']); - } - } - - public function approve($id) - { - $libraryItem = LibraryItem::find($id); - $libraryItem->approved = true; - $libraryItem->save(); - - $this->notification() - ->success(__('Article approved')); - - $this->emit('$refresh'); - } - - public function resetFiltering() - { - return to_route('article.overview'); - } - - public function render() - { - return view('livewire.news.article-overview', [ - 'libraryItems' => LibraryItem::query() - ->with([ - 'createdBy.roles', - 'lecturer', - 'tags', - ]) - ->when( - isset($this->filters['author']), - fn($query) => $query->whereHas('lecturer', - fn($query) => $query->where('lecturers.slug', - $this->filters['author']))) - ->where('type', 'markdown_article') - ->where('news', true) - ->orderByDesc('created_at') - ->paginate($this->perPage), - ])->layout('layouts.app', [ - 'SEOData' => new SEOData( - title: __('News'), - description: __('Here we post important news that is relevant for everyone.'), - image: asset('img/einundzwanzig-news-colored.png'), - ), - ]); - } -} diff --git a/app/Http/Livewire/News/AuthorsOverview.php b/app/Http/Livewire/News/AuthorsOverview.php deleted file mode 100644 index beb74553..00000000 --- a/app/Http/Livewire/News/AuthorsOverview.php +++ /dev/null @@ -1,31 +0,0 @@ - Lecturer::query() - ->whereHas('libraryItems', function ($query) { - $query->where('library_items.news', true); - }) - ->withCount([ - 'libraryItems' => fn($query) => $query->where('library_items.news', true), - ]) - ->orderByDesc('library_items_count') - ->get(), - ])->layout('layouts.app', [ - 'SEOData' => new SEOData( - title: __('News articles writer'), - description: __('Click on any of the authors to see their articles.'), - image: asset('img/einundzwanzig-news-colored.png'), - ), - ]); - } -} diff --git a/app/Http/Livewire/News/Form/NewsArticleForm.php b/app/Http/Livewire/News/Form/NewsArticleForm.php deleted file mode 100644 index 2261bbc3..00000000 --- a/app/Http/Livewire/News/Form/NewsArticleForm.php +++ /dev/null @@ -1,134 +0,0 @@ - ['except' => ''], 'type' => ['except' => '']]; - - public function rules() - { - return [ - 'image' => [Rule::requiredIf(!$this->libraryItem->id), 'nullable', 'mimes:jpeg,png,jpg,gif', 'max:10240'], - - 'selectedTags' => 'array|min:1', - - 'libraryItem.lecturer_id' => 'required', - 'libraryItem.name' => 'required', - 'libraryItem.type' => 'required', - 'libraryItem.language_code' => 'required', - 'libraryItem.value' => 'required', - 'libraryItem.value_to_be_paid' => [Rule::requiredIf($this->libraryItem->sats > 0), 'nullable', 'string',], - 'libraryItem.sats' => [ - Rule::requiredIf($this->libraryItem->sats > 0), 'nullable', 'numeric', - ], - 'libraryItem.subtitle' => 'string|nullable', - 'libraryItem.excerpt' => 'required', - 'libraryItem.main_image_caption' => 'string|nullable', - 'libraryItem.read_time' => 'numeric|nullable', - 'libraryItem.approved' => 'boolean', - 'libraryItem.news' => 'boolean', - ]; - } - - public function mount() - { - if ($this->type === 'paid') { - $this->paid = true; - } - if (!$this->libraryItem) { - $this->libraryItem = new LibraryItem([ - 'type' => 'markdown_article', - 'value' => '', - 'value_to_be_paid' => '', - 'read_time' => 1, - 'sats' => $this->paid ? 21 : null, - 'news' => true, - 'language_code' => 'de', - 'approved' => false, - ]); - $this->selectedTags[] = 'News'; - } else { - $this->selectedTags = $this->libraryItem->tags() - ->where('type', 'library_item') - ->get() - ->map(fn($tag) => $tag->name) - ->toArray(); - } - if (!$this->fromUrl) { - $this->fromUrl = url()->previous(); - } - if (!$this->libraryItem->value_to_be_paid) { - $this->libraryItem->value_to_be_paid = ''; - } - } - - public function updatedImages($value) - { - $clonedImages = collect($this->imagesCloned); - $clonedImages = $clonedImages->push($value); - $this->imagesCloned = $clonedImages->toArray(); - - $temporaryUrls = collect($this->temporaryUrls); - $temporaryUrls = $temporaryUrls->push($value->temporaryUrl()); - $this->temporaryUrls = $temporaryUrls->toArray(); - } - - public function save() - { - $this->validate(); - $this->libraryItem->save(); - - $this->libraryItem->syncTagsWithType( - $this->selectedTags, - 'library_item' - ); - - if ($this->image) { - $this->libraryItem->addMedia($this->image) - ->usingFileName(md5($this->image->getClientOriginalName()).'.'.$this->image->getClientOriginalExtension()) - ->toMediaCollection('main'); - } - - return redirect($this->fromUrl); - } - - public function delete() - { - $this->libraryItem->delete(); - - return redirect($this->fromUrl); - } - - public function render() - { - return view('livewire.news.form.news-article-form'); - } -} diff --git a/app/Http/Livewire/News/InternArticleView.php b/app/Http/Livewire/News/InternArticleView.php deleted file mode 100644 index 4d9b17ce..00000000 --- a/app/Http/Livewire/News/InternArticleView.php +++ /dev/null @@ -1,142 +0,0 @@ -libraryItem->load([ - 'libraries', - ]); - if ($this->libraryItem->libraries->where('is_public', false) - ->count() > 0 && !auth()->check()) { - abort(403, __('Sorry! You are not authorized to perform this action.')); - } - if (auth()->check() && auth() - ->user() - ->paidArticles() - ->where('library_item_id', $this->libraryItem->id) - ->count() > 0) { - $this->invoicePaid = true; - } - if ($this->libraryItem->lecturer->paynym) { - $this->payNymQrCode = base64_encode(QrCode::format('png') - ->size(300) - ->merge($this->libraryItem->lecturer->getFirstMedia('avatar') - ? str( - $this->libraryItem - ->lecturer - ->getFirstMediaPath('avatar')) - ->replace('/home/einundzwanzig/portal.einundzwanzig.space', - '' - ) - : '/public/img/einundzwanzig.png', - .3) - ->errorCorrection('H') - ->generate($this->libraryItem->lecturer->paynym)); - } - } - - public function pay() - { - try { - $invoice = $this->createInvoice( - sats: $this->libraryItem->sats, - memo: 'Payment for: "'.$this->libraryItem->slug.'" on Einundzwanzig Portal.', - lnbits: $this->libraryItem->createdBy->lnbits, - ); - } catch (\Exception $e) { - $this->notification() - ->error('LNBits error: '.$e->getMessage()); - - return; - } - session('payment_hash_article_'.$this->libraryItem->id, $invoice['payment_hash']); - $this->paymentHash = $invoice['payment_hash']; - $this->qrCode = base64_encode(QrCode::format('png') - ->size(300) - ->merge($this->libraryItem->lecturer->getFirstMedia('avatar') - ? str( - $this->libraryItem - ->lecturer - ->getFirstMediaPath('avatar')) - ->replace('/home/einundzwanzig/portal.einundzwanzig.space', - '' - ) - : '/public/img/einundzwanzig.png', - .3) - ->errorCorrection('H') - ->generate($invoice['payment_request'])); - $this->invoice = $invoice['payment_request']; - $this->checkid = $invoice['checking_id']; - } - - public function checkPaymentHash() - { - try { - $invoice = $this->check($this->checkid ?? $this->checkThisPaymentHash, - $this->libraryItem->createdBy->lnbits); - } catch (\Exception $e) { - $this->notification() - ->error('LNBits error: '.$e->getMessage()); - - return; - } - if (isset($invoice['paid']) && $invoice['paid']) { - $this->invoicePaid = true; - if (auth()->check()) { - auth() - ->user() - ->paidArticles() - ->syncWithoutDetaching($this->libraryItem->id); - } - } else { - Log::error(json_encode($invoice, JSON_THROW_ON_ERROR)); - } - } - - public function render() - { - return view('livewire.news.intern-article-view')->layout('layouts.app', [ - 'SEOData' => new SEOData( - title: $this->libraryItem->name, - description: strip_tags($this->libraryItem->excerpt) ?? __('Here we post important news that is relevant for everyone.'), - author: $this->libraryItem->lecturer->name, - image: $this->libraryItem->getFirstMedia('main') - ? $this->libraryItem->getFirstMediaUrl('main', 'seo') - : url()->route('imgPublic', [ - 'path' => 'img/einundzwanzig-wallpaper-benrath.png', 'h' => 630, 'w' => 1200, 'fit' => 'crop' - ]), - published_time: Carbon::parse($this->libraryItem->created_at), - type: 'article', - ), - ]); - } -} diff --git a/app/Http/Livewire/Nostr/PlebsOverview.php b/app/Http/Livewire/Nostr/PlebsOverview.php deleted file mode 100644 index b499fb99..00000000 --- a/app/Http/Livewire/Nostr/PlebsOverview.php +++ /dev/null @@ -1,38 +0,0 @@ -plebsNpubs = User::query() - ->select([ - 'email', - 'public_key', - 'lightning_address', - 'lnurl', - 'node_id', - 'paynym', - 'lnbits', - 'nostr', - 'id', - ]) - ->whereNotNull('nostr') - ->orderByDesc('id') - ->get() - ->unique('nostr') - ->pluck('nostr') - ->toArray(); - } - - public function render() - { - return view('livewire.nostr.plebs-overview'); - } -} diff --git a/app/Http/Livewire/Nostr/Start.php b/app/Http/Livewire/Nostr/Start.php new file mode 100644 index 00000000..17e29348 --- /dev/null +++ b/app/Http/Livewire/Nostr/Start.php @@ -0,0 +1,13 @@ + 'https://legend.lnbits.com', - 'wallet_id' => '', - 'read_key' => '', - ]; - - public function rules() - { - return [ - 'settings.url' => 'required|url', - 'settings.wallet_id' => 'required', - 'settings.read_key' => 'required', - ]; - } - - public function mount() - { - if (auth()->user()->lnbits) { - $this->settings = auth()->user()->lnbits; - } - } - - public function save() - { - $this->validate(); - if ($this->checkLnbitsSettings($this->settings['read_key'], $this->settings['url'], $this->settings['wallet_id']) === false) { - $this->notification() - ->error(__('LNBits settings are not valid!')); - - return; - } - $user = auth()->user(); - $user->lnbits = $this->settings; - $user->save(); - - $this->notification() - ->success(__('LNBits settings saved successfully!')); - } - - public function render() - { - return view('livewire.profile.l-n-bits'); - } -} diff --git a/app/Http/Livewire/Profile/Meetups.php b/app/Http/Livewire/Profile/Meetups.php deleted file mode 100644 index 9ccf4456..00000000 --- a/app/Http/Livewire/Profile/Meetups.php +++ /dev/null @@ -1,135 +0,0 @@ - ['except' => '']]; - - public function rules() - { - return [ - 'search' => 'string', - ]; - } - - public function mount() - { - if (!auth()->user()) { - return to_route('auth.login'); - } - - $this->meetups = Meetup::query() - ->with([ - 'city', - ]) - ->where('name', 'ilike', '%'.$this->search.'%') - ->orderBy('name') - ->limit(10) - ->get(); - $this->myMeetups = auth() - ->user() - ->meetups() - ->pluck('meetup_id') - ->toArray(); - $this->myMeetupNames = auth() - ->user() - ->meetups() - ->with([ - 'city.country' - ]) - ->select('meetups.id', 'meetups.city_id', 'meetups.name', 'meetups.slug') - ->get() - ->map(fn($meetup) => [ - 'id' => $meetup->id, - 'name' => $meetup->name, - 'link' => route('meetup.landing', [ - 'country' => $meetup->city->country->code, - 'meetup' => $meetup, - ]) - ]) - ->toArray(); - if (count($this->myMeetups) > 0) { - $this->hasMeetups = true; - } - if (!$this->fromUrl) { - $this->fromUrl = url()->previous(); - } - } - - public function next() - { - return redirect($this->fromUrl); - } - - public function updatedSearch($value) - { - $this->meetups = Meetup::query() - ->with([ - 'city', - ]) - ->where('name', 'ilike', '%'.$value.'%') - ->orderBy('name') - ->limit(10) - ->get(); - } - - public function signUpForMeetup($id) - { - $user = auth()->user(); - $user->meetups() - ->toggle($id); - $this->myMeetups = auth() - ->user() - ->meetups() - ->pluck('meetup_id') - ->toArray(); - if (count($this->myMeetups) > 0) { - $this->hasMeetups = true; - } else { - $this->hasMeetups = false; - } - $this->myMeetupNames = auth() - ->user() - ->meetups() - ->with([ - 'city.country' - ]) - ->select('meetups.id', 'meetups.city_id', 'meetups.name', 'meetups.slug') - ->get() - ->map(fn($meetup) => [ - 'id' => $meetup->id, - 'name' => $meetup->name, - 'link' => route('meetup.landing', [ - 'country' => $meetup->city->country->code, - 'meetup' => $meetup, - ]) - ]) - ->toArray(); - $this->notification() - ->success(__('Saved.')); - } - - public function render() - { - return view('livewire.profile.meetups'); - } -} diff --git a/app/Http/Livewire/ProjectProposal/Form/ProjectProposalForm.php b/app/Http/Livewire/ProjectProposal/Form/ProjectProposalForm.php deleted file mode 100644 index 6014d063..00000000 --- a/app/Http/Livewire/ProjectProposal/Form/ProjectProposalForm.php +++ /dev/null @@ -1,73 +0,0 @@ - ['except' => ''], - ]; - - public function rules() - { - return [ - 'image' => [ - 'nullable', 'mimes:jpeg,png,jpg,gif', 'max:10240' - ], - - 'projectProposal.user_id' => 'required', - 'projectProposal.name' => 'required', - 'projectProposal.support_in_sats' => 'required|numeric', - 'projectProposal.description' => 'required', - ]; - } - - public function mount() - { - if (!$this->projectProposal) { - $this->projectProposal = new ProjectProposal([ - 'user_id' => auth()->id(), - 'description' => '', - ]); - } - if (!$this->fromUrl) { - $this->fromUrl = url()->previous(); - } - } - - public function save() - { - $this->validate(); - $this->projectProposal->save(); - - if ($this->image) { - $this->projectProposal->addMedia($this->image) - ->usingFileName(md5($this->image->getClientOriginalName()).'.'.$this->image->getClientOriginalExtension()) - ->toMediaCollection('main'); - } - - return redirect($this->fromUrl); - } - - public function render() - { - return view('livewire.project-proposal.form.project-proposal-form', [ - - ]); - } -} diff --git a/app/Http/Livewire/ProjectProposal/ProjectProposalTable.php b/app/Http/Livewire/ProjectProposal/ProjectProposalTable.php deleted file mode 100644 index 7426a22d..00000000 --- a/app/Http/Livewire/ProjectProposal/ProjectProposalTable.php +++ /dev/null @@ -1,23 +0,0 @@ -layout('layouts.app', [ - 'SEOData' => new SEOData( - title: __('Project Proposal'), - description: __('Submit a project proposal and let the community vote on it through the elected voters. All other community members can also vote.'), - image: asset('img/voting.jpg') - ), - ]); - } -} diff --git a/app/Http/Livewire/ProjectProposal/ProjectProposalVoting.php b/app/Http/Livewire/ProjectProposal/ProjectProposalVoting.php deleted file mode 100644 index 57c5b4ca..00000000 --- a/app/Http/Livewire/ProjectProposal/ProjectProposalVoting.php +++ /dev/null @@ -1,115 +0,0 @@ - ['except' => ''], - ]; - - public function rules() - { - return [ - 'vote.user_id' => 'required', - 'vote.project_proposal_id' => 'required', - 'vote.value' => 'required|boolean', - 'vote.reason' => [ - Rule::requiredIf(!$this->vote->value), - ] - ]; - } - - public function mount() - { - $this->projectProposal->load('votes'); - $vote = Vote::query() - ->where('user_id', auth()->id()) - ->where('project_proposal_id', $this->projectProposal->id) - ->first(); - if ($vote) { - $this->vote = $vote; - } else { - $this->vote = new Vote(); - $this->vote->user_id = auth()->id(); - $this->vote->project_proposal_id = $this->projectProposal->id; - $this->vote->value = false; - } - if (!$this->fromUrl) { - $this->fromUrl = url()->previous(); - } - } - - public function yes() - { - $this->vote->value = true; - $this->vote->save(); - - return to_route('voting.projectFunding', - ['projectProposal' => $this->projectProposal, 'fromUrl' => $this->fromUrl]); - } - - public function no() - { - $this->validate(); - - $this->vote->value = false; - $this->vote->save(); - - return to_route('voting.projectFunding', - ['projectProposal' => $this->projectProposal, 'fromUrl' => $this->fromUrl]); - } - - public function render() - { - return view('livewire.project-proposal.project-proposal-voting', [ - 'entitledVoters' => User::query() - ->with([ - 'votes' => fn($query) => $query->where('project_proposal_id', - $this->projectProposal->id) - ]) - ->withCount([ - 'votes' => fn($query) => $query->where('project_proposal_id', - $this->projectProposal->id) - ]) - ->whereHas('roles', function ($query) { - return $query->where('roles.name', 'entitled-voter'); - }) - ->orderByDesc('votes_count') - ->get(), - 'otherVoters' => User::query() - ->with([ - 'votes' => fn($query) => $query->where('project_proposal_id', - $this->projectProposal->id) - ]) - ->withCount([ - 'votes' => fn($query) => $query->where('project_proposal_id', - $this->projectProposal->id) - ]) - ->whereDoesntHave('roles', function ($query) { - return $query->where('roles.name', 'entitled-voter'); - }) - ->orderByDesc('votes_count') - ->get(), - ])->layout('layouts.app', [ - 'SEOData' => new SEOData( - title: __('Project Proposal'), - description: __('Submit a project proposal and let the community vote on it through the elected voters. All other community members can also vote.'), - image: asset('img/voting.jpg') - ), - ]); - } -} diff --git a/app/Http/Livewire/School/CityTable.php b/app/Http/Livewire/School/CityTable.php deleted file mode 100644 index 5e6ab2de..00000000 --- a/app/Http/Livewire/School/CityTable.php +++ /dev/null @@ -1,23 +0,0 @@ -layout('layouts.app', [ - 'SEOData' => new SEOData( - title: __('Courses'), - description: __('Choose your city, search for courses in the surrounding area and select a topic that suits you.'), - image: asset('img/screenshot.png') - ), - ]); - } -} diff --git a/app/Http/Livewire/School/CourseTable.php b/app/Http/Livewire/School/CourseTable.php deleted file mode 100644 index 2705e8a6..00000000 --- a/app/Http/Livewire/School/CourseTable.php +++ /dev/null @@ -1,23 +0,0 @@ -layout('layouts.app', [ - 'SEOData' => new SEOData( - title: __('Courses'), - description: __('Choose your city, search for courses in the surrounding area and select a topic that suits you.'), - image: asset('img/screenshot.png') - ), - ]); - } -} diff --git a/app/Http/Livewire/School/EventTable.php b/app/Http/Livewire/School/EventTable.php deleted file mode 100644 index 22be0b6e..00000000 --- a/app/Http/Livewire/School/EventTable.php +++ /dev/null @@ -1,94 +0,0 @@ -year) { - $this->year = now()->year; - } - } - - public function render() - { - return view('livewire.school.event-table', [ - 'markers' => CourseEvent::query() - ->with([ - 'course', - 'venue.city.country', - ]) - ->where('from', '>=', now()) - ->where(fn ($query) => $query - ->whereHas('venue.city.country', - fn ($query) => $query->where('countries.code', $this->country->code)) - ) - ->get() - ->map(fn ($event) => [ - 'id' => $event->id, - 'name' => $event->course->name, - 'coords' => [$event->venue->city->latitude, $event->venue->city->longitude], - ]), - 'events' => CourseEvent::query() - ->with([ - 'course', - 'venue.city.country', - ]) - ->where('from', '>=', now()) - ->get() - ->map(fn ($event) => [ - 'id' => $event->id, - 'startDate' => $event->from, - 'endDate' => $event->to, - 'location' => $event->course->name, - 'description' => $event->venue->name, - ]), - ])->layout('layouts.app', [ - 'SEOData' => new SEOData( - title: __('Dates'), - description: __('Dates for courses about Bitcoin.'), - image: asset('img/screenshot.png') - ), - ]); - } - - public function filterByMarker($id) - { - return to_route('school.table.event', [ - '#table', - 'country' => $this->country->code, - 'year' => $this->year, - 'course_events' => [ - 'filters' => [ - 'byid' => $id, - ], - ], - ]); - } - - public function popover($content, $ids) - { - return to_route('school.table.event', [ - '#table', - 'country' => $this->country->code, - 'year' => $this->year, - 'course_events' => [ - 'filters' => [ - 'byid' => $ids, - ], - ], - ]); - } -} diff --git a/app/Http/Livewire/School/Form/CourseEventForm.php b/app/Http/Livewire/School/Form/CourseEventForm.php deleted file mode 100644 index 57c5ac98..00000000 --- a/app/Http/Livewire/School/Form/CourseEventForm.php +++ /dev/null @@ -1,67 +0,0 @@ - [ - 'except' => null, - ], - ]; - - public function rules() - { - return [ - 'courseEvent.course_id' => 'required', - 'courseEvent.venue_id' => 'required', - 'courseEvent.from' => 'required', - 'courseEvent.to' => 'required', - 'courseEvent.link' => 'required', - ]; - } - - public function mount() - { - if (!$this->courseEvent) { - $this->courseEvent = new CourseEvent([]); - } elseif ( - !auth() - ->user() - ->can('update', $this->courseEvent) - ) { - abort(403); - } - if (!$this->fromUrl) { - $this->fromUrl = url()->previous(); - } - } - - public function submit() - { - $this->validate(); - $this->courseEvent->save(); - - return redirect($this->fromUrl); - } - - public function render() - { - return view('livewire.school.form.course-event-form'); - } -} diff --git a/app/Http/Livewire/School/Form/CourseForm.php b/app/Http/Livewire/School/Form/CourseForm.php deleted file mode 100644 index 3bd8118b..00000000 --- a/app/Http/Livewire/School/Form/CourseForm.php +++ /dev/null @@ -1,109 +0,0 @@ - [ - 'except' => null, - ], - ]; - - public function rules() - { - return [ - 'image' => [Rule::requiredIf(!$this->course->id), 'nullable', 'mimes:jpeg,png,jpg,gif', 'max:10240'], - - 'course.lecturer_id' => 'required', - 'course.name' => [ - 'required', - Rule::unique('courses', 'name') - ->ignore($this->course), - ], - 'course.description' => 'string|nullable', - ]; - } - - public function mount() - { - if (!$this->course) { - $this->course = new Course([ - 'description' => '', - ]); - } elseif ( - !auth() - ->user() - ->can('update', $this->course) - ) { - abort(403); - } else { - $this->selectedTags = $this->course->tags() - ->where('type', 'course') - ->get() - ->map(fn($tag) => $tag->name) - ->toArray(); - } - if (!$this->fromUrl) { - $this->fromUrl = url()->previous(); - } - } - - public function submit() - { - $this->validate(); - $this->course->save(); - - $this->course->syncTagsWithType( - $this->selectedTags, - 'course' - ); - - if ($this->image) { - $this->course->addMedia($this->image) - ->usingFileName(md5($this->image->getClientOriginalName()).'.'.$this->image->getClientOriginalExtension()) - ->toMediaCollection('logo'); - } - - return redirect($this->fromUrl); - } - - public function selectTag($name) - { - $selectedTags = collect($this->selectedTags); - if ($selectedTags->contains($name)) { - $selectedTags = $selectedTags->filter(fn($tag) => $tag !== $name); - } else { - $selectedTags->push($name); - } - $this->selectedTags = $selectedTags->values() - ->toArray(); - } - - public function render() - { - return view('livewire.school.form.course-form', [ - 'tags' => Tag::query() - ->where('type', 'course') - ->get(), - ]); - } -} diff --git a/app/Http/Livewire/School/LecturerLandingPage.php b/app/Http/Livewire/School/LecturerLandingPage.php deleted file mode 100644 index 5afbcf2a..00000000 --- a/app/Http/Livewire/School/LecturerLandingPage.php +++ /dev/null @@ -1,67 +0,0 @@ - CourseEvent::query() - ->with([ - 'venue.city', - 'course.tags', - ]) - ->where('from', '>=', now()) - ->whereHas('course', function ($query) { - $query->where('lecturer_id', $this->lecturer->id); - }) - ->orderBy('from') - ->get(), - 'events' => CourseEvent::query() - ->with([ - 'venue', - 'course', - ]) - ->where('from', '>=', now()) - ->whereHas('course', function ($query) { - $query->where('lecturer_id', $this->lecturer->id); - }) - ->orderBy('from') - ->get() - ->map(fn($event) => [ - 'id' => $event->id, - 'startDate' => $event->from, - 'endDate' => $event->to, - 'location' => $event->course->name, - 'description' => $event->venue->name, - ]), - ]) - ->layout('layouts.guest', [ - 'SEOData' => new SEOData( - title: $this->lecturer->name, - description: $this->lecturer->intro ?? __('This lecturer has not yet written an introduction.'), - image: $this->lecturer->getFirstMediaUrl('avatar'), - ), - ]); - } - - public function showEvent($id) - { - $this->activeEvent = $id; - } -} diff --git a/app/Http/Livewire/School/LecturerTable.php b/app/Http/Livewire/School/LecturerTable.php deleted file mode 100644 index caf31048..00000000 --- a/app/Http/Livewire/School/LecturerTable.php +++ /dev/null @@ -1,23 +0,0 @@ -layout('layouts.app', [ - 'SEOData' => new SEOData( - title: __('Lecturers'), - description: __('Lecturers in the surrounding area.'), - image: asset('img/screenshot.png') - ), - ]); - } -} diff --git a/app/Http/Livewire/School/SearchByTagComponent.php b/app/Http/Livewire/School/SearchByTagComponent.php deleted file mode 100644 index 5e1ce65e..00000000 --- a/app/Http/Livewire/School/SearchByTagComponent.php +++ /dev/null @@ -1,32 +0,0 @@ - Tag::query() - ->where('type', 'course') - ->with([ - 'courses.lecturer', - ]) - ->withCount([ - 'courses', - ]) - ->get(), - ]); - } -} diff --git a/app/Http/Livewire/School/VenueTable.php b/app/Http/Livewire/School/VenueTable.php deleted file mode 100644 index b98ba129..00000000 --- a/app/Http/Livewire/School/VenueTable.php +++ /dev/null @@ -1,27 +0,0 @@ - ['except' => false]]; - - public function render() - { - return view('livewire.school.venue-table')->layout('layouts.app', [ - 'SEOData' => new SEOData( - title: __('Venues'), - description: __('Venues in the surrounding area.'), - image: asset('img/screenshot.png') - ), - ]); - } -} diff --git a/app/Http/Livewire/Specials/BalticSeaCircle.php b/app/Http/Livewire/Specials/BalticSeaCircle.php deleted file mode 100644 index 2fe7537a..00000000 --- a/app/Http/Livewire/Specials/BalticSeaCircle.php +++ /dev/null @@ -1,21 +0,0 @@ -layout('layouts.guest', [ - 'SEOData' => new SEOData( - title: 'Baltic Sea Circle Rally Bitcoin Team 218', - description: 'Besucht das Bitcoin Team 218 von Daktari und Cercatrova zum Start der diesjährigen Baltic Sea Circle Rally', - image: asset('img/bsc/3.jpg'), - ), - ]); - } -} diff --git a/app/Http/Livewire/Tables/BitcoinEventTable.php b/app/Http/Livewire/Tables/BitcoinEventTable.php deleted file mode 100644 index 7459c845..00000000 --- a/app/Http/Livewire/Tables/BitcoinEventTable.php +++ /dev/null @@ -1,107 +0,0 @@ -setPrimaryKey('id') - ->setDefaultSort('from', 'asc') - ->setAdditionalSelects([ - 'bitcoin_events.id', - 'bitcoin_events.venue_id', - 'bitcoin_events.created_by', - ]) - ->setThAttributes(function (Column $column) { - return [ - 'class' => 'px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider dark:bg-gray-800 dark:text-gray-400', - 'default' => false, - ]; - }) - ->setTdAttributes(function (Column $column, $row, $columnIndex, $rowIndex) { - return [ - 'class' => 'px-6 py-4 text-sm font-medium dark:text-white', - 'default' => false, - ]; - }) - ->setColumnSelectStatus(false) - ->setPerPage(10) - ->setConfigurableAreas([ - 'toolbar-left-end' => [ - 'columns.bitcoin_events.areas.toolbar-left-end', [ - 'country' => $this->country, - ], - ], - ]); - } - - public function filters(): array - { - return [ - TextFilter::make('Event by ID', 'byid') - ->hiddenFromMenus() - ->filter(function (Builder $builder, string $value) { - $builder->whereIn('bitcoin_events.id', str($value)->explode(',')); - }), - ]; - } - - public function columns(): array - { - return [ - Column::make(__('Country'), 'venue.city.country.name') - ->format( - fn ($value, $row, Column $column) => view('columns.bitcoin_events.country')->withRow($row) - ) - ->sortable() - ->collapseOnMobile(), - Column::make(__('Title'), 'title') - ->format( - fn ($value, $row, Column $column) => view('columns.bitcoin_events.title')->withRow($row) - ) - ->sortable(), - Column::make(__('From'), 'from') - ->format( - fn ($value, $row, Column $column) => $value->asDateTime() - ), - Column::make(__('To'), 'to') - ->format( - fn ($value, $row, Column $column) => $value->asDateTime() - ) - ->collapseOnMobile(), - Column::make(__('Venue'), 'venue.name') - ->collapseOnMobile(), - Column::make(__('Link'), 'link') - ->format( - fn ($value, $row, Column $column) => view('columns.bitcoin_events.link')->withRow($row) - ) - ->sortable() - ->collapseOnMobile(), - ]; - } - - public function builder(): Builder - { - return BitcoinEvent::query() - ->with([ - 'venue.city.country', - ]) - ->where('bitcoin_events.from', '>=', now()) - ->where(fn ($query) => $query - ->whereHas('venue.city.country', - fn ($query) => $query->where('code', $this->country)) - ->orWhere('show_worldwide', true) - ); - } -} diff --git a/app/Http/Livewire/Tables/BookCaseTable.php b/app/Http/Livewire/Tables/BookCaseTable.php deleted file mode 100644 index 9a18301c..00000000 --- a/app/Http/Livewire/Tables/BookCaseTable.php +++ /dev/null @@ -1,122 +0,0 @@ -setPrimaryKey('id') - ->setAdditionalSelects(['id', 'homepage']) - ->setThAttributes(function (Column $column) { - return [ - 'class' => 'px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider dark:bg-gray-800 dark:text-gray-400', - 'default' => false, - ]; - }) - ->setTdAttributes(function (Column $column, $row, $columnIndex, $rowIndex) { - return [ - 'class' => 'px-6 py-4 text-sm font-medium dark:text-white', - 'default' => false, - ]; - }) - ->setColumnSelectStatus(false) - ->setPerPage(10); - } - - public function filters(): array - { - return [ - TextFilter::make('By IDs', 'byids') - ->hiddenFromMenus() - ->filter(function (Builder $builder, string $value) { - $builder->whereIn('id', str($value)->explode(',')); - }), - ]; - } - - public function columns(): array - { - return [ - Column::make('Name', 'title') - ->sortable() - ->searchable( - function (Builder $query, $searchTerm) { - $query->where('title', 'ilike', '%'.$searchTerm.'%'); - } - ), - Column::make('Adresse', 'address') - ->sortable() - ->searchable(), - Column::make('Bitcoin-Bücher') - ->label( - fn ( - $row, - Column $column - ) => $row->orangePills->sum('amount') - ) - ->collapseOnMobile(), - Column::make('Letzter Input') - ->label( - fn ( - $row, - Column $column - ) => $row->orangePills() - ->latest() - ->first()?->date->asDate() - ) - ->collapseOnMobile(), - Column::make('Link') - ->label( - fn ( - $row, - Column $column - ) => $row->homepage ? 'Link' : null - ) - ->html() - ->collapseOnMobile(), - Column::make('Orange-Pilled', 'orange_pilled') - ->label(fn ($row, Column $column) => view('columns.book_cases.oranged-pilled') - ->withRow($row) - ->withCountry($this->country)) - ->collapseOnMobile(), - ]; - } - - private function url_to_absolute($url) - { - if (str($url)->contains('http')) { - return $url; - } - if (! str($url)->contains('http')) { - return str($url)->prepend('https://'); - } - } - - public function builder(): Builder - { - return BookCase::query() - ->active() - ->with([ - 'orangePills', - ]) - ->withCount([ - 'orangePills', - ]) - ->orderByDesc('orange_pills_count') - ->orderBy('book_cases.id'); - } -} diff --git a/app/Http/Livewire/Tables/CityTable.php b/app/Http/Livewire/Tables/CityTable.php deleted file mode 100644 index f7d6dd43..00000000 --- a/app/Http/Livewire/Tables/CityTable.php +++ /dev/null @@ -1,140 +0,0 @@ -setPrimaryKey('id') - ->setAdditionalSelects(['cities.id', 'cities.created_by']) - ->setThAttributes(function (Column $column) { - return [ - 'class' => 'px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider dark:bg-gray-800 dark:text-gray-400', - 'default' => false, - ]; - }) - ->setTdAttributes(function (Column $column, $row, $columnIndex, $rowIndex) { - return [ - 'class' => 'px-6 py-4 text-sm font-medium dark:text-white', - 'default' => false, - ]; - }) - ->setColumnSelectStatus(false) - ->setPerPage(10) - ->setConfigurableAreas([ - 'toolbar-left-end' => [ - 'columns.cities.areas.toolbar-left-end', [ - 'country' => $this->country, - ], - ], - ]); - } - - public function columns(): array - { - $columns = collect([ - Column::make('Stadt Name', 'name') - ->sortable() - ->searchable(fn ($builder, $term) => $builder->where('cities.name', 'ilike', '%'.$term.'%')), - ]); - if ($this->type === 'school') { - $columns = $columns->merge([ - Column::make('Veranstaltungs-Orte') - ->label( - fn ($row, Column $column) => $row->venues_count - ) - ->collapseOnMobile(), - Column::make('Termine') - ->label( - fn ($row, Column $column) => $row->course_events_count - ) - ->collapseOnMobile(), - ]); - } - - return $columns->merge([ - Column::make('') - ->label( - fn ($row, Column $column) => view('columns.cities.action') - ->withRow($row) - ->withType($this->type) - ->withManage($this->manage) - ), - ]) - ->toArray(); - } - - public function builder(): Builder - { - return City::query() - ->withCount([ - 'venues', - 'courseEvents', - ]) - ->whereHas('country', fn ($query) => $query->where('code', $this->country)) - ->orderByDesc('course_events_count') - ->orderBy('cities.id'); - } - - public function proximitySearch($id) - { - $city = City::query() - ->find($id); - $query = City::radius($city->latitude, $city->longitude, 100) - ->where('id', '!=', $id); - - return to_route('school.table.event', [ - '#table', - 'country' => $this->country, - 'course_events' => [ - 'filters' => [ - 'stadt' => $query->pluck('name') - ->push($city->name) - ->implode(','), - ], - ], - ]); - } - - public function proximitySearchForBookCases($id) - { - $city = City::query() - ->find($id); - $query = BookCase::active()->radius($city->latitude, $city->longitude, 25); - $ids = $query->pluck('id'); - if ($ids->isEmpty()) { - $this->notification() - ->error(__('No bookcases found in the radius of 5km')); - - return; - } - - return to_route('bookCases.table.bookcases', [ - '#table', - 'country' => $this->country, - 'bookcases' => [ - 'filters' => [ - 'byids' => $ids->implode(','), - ], - ], - ]); - } -} diff --git a/app/Http/Livewire/Tables/CourseTable.php b/app/Http/Livewire/Tables/CourseTable.php deleted file mode 100644 index 39b07a74..00000000 --- a/app/Http/Livewire/Tables/CourseTable.php +++ /dev/null @@ -1,122 +0,0 @@ -setPrimaryKey('id') - ->setAdditionalSelects(['courses.id', 'courses.created_by']) - ->setThAttributes(function (Column $column) { - return [ - 'class' => 'px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider dark:bg-gray-800 dark:text-gray-400', - 'default' => false, - ]; - }) - ->setTdAttributes(function (Column $column, $row, $columnIndex, $rowIndex) { - return [ - 'class' => 'px-6 py-4 text-sm font-medium dark:text-white', - 'default' => false, - ]; - }) - ->setColumnSelectStatus(false) - ->setPerPage(10) - ->setConfigurableAreas([ - 'toolbar-left-end' => [ - 'columns.courses.areas.toolbar-left-end', [ - 'country' => $this->country, - ], - ], - ]); - } - - public function filters(): array - { - return [ - MultiSelectFilter::make('Tag') - ->options( - Tag::query() - ->withType('course') - ->get() - ->mapWithKeys(fn ($item, $key) => [$item->name => $item->name]) - ->toArray() - ) - ->filter(function (Builder $builder, array $values) { - $builder->withAnyTags($values, 'course'); - }), - ]; - } - - public function columns(): array - { - return [ - Column::make('Dozent', 'lecturer.name') - ->label( - fn ($row, Column $column) => view('columns.courses.lecturer')->withRow($row) - ) - ->sortable() - ->collapseOnMobile(), - Column::make('Name', 'name') - ->searchable(fn (Builder $query, string $term) => $query->where('name', 'ilike', '%'.$term.'%')) - ->sortable(), - Column::make('Tags') - ->label( - fn ($row, Column $column) => view('columns.courses.tags')->withRow($row) - ) - ->collapseOnMobile(), - Column::make('Termine') - ->label( - fn ($row, Column $column) => ''.$row->course_events_count.'' - ) - ->html() - ->sortable() - ->collapseOnMobile(), - Column::make('Erstellt am', 'created_at') - ->sortable() - ->collapseOnMobile(), - Column::make('') - ->label( - fn ($row, Column $column) => view('columns.courses.action')->withRow($row) - ), - ]; - } - - public function builder(): Builder - { - return Course::query() - ->with([ - 'lecturer', - 'tags', - ]) - ->withCount([ - 'courseEvents' => fn($query) => $query->where('course_events.from', '>', now()), - ]) - ->orderByDesc('course_events_count') - ->orderBy('courses.id'); - } - - public function courseSearch($id) - { - return to_route('school.table.event', [ - '#table', - 'country' => $this->country, - 'course_events' => [ - 'filters' => [ - 'course_id' => $id, - ], - ], - ]); - } -} diff --git a/app/Http/Livewire/Tables/EventTable.php b/app/Http/Livewire/Tables/EventTable.php deleted file mode 100644 index f5a3c9ad..00000000 --- a/app/Http/Livewire/Tables/EventTable.php +++ /dev/null @@ -1,202 +0,0 @@ -setPrimaryKey('id') - ->setDefaultSort('from', 'asc') - ->setAdditionalSelects([ - 'course_events.id', - 'course_events.created_by', - 'course_id', - 'venue_id', - ]) - ->setThAttributes(function (Column $column) { - return [ - 'class' => 'px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider dark:bg-gray-800 dark:text-gray-400', - 'default' => false, - ]; - }) - ->setTdAttributes(function (Column $column, $row, $columnIndex, $rowIndex) { - return [ - 'class' => 'px-6 py-4 text-sm font-medium dark:text-white', - 'default' => false, - ]; - }) - ->setColumnSelectStatus(false) - ->setPerPage(10) - ->setConfigurableAreas([ - 'toolbar-left-end' => [ - 'columns.course-events.areas.toolbar-left-end', [ - 'country' => $this->country, - ], - ], - ]); - } - - public function filters(): array - { - return [ - TextFilter::make('Event by ID', 'byid') - ->hiddenFromMenus() - ->filter(function (Builder $builder, string $value) { - $builder->whereIn('course_events.id', str($value)->explode(',')); - }), - TextFilter::make(__('City')) - ->config([ - 'placeholder' => __('Search City'), - ]) - ->filter(function (Builder $builder, string $value) { - if (str($value)->contains(',')) { - $builder - ->whereHas('venue.city', - function ($query) use ($value) { - $query->whereIn('cities.name', str($value)->explode(',')); - }); - } else { - $builder->whereHas('venue.city', - fn ($query) => $query->where('cities.name', 'ilike', "%$value%")); - } - }), - TextFilter::make(__('Venue'), 'venue') - ->config([ - 'placeholder' => __('Search Venue'), - ]) - ->filter(function (Builder $builder, string $value) { - $builder->whereHas('venue', - fn ($query) => $query->where('venues.name', 'ilike', "%$value%")); - }), - TextFilter::make(__('Course')) - ->config([ - 'placeholder' => __('Search Course'), - ]) - ->filter(function (Builder $builder, string $value) { - $builder->whereHas('course', - fn ($query) => $query->where('courses.name', 'ilike', "%$value%")); - }), - TextFilter::make('Course by ID', 'course_id') - ->hiddenFromMenus() - ->filter(function (Builder $builder, string $value) { - $builder->whereHas('course', - fn ($query) => $query->where('courses.id', '=', $value)); - }), - MultiSelectFilter::make(__('Type')) - ->options( - Category::query() - ->pluck('name', 'id') - ->toArray() - ) - ->filter(function (Builder $builder, array $values) { - $builder->whereHas('course.categories', - fn ($query) => $query->whereIn('categories.id', $values)); - }), - SelectFilter::make(__('Lecturer')) - ->options( - Lecturer::query() - ->pluck('name', 'id') - ->toArray() - ) - ->filter(function (Builder $builder, string $value) { - $builder->whereHas('course.lecturer', - fn ($query) => $query->where('lecturers.id', $value)); - }), - ]; - } - - public function columns(): array - { - return [ - Column::make(_('City'), 'venue.city.name') - ->sortable() - ->collapseOnMobile(), - Column::make(__('Venue'), 'venue.name') - ->sortable() - ->collapseOnMobile(), - Column::make(__('Lecturer'), 'course.lecturer.name') - ->label( - fn ($row, Column $column) => view('columns.events.lecturer')->withRow($row) - ) - ->sortable() - ->collapseOnMobile(), - Column::make(__('Course'), 'course.name') - ->sortable(), - Column::make(__('Type')) - ->label( - fn ($row, Column $column) => view('columns.events.categories')->withRow($row) - ) - ->collapseOnMobile(), - Column::make(__('From'), 'from') - ->format( - fn ($value, $row, Column $column) => $value->asDateTime() - ) - ->sortable(), - Column::make(__('To'), 'to') - ->format( - fn ($value, $row, Column $column) => $value->asDateTime() - ) - ->sortable() - ->collapseOnMobile(), - /*Column::make("Teilnehmer") - ->label( - fn($row, Column $column) => ''.$row->registrations->count().'' - ) - ->html() - ->sortable(),*/ - Column::make(__('Actions')) - ->label( - fn ($row, Column $column) => view('columns.events.action')->withRow($row) - ) - ->collapseOnMobile(), - ]; - } - - public function builder(): Builder - { - return CourseEvent::query() - ->with([ - 'course.lecturer', - 'course.categories', - ]) - ->where('from', '>=', now()) - ->whereHas('venue.city.country', - fn ($query) => $query->where('countries.code', $this->country)); - } - - public function viewHistoryModal($modelId): void - { - $this->viewingModal = true; - $this->currentModal = CourseEvent::findOrFail($modelId); - } - - public function resetModal(): void - { - $this->reset('viewingModal', 'currentModal'); - } - - public function customView(): string - { - return 'modals.events.register'; - } -} diff --git a/app/Http/Livewire/Tables/LecturerTable.php b/app/Http/Livewire/Tables/LecturerTable.php deleted file mode 100644 index bbfcff2e..00000000 --- a/app/Http/Livewire/Tables/LecturerTable.php +++ /dev/null @@ -1,118 +0,0 @@ -setPrimaryKey('id') - ->setAdditionalSelects(['id']) - ->setThAttributes(function (Column $column) { - return [ - 'class' => 'px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider dark:bg-gray-800 dark:text-gray-400', - 'default' => false, - ]; - }) - ->setTdAttributes(function (Column $column, $row, $columnIndex, $rowIndex) { - return [ - 'class' => 'px-6 py-4 text-sm font-medium dark:text-white', - 'default' => false, - ]; - }) - ->setColumnSelectStatus(false) - ->setPerPage(10) - ->setConfigurableAreas([ - 'toolbar-left-end' => [ - 'columns.lectures.areas.toolbar-left-end', [ - 'country' => $this->country, - ], - ], - ]); - } - - public function columns(): array - { - return [ - ImageColumn::make('Bild') - ->location( - fn ($row) => $row->getFirstMediaUrl('avatar', 'thumb') - ) - ->attributes(fn ($row) => [ - 'class' => 'rounded h-16 w-16', - 'alt' => $row->name.' Avatar', - ]) - ->collapseOnMobile(), - Column::make('Name', 'name') - ->searchable(fn ($query, $term) => $query->where('name', 'ilike', '%'.$term.'%')) - ->sortable(), - BooleanColumn::make('Aktiv', 'active') - ->sortable() - ->collapseOnMobile(), - Column::make('Kurse') - ->label( - fn ($row, Column $column) => $row->courses_count - ) - ->collapseOnMobile(), - Column::make('Inhalte') - ->label( - fn ($row, Column $column) => $row->library_items_count - ) - ->collapseOnMobile(), - Column::make('') - ->label( - fn ($row, Column $column) => view('columns.lectures.action') - ->withRow($row) - ->withCountry($this->country) - ), - - ]; - } - - public function builder(): Builder - { - return Lecturer::query() - ->withCount([ - 'courses', - 'coursesEvents', - 'libraryItems' => fn($query) => $query->where('news', false) - ]); - } - - public function lecturerSearch($id, $event = true) - { - $lecturer = Lecturer::query() - ->find($id); - - if ($event) { - return to_route('school.table.event', [ - '#table', - 'country' => $this->country, - 'course_events' => [ - 'filters' => [ - 'dozent' => $lecturer->id, - ], - ], - ]); - } else { - return to_route('library.table.libraryItems', [ - '#table', - 'country' => $this->country, - 'filters' => [ - 'lecturer_id' => $lecturer->id, - ], - ]); - } - } -} diff --git a/app/Http/Livewire/Tables/LibraryItemTable.php b/app/Http/Livewire/Tables/LibraryItemTable.php deleted file mode 100644 index 8499bbe4..00000000 --- a/app/Http/Livewire/Tables/LibraryItemTable.php +++ /dev/null @@ -1,187 +0,0 @@ -setPrimaryKey('id') - ->setAdditionalSelects(['id']) - ->setDefaultSort('order_column', 'asc') - ->setThAttributes(function (Column $column) { - return [ - 'class' => 'px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider dark:bg-gray-800 dark:text-gray-400', - 'default' => false, - ]; - }) - ->setTdAttributes(function (Column $column, $row, $columnIndex, $rowIndex) { - return [ - 'class' => 'px-6 py-4 text-sm font-medium dark:text-white', - 'default' => false, - ]; - }) - ->setColumnSelectStatus(false) - ->setPerPage(10); - } - - public function filters(): array - { - return [ - TextFilter::make(__('By id'), 'id') - ->hiddenFromMenus() - ->filter(function (Builder $builder, string $value) { - $builder->where('library_items.id', '=', $value); - }), - TextFilter::make(__('By lecturer'), 'lecturer_id') - ->hiddenFromMenus() - ->filter(function (Builder $builder, string $value) { - $builder->where('library_items.lecturer_id', '=', $value); - }), - MultiSelectFilter::make('Tag') - ->options( - Tag::query() - ->where('type', 'library_item') - ->get() - ->pluck('name', 'id') - ->toArray() - ) - ->filter(function (Builder $builder, array $values) { - $builder->whereHas('tags', function (Builder $query) use ($values) { - $query->whereIn('tags.id', $values); - }); - }), - SelectFilter::make('Bibliothek') - ->options( - Library::query() - ->where('is_public', true) - ->get() - ->prepend(new Library(['name' => '*'])) - ->pluck('name', 'name') - ->toArray(), - ) - ->filter(function (Builder $builder, string $value) { - if ($value === '*') { - return; - } - if (str($value)->contains(',')) { - $builder - ->whereHas('libraries', - function ($query) use ($value) { - $query->whereIn('libraries.name', str($value)->explode(',')); - }); - } else { - $builder->whereHas('libraries', - fn ($query) => $query->where('libraries.name', 'ilike', "%$value%")); - } - }), - SelectFilter::make('Art') - ->options( - collect( - Options::forEnum(LibraryItemType::class) - ->toArray() - ) - ->mapWithKeys(fn ($value, $key) => [$value['value'] => $value['label']]) - ->prepend('*', '') - ->toArray() - ) - ->filter(function (Builder $builder, string $value) { - if ($value === '*') { - return; - } - $builder->where('library_items.type', $value); - }), - ]; - } - - public function columns(): array - { - return [ - Column::make(__('Image')) - ->label( - fn ($row, Column $column) => view('columns.library_items.image')->withRow($row) - ) - ->collapseOnMobile(), - Column::make(__('Creator'), 'lecturer.name') - ->label( - fn ($row, Column $column) => view('columns.courses.lecturer')->withRow($row) - ) - ->sortable() - ->collapseOnMobile(), - Column::make('Name', 'name') - ->sortable(), - Column::make('Art', 'type') - ->format( - function ($value, $row, Column $column) { - return '' - .LibraryItemType::labels()[$value] - .''; - }) - ->html() - ->sortable() - ->collapseOnMobile(), - Column::make('Tags') - ->label( - fn ($row, Column $column) => view('columns.library_items.tags')->withRow($row) - ) - ->collapseOnMobile(), - Column::make('') - ->label( - fn ($row, Column $column) => view('columns.library_items.action')->withRow($row) - ), - ]; - } - - public function builder(): Builder - { - $shouldBePublic = request() - ?->route() - ?->getName() !== 'library.table.lecturer'; - - if ($this->currentTab !== '*') { - $parentLibrary = Library::query() - ->where('name', $this->currentTab) - ->first(); - } - - return LibraryItem::query() - ->with([ - 'lecturer', - 'tags', - ]) - ->whereHas('libraries', fn ($query) => $query->where('libraries.is_public', $shouldBePublic)) - ->when($this->currentTab !== '*', fn ($query) => $query - ->whereHas('libraries', - fn ($query) => $query - ->where('libraries.name', $this->currentTab) - ) - ->orWhereHas('libraries', - fn ($query) => $query - ->where('libraries.parent_id', $parentLibrary->id) - ) - ) - ->withCount([ - 'lecturer', - ]) - ->currentStatus('published'); - } -} diff --git a/app/Http/Livewire/Tables/MeetupEventTable.php b/app/Http/Livewire/Tables/MeetupEventTable.php deleted file mode 100644 index 5eaba3e4..00000000 --- a/app/Http/Livewire/Tables/MeetupEventTable.php +++ /dev/null @@ -1,117 +0,0 @@ -setPrimaryKey('id') - ->setAdditionalSelects(['meetup_events.id', 'meetup_events.meetup_id', 'attendees', 'might_attendees']) - ->setDefaultSort('start', 'asc') - ->setThAttributes(function (Column $column) { - return [ - 'class' => 'px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider dark:bg-gray-800 dark:text-gray-400', - 'default' => false, - ]; - }) - ->setTdAttributes(function (Column $column, $row, $columnIndex, $rowIndex) { - return [ - 'class' => 'px-6 py-4 text-sm font-medium dark:text-white', - 'default' => false, - ]; - }) - ->setColumnSelectStatus(false) - ->setPerPage(10) - ->setConfigurableAreas([ - 'toolbar-left-end' => [ - 'columns.meetup_events.areas.toolbar-left-end', [ - 'country' => $this->country, - ], - ], - ]); - } - - public function filters(): array - { - return [ - TextFilter::make('Meetup-Event by ID', 'bymeetupid') - ->hiddenFromMenus() - ->filter(function (Builder $builder, string $value) { - $builder->whereIn('meetup_events.meetup_id', str($value)->explode(',')); - }), - TextFilter::make('Meetup-Event by ID', 'byid') - ->hiddenFromMenus() - ->filter(function (Builder $builder, string $value) { - $builder->whereIn('meetup_events.id', str($value)->explode(',')); - }), - ]; - } - - public function columns(): array - { - $columns = [ - Column::make(__('Meetup'), 'meetup.name') - ->format( - fn ($value, $row, Column $column) => view('columns.meetup_events.name') - ->withRow($row) - ->withCountry($this->country) - ) - ->searchable(fn ($builder, $term) => $builder->where('meetups.name', 'ilike', '%'.$term.'%')) - ->sortable(), - Column::make(__('Location'), 'location') - ->searchable(fn ($builder, $term) => $builder->where('location', 'ilike', '%'.$term.'%')) - ->sortable() - ->collapseOnMobile(), - Column::make(__('Start'), 'start') - ->format( - fn ($value, $row, Column $column) => $value->asDateTime() - ) - ->sortable() - ->collapseOnMobile(), - Column::make(__('Confirmations')) - ->label( - fn ($row, Column $column) => view('columns.meetup_events.confirmations') - ->withRow($row) - ) - ->collapseOnMobile(), - Column::make(__('Link')) - ->label( - fn ($row, Column $column) => view('columns.meetup_events.link') - ->withRow($row) - ) - ->collapseOnMobile(), - ]; - - $adminColumns = auth()->check() ? [ - Column::make(__('Actions')) - ->label( - fn ($row, Column $column) => view('columns.meetup_events.manage') - ->withRow($row) - ) - ->collapseOnMobile(), - ] : []; - - return array_merge($columns, $adminColumns); - } - - public function builder(): Builder - { - return MeetupEvent::query() - ->where('meetup_events.start', '>=', now()->subDay()) - ->whereHas('meetup.city.country', fn ($query) => $query->where('code', $this->country)) - ->with([ - 'meetup.city.country', - ]); - } -} diff --git a/app/Http/Livewire/Tables/MeetupForBtcMapTable.php b/app/Http/Livewire/Tables/MeetupForBtcMapTable.php deleted file mode 100644 index b4349b0f..00000000 --- a/app/Http/Livewire/Tables/MeetupForBtcMapTable.php +++ /dev/null @@ -1,54 +0,0 @@ -setPrimaryKey('id') - ->setAdditionalSelects([ - 'osm_relation', - 'simplified_geojson', - 'population', - 'population_date', - 'city_id', - ]) - ->setPerPageAccepted([ - 100000, - ]) - ->setPerPage(100000); - } - - public function columns(): array - { - return [ - Column::make('Id', 'id') - ->sortable(), - Column::make('Name', 'name') - ->sortable(), - Column::make('City', 'city.name') - ->sortable(), - Column::make('Country', 'city.country.name') - ->sortable(), - Column::make('Actions') - ->label(fn($row, Column $column) => view('columns.meetups.osm-actions', ['row' => $row])), - ]; - } - - public function builder(): Builder - { - return Meetup::query() - ->with([ - 'city.country', - ]) - ->where('community', '=', 'einundzwanzig') - ->orderBy('cities.population'); - } -} diff --git a/app/Http/Livewire/Tables/MeetupTable.php b/app/Http/Livewire/Tables/MeetupTable.php deleted file mode 100644 index 03e23013..00000000 --- a/app/Http/Livewire/Tables/MeetupTable.php +++ /dev/null @@ -1,112 +0,0 @@ -setPrimaryKey('id') - ->setAdditionalSelects(['meetups.id', 'meetups.slug', 'meetups.created_by']) - ->setThAttributes(function (Column $column) { - return [ - 'class' => 'px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider dark:bg-gray-800 dark:text-gray-400', - 'default' => false, - ]; - }) - ->setTdAttributes(function (Column $column, $row, $columnIndex, $rowIndex) { - return [ - 'class' => 'px-6 py-4 text-sm font-medium dark:text-white', - 'default' => false, - ]; - }) - ->setColumnSelectStatus(false) - ->setPerPage(10) - ->setConfigurableAreas([ - 'toolbar-left-end' => [ - 'columns.meetups.areas.toolbar-left-end', [ - 'country' => $this->country, - ], - ], - ]); - } - - public function filters(): array - { - return [ - TextFilter::make('Meetup by ID', 'byid') - ->hiddenFromMenus() - ->filter(function (Builder $builder, string $value) { - $builder->whereIn('meetups.id', str($value)->explode(',')); - }), - ]; - } - - public function columns(): array - { - return [ - Column::make(__('Name'), 'name') - ->format( - fn ($value, $row, Column $column) => view('columns.meetups.name') - ->withRow($row) - ) - ->searchable(fn ($builder, $term) => $builder->where('meetups.name', 'ilike', '%'.$term.'%')), - Column::make(__('Plebs')) - ->label(fn ($row, Column $column) => $row->users_count) - ->collapseOnMobile(), - Column::make(__('Links')) - ->label( - fn ($row, Column $column) => view('columns.meetups.action') - ->withRow($row) - ->withIcs(route('meetup.ics', - ['country' => $this->country ?? $row->city->country->code, 'meetup' => $row->id])) - ->withCountry($this->country) - ) - ->collapseOnMobile(), - ]; - } - - public function builder(): Builder - { - return Meetup::query() - ->with([ - 'users', - 'city.country', - 'meetupEvents', - ]) - ->when($this->country, - fn ($query, $country) => $query->whereRelation('city.country', 'code', $this->country)) - ->withCount([ - 'users', - 'meetupEvents' => fn ($query) => $query->where('start', '>=', - now()), - ]) - ->when(! $this->country, fn ($query) => $query->orderByDesc('users_count') - ->orderBy('meetups.id')) - ->when($this->country, fn ($query) => $query->orderByDesc('meetup_events_count') - ->orderBy('meetups.id')); - } - - public function meetupEventSearch($id) - { - $meetup = Meetup::with(['city.country']) - ->find($id); - - return to_route('meetup.table.meetupEvent', [ - 'country' => $this->country ?? $meetup->city->country->code, - 'meetup_events' => [ - 'filters' => ['bymeetupid' => $id], - ], - ]); - } -} diff --git a/app/Http/Livewire/Tables/ProjectProposalTable.php b/app/Http/Livewire/Tables/ProjectProposalTable.php deleted file mode 100644 index eb276513..00000000 --- a/app/Http/Livewire/Tables/ProjectProposalTable.php +++ /dev/null @@ -1,70 +0,0 @@ -setPrimaryKey('id') - ->setAdditionalSelects(['project_proposals.id', 'project_proposals.created_by', 'project_proposals.slug', 'project_proposals.user_id']) - ->setThAttributes(function (Column $column) { - return [ - 'class' => 'px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider dark:bg-gray-800 dark:text-gray-400', - 'default' => false, - ]; - }) - ->setTdAttributes(function (Column $column, $row, $columnIndex, $rowIndex) { - return [ - 'class' => 'px-6 py-4 text-sm font-medium dark:text-white', - 'default' => false, - ]; - }) - ->setColumnSelectStatus(false) - ->setPerPage(10) - ->setConfigurableAreas([ - 'toolbar-left-end' => [ - 'columns.project_proposals.areas.toolbar-left-end', [ - 'country' => $this->country, - ], - ], - ]); - } - - public function columns(): array - { - return [ - Column::make("Id", "id") - ->sortable(), - Column::make(__('From')) - ->label( - fn ($row, Column $column) => view('columns.project_proposals.author')->withRow($row) - ), - Column::make("Name", "name") - ->sortable(), - Column::make(__('Intended support in sats'), "support_in_sats") - ->format( - fn ($value, $row, Column $column) => number_format($value, 0, ',', '.') - ) - ->sortable(), - Column::make('') - ->label( - fn ($row, Column $column) => view('columns.project_proposals.action')->withRow($row)->withCountry($this->country) - ), - ]; - } - - public function builder(): Builder - { - return ProjectProposal::query()->with(['user']); - } -} diff --git a/app/Http/Livewire/Tables/VenueTable.php b/app/Http/Livewire/Tables/VenueTable.php deleted file mode 100644 index a9a7f599..00000000 --- a/app/Http/Livewire/Tables/VenueTable.php +++ /dev/null @@ -1,102 +0,0 @@ -setPrimaryKey('id') - ->setAdditionalSelects(['venues.id', 'venues.created_by']) - ->setThAttributes(function (Column $column) { - return [ - 'class' => 'px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider dark:bg-gray-800 dark:text-gray-400', - 'default' => false, - ]; - }) - ->setTdAttributes(function (Column $column, $row, $columnIndex, $rowIndex) { - return [ - 'class' => 'px-6 py-4 text-sm font-medium dark:text-white', - 'default' => false, - ]; - }) - ->setColumnSelectStatus(false) - ->setPerPage(10) - ->setConfigurableAreas([ - 'toolbar-left-end' => [ - 'columns.venues.areas.toolbar-left-end', [ - 'country' => $this->country, - ], - ], - ]); - } - - public function columns(): array - { - return [ - ImageColumn::make('Bild') - ->location( - fn ($row) => $row->getFirstMediaUrl('images', 'thumb') - ) - ->attributes(fn ($row) => [ - 'class' => 'rounded h-16 w-16', - 'alt' => $row->name.' Avatar', - ]) - ->collapseOnMobile(), - Column::make('Name', 'name') - ->searchable(fn ($query, $term) => $query->where('name', 'ilike', '%'.$term.'%')) - ->sortable(), - Column::make('Street', 'street') - ->sortable() - ->collapseOnMobile(), - Column::make('Termine') - ->label( - fn ($row, Column $column) => $row->course_events_count - ) - ->collapseOnMobile(), - Column::make('') - ->label( - fn ($row, Column $column) => view('columns.venues.action')->withRow($row)->withManage($this->manage) - ), - ]; - } - - public function builder(): Builder - { - return Venue::query() - ->withCount([ - 'courseEvents', - ]) - ->whereHas('city.country', fn ($query) => $query->where('code', $this->country)) - ->orderByDesc('course_events_count') - ->orderBy('venues.id'); - } - - public function venueSearch($id) - { - $venue = Venue::query() - ->find($id); - - return to_route('school.table.event', [ - '#table', - 'country' => $this->country, - 'course_events' => [ - 'filters' => [ - 'venue' => $venue->name, - ], - ], - ]); - } -} diff --git a/app/Http/Livewire/Venue/Form/VenueForm.php b/app/Http/Livewire/Venue/Form/VenueForm.php deleted file mode 100644 index 9808a7f8..00000000 --- a/app/Http/Livewire/Venue/Form/VenueForm.php +++ /dev/null @@ -1,89 +0,0 @@ - ['except' => '']]; - - protected $listeners = ['refresh' => '$refresh']; - - public function rules() - { - return [ - 'images.*' => [Rule::requiredIf(!$this->venue->id), 'nullable', 'mimes:jpeg,png,jpg,gif', 'max:10240'], - - 'venue.city_id' => 'required', - 'venue.name' => [ - 'required', - Rule::unique('venues', 'name') - ->ignore($this->venue), - ], - 'venue.street' => 'required', - ]; - } - - public function mount() - { - if (!$this->venue) { - $this->venue = new Venue(); - } elseif (!auth() - ->user() - ->can('update', $this->venue)) { - abort(403); - } - - if (!$this->fromUrl) { - $this->fromUrl = url()->previous(); - } - } - - public function deleteMedia($id) - { - Media::query() - ->find($id) - ->delete(); - $this->notification() - ->success(__('Image deleted!')); - $this->emit('refresh'); - } - - public function submit() - { - $this->validate(); - $this->venue->save(); - - if ($this->images && count($this->images) > 0) { - foreach ($this->images as $item) { - $this->venue->addMedia($item) - ->usingFileName(md5($item->getClientOriginalName()).'.'.$item->getClientOriginalExtension()) - ->toMediaCollection('images'); - } - } - - return redirect($this->fromUrl); - } - - public function render() - { - return view('livewire.venue.form.venue-form'); - } -} diff --git a/app/Http/Livewire/Wallet/LightningWallet.php b/app/Http/Livewire/Wallet/LightningWallet.php deleted file mode 100644 index f501f7e8..00000000 --- a/app/Http/Livewire/Wallet/LightningWallet.php +++ /dev/null @@ -1,71 +0,0 @@ - 'required', - 'url' => 'required', - 'lnurl' => 'required', - 'qrCode' => 'required', - ]; - } - - public function mount() - { - $this->k1 = bin2hex(str()->random(32)); - if (app()->environment('local')) { - $this->url = 'https://einundzwanzig.eu-1.sharedwithexpose.com/api/lnurl-auth-callback?tag=login&k1='.$this->k1.'&action=login'; - } else { - $this->url = url('/api/lnurl-auth-callback?tag=login&k1='.$this->k1.'&action=login'); - } - $this->lnurl = lnurl\encodeUrl($this->url); - $this->qrCode = base64_encode(QrCode::format('png') - ->size(300) - ->merge('/public/android-chrome-192x192.png', .3) - ->errorCorrection('H') - ->generate($this->lnurl)); - } - - public function confirm() - { - $user = auth()->user(); - $user->change = $this->k1; - $user->change_time = now(); - $user->save(); - $this->confirmed = true; - } - - public function checkAuth() - { - $loginKey = LoginKey::query() - ->where('k1', $this->k1) - ->whereDate('created_at', '>=', now()->subMinutes(5)) - ->first(); - // you should also restrict this 👆🏻 by time, and find only the $k1 that were created in the last 5 minutes - - if ($loginKey) { - return to_route('welcome'); - } - } - - public function render() - { - return view('livewire.wallet.lightning-wallet'); - } -} diff --git a/resources/views/api/api-token-manager.blade.php b/resources/views/api/api-token-manager.blade.php deleted file mode 100644 index 1391fb70..00000000 --- a/resources/views/api/api-token-manager.blade.php +++ /dev/null @@ -1,169 +0,0 @@ -
- - - - {{ __('Create API Token') }} - - - - {{ __('API tokens allow third-party services to authenticate with our application on your behalf.') }} - - - - -
- - - -
- - - @if (Laravel\Jetstream\Jetstream::hasPermissions()) -
- - -
- @foreach (Laravel\Jetstream\Jetstream::$permissions as $permission) - - @endforeach -
-
- @endif -
- - - - {{ __('Created.') }} - - - - {{ __('Create') }} - - -
- - @if ($this->user->tokens->isNotEmpty()) - - - -
- - - {{ __('Manage API Tokens') }} - - - - {{ __('You may delete any of your existing tokens if they are no longer needed.') }} - - - - -
- @foreach ($this->user->tokens->sortBy('name') as $token) -
-
- {{ $token->name }} -
- -
- @if ($token->last_used_at) -
- {{ __('Last used') }} {{ $token->last_used_at->diffForHumans() }} -
- @endif - - @if (Laravel\Jetstream\Jetstream::hasPermissions()) - - @endif - - -
-
- @endforeach -
-
-
-
- @endif - - - - - {{ __('API Token') }} - - - -
- {{ __('Please copy your new API token. For your security, it won\'t be shown again.') }} -
- - -
- - - - {{ __('Close') }} - - -
- - - - - {{ __('API Token Permissions') }} - - - -
- @foreach (Laravel\Jetstream\Jetstream::$permissions as $permission) - - @endforeach -
-
- - - - {{ __('Cancel') }} - - - - {{ __('Save') }} - - -
- - - - - {{ __('Delete API Token') }} - - - - {{ __('Are you sure you would like to delete this API token?') }} - - - - - {{ __('Cancel') }} - - - - {{ __('Delete') }} - - - -
diff --git a/resources/views/api/index.blade.php b/resources/views/api/index.blade.php deleted file mode 100644 index d15b6a33..00000000 --- a/resources/views/api/index.blade.php +++ /dev/null @@ -1,13 +0,0 @@ - - -

- {{ __('API Tokens') }} -

-
- -
-
- @livewire('api.api-token-manager') -
-
-
diff --git a/resources/views/auth/confirm-password.blade.php b/resources/views/auth/confirm-password.blade.php deleted file mode 100644 index d87049ac..00000000 --- a/resources/views/auth/confirm-password.blade.php +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - -
- {{ __('This is a secure area of the application. Please confirm your password before continuing.') }} -
- - - -
- @csrf - -
- - -
- -
- - {{ __('Confirm') }} - -
-
-
-
diff --git a/resources/views/auth/forgot-password.blade.php b/resources/views/auth/forgot-password.blade.php deleted file mode 100644 index 6af4ab66..00000000 --- a/resources/views/auth/forgot-password.blade.php +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - -
- {{ __('Forgot your password? No problem. Just let us know your email address and we will email you a password reset link that will allow you to choose a new one.') }} -
- - @if (session('status')) -
- {{ session('status') }} -
- @endif - - - -
- @csrf - -
- - -
- -
- - {{ __('Email Password Reset Link') }} - -
-
-
-
diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php deleted file mode 100644 index 2cdbf1fb..00000000 --- a/resources/views/auth/login.blade.php +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - @if (session('status')) -
- {{ session('status') }} -
- @endif - -
- -
- - {{ __('Back to the website') }} - -
- - @csrf - -
- - - @if(app()->environment()) -
admin@einundzwanzig.space
- @endif -
- -
- - - @if(app()->environment()) -
1234
- @endif -
- -
- -
- - @if(app()->environment('local')) -
- - @if (Route::has('password.request')) - - {{ __('Forgot your password?') }} - - @endif - - - {{ __('Log in') }} - - -
- @endif - -
- LNURL-Auth -
-
-
-
diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php deleted file mode 100644 index 3653b4ac..00000000 --- a/resources/views/auth/register.blade.php +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - -
- -
- - {{ __('Back to the website') }} - -
- - @csrf - -
- - -
- -
- - -
- -
- - -
- -
- - -
- -
- -
- - -
- {{ __('I want to submit new courses on this platform') }} -
-
-
-
- - @if (Laravel\Jetstream\Jetstream::hasTermsAndPrivacyPolicyFeature()) -
- -
- - -
- {!! __('I agree to the :terms_of_service and :privacy_policy', [ - 'terms_of_service' => ''.__('Terms of Service').'', - 'privacy_policy' => ''.__('Privacy Policy').'', - ]) !!} -
-
-
-
- @endif - - {{--
- - {{ __('Already registered?') }} - - - {{ __('Register') }} - -
--}} - -
- Login -
-
-
-
diff --git a/resources/views/auth/reset-password.blade.php b/resources/views/auth/reset-password.blade.php deleted file mode 100644 index 36a9f65a..00000000 --- a/resources/views/auth/reset-password.blade.php +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - -
- @csrf - - - -
- - -
- -
- - -
- -
- - -
- -
- - {{ __('Reset Password') }} - -
-
-
-
diff --git a/resources/views/auth/two-factor-challenge.blade.php b/resources/views/auth/two-factor-challenge.blade.php deleted file mode 100644 index 6d54913f..00000000 --- a/resources/views/auth/two-factor-challenge.blade.php +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - -
-
- {{ __('Please confirm access to your account by entering the authentication code provided by your authenticator application.') }} -
- -
- {{ __('Please confirm access to your account by entering one of your emergency recovery codes.') }} -
- - - -
- @csrf - -
- - -
- -
- - -
- -
- - - - - - {{ __('Log in') }} - -
-
-
-
-
diff --git a/resources/views/auth/verify-email.blade.php b/resources/views/auth/verify-email.blade.php deleted file mode 100644 index 7e616461..00000000 --- a/resources/views/auth/verify-email.blade.php +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - -
- {{ __('Before continuing, could you verify your email address by clicking on the link we just emailed to you? If you didn\'t receive the email, we will gladly send you another.') }} -
- - @if (session('status') == 'verification-link-sent') -
- {{ __('A new verification link has been sent to the email address you provided in your profile settings.') }} -
- @endif - -
-
- @csrf - -
- - {{ __('Resend Verification Email') }} - -
-
- -
- - {{ __('Edit Profile') }} - -
- @csrf - - -
-
-
-
-
diff --git a/resources/views/columns/bitcoin_events/areas/toolbar-left-end.blade.php b/resources/views/columns/bitcoin_events/areas/toolbar-left-end.blade.php deleted file mode 100644 index d406affa..00000000 --- a/resources/views/columns/bitcoin_events/areas/toolbar-left-end.blade.php +++ /dev/null @@ -1,6 +0,0 @@ -
- - - {{ __('Register event') }} - -
diff --git a/resources/views/columns/bitcoin_events/country.blade.php b/resources/views/columns/bitcoin_events/country.blade.php deleted file mode 100644 index 874b52eb..00000000 --- a/resources/views/columns/bitcoin_events/country.blade.php +++ /dev/null @@ -1,7 +0,0 @@ -
- {{ $row->venue->city->country->code }} -
- {{ $row->venue->city->country->code }} -
-
diff --git a/resources/views/columns/bitcoin_events/link.blade.php b/resources/views/columns/bitcoin_events/link.blade.php deleted file mode 100644 index 6da16926..00000000 --- a/resources/views/columns/bitcoin_events/link.blade.php +++ /dev/null @@ -1,13 +0,0 @@ -
- - {{ __('Link') }} - -
- @can('update', $row) - - - {{ __('Edit') }} - - @endif -
-
diff --git a/resources/views/columns/bitcoin_events/title.blade.php b/resources/views/columns/bitcoin_events/title.blade.php deleted file mode 100644 index 8f371873..00000000 --- a/resources/views/columns/bitcoin_events/title.blade.php +++ /dev/null @@ -1,6 +0,0 @@ -
- {{ $row->title }} -
- {{ $row->title }} -
-
diff --git a/resources/views/columns/book_cases/oranged-pilled.blade.php b/resources/views/columns/book_cases/oranged-pilled.blade.php deleted file mode 100644 index f97b3a6e..00000000 --- a/resources/views/columns/book_cases/oranged-pilled.blade.php +++ /dev/null @@ -1,31 +0,0 @@ -
- @auth -
- @if($row->orange_pills_count > 0) - - @endif -
-
- @if($row->orange_pills_count < 1) - - @endif -
-
- - {{ __('💊 Orange Pill Now') }} - - {{ __('Details') }} -
- @else -
- - - {{ __('no bitcoin books yet') }} - -
- @endauth -
diff --git a/resources/views/columns/cities/action.blade.php b/resources/views/columns/cities/action.blade.php deleted file mode 100644 index 759027c0..00000000 --- a/resources/views/columns/cities/action.blade.php +++ /dev/null @@ -1,40 +0,0 @@ -
- @if($type === 'school' && !$manage) -
-
- @if($row->course_events_count > 0) - - - {{ __('Perimeter search course date :name (100km)', ['name' => $row->name]) }} - - @endif -
-
- @if($row->course_events_count < 1) - - - {{ __('Perimeter search course date :name (100km)', ['name' => $row->name]) }} - - @endif -
-
- @endif -
- @if($type === 'bookCase' && !$manage) -
- - - {{ __('Perimeter search bookcase :name (25km)', ['name' => $row->name]) }} - -
- @endif -
-
- @can('update', $row) - - - {{ __('Edit') }} - - @endcan -
-
diff --git a/resources/views/columns/cities/areas/toolbar-left-end.blade.php b/resources/views/columns/cities/areas/toolbar-left-end.blade.php deleted file mode 100644 index c2c30ee4..00000000 --- a/resources/views/columns/cities/areas/toolbar-left-end.blade.php +++ /dev/null @@ -1,6 +0,0 @@ -
- - - {{ __('New City') }} - -
diff --git a/resources/views/columns/course-events/areas/toolbar-left-end.blade.php b/resources/views/columns/course-events/areas/toolbar-left-end.blade.php deleted file mode 100644 index ded63854..00000000 --- a/resources/views/columns/course-events/areas/toolbar-left-end.blade.php +++ /dev/null @@ -1,6 +0,0 @@ -
- - - {{ __('Register course date') }} - -
diff --git a/resources/views/columns/courses/action.blade.php b/resources/views/columns/courses/action.blade.php deleted file mode 100644 index 58ddd539..00000000 --- a/resources/views/columns/courses/action.blade.php +++ /dev/null @@ -1,23 +0,0 @@ -
- @if($row->course_events_count > 0) -
- - {{ __('Show dates') }} [{{ $row->course_events_count }}] - -
- @else -
- - {{ __('Show dates') }} - -
- @endif - @can('update', $row) -
- - - {{ __('Edit') }} - -
- @endcan -
diff --git a/resources/views/columns/courses/areas/toolbar-left-end.blade.php b/resources/views/columns/courses/areas/toolbar-left-end.blade.php deleted file mode 100644 index 0fcc2518..00000000 --- a/resources/views/columns/courses/areas/toolbar-left-end.blade.php +++ /dev/null @@ -1,6 +0,0 @@ -
- - - {{ __('Register course') }} - -
diff --git a/resources/views/columns/courses/lecturer.blade.php b/resources/views/columns/courses/lecturer.blade.php deleted file mode 100644 index 827959e9..00000000 --- a/resources/views/columns/courses/lecturer.blade.php +++ /dev/null @@ -1,6 +0,0 @@ -
- {{ $row->lecturer->name }} -
- {{ $row->lecturer->name }} -
-
diff --git a/resources/views/columns/courses/tags.blade.php b/resources/views/columns/courses/tags.blade.php deleted file mode 100644 index 0c051af8..00000000 --- a/resources/views/columns/courses/tags.blade.php +++ /dev/null @@ -1,5 +0,0 @@ -
- @foreach($row->tags as $tag) - {{ $tag->name }} - @endforeach -
diff --git a/resources/views/columns/events/action.blade.php b/resources/views/columns/events/action.blade.php deleted file mode 100644 index 8a440b96..00000000 --- a/resources/views/columns/events/action.blade.php +++ /dev/null @@ -1,15 +0,0 @@ -
-
- {{ __('Register') }} -
- @can('update', $row) -
- - - {{ __('Edit') }} - -
- @endcan -
diff --git a/resources/views/columns/events/categories.blade.php b/resources/views/columns/events/categories.blade.php deleted file mode 100644 index 1bc1fb3b..00000000 --- a/resources/views/columns/events/categories.blade.php +++ /dev/null @@ -1,5 +0,0 @@ -
- @foreach($row->course->categories as $category) - {{ $category->name }} - @endforeach -
diff --git a/resources/views/columns/events/lecturer.blade.php b/resources/views/columns/events/lecturer.blade.php deleted file mode 100644 index a5069c67..00000000 --- a/resources/views/columns/events/lecturer.blade.php +++ /dev/null @@ -1,6 +0,0 @@ -
- {{ $row->course->lecturer->name }} -
- {{ $row->course->lecturer->name }} -
-
diff --git a/resources/views/columns/lectures/action.blade.php b/resources/views/columns/lectures/action.blade.php deleted file mode 100644 index 554f2cc6..00000000 --- a/resources/views/columns/lectures/action.blade.php +++ /dev/null @@ -1,59 +0,0 @@ -
-
- @if($row->courses_count > 0) - - - {{ __('Show dates') }} ({{ $row->courses_events_count }}) - - @endif -
-
- @if($row->courses_count < 1) - - - {{ __('Show dates') }} ({{ $row->courses_events_count }}) - - @endif -
-
- @if($row->library_items_count > 0) - - - {{ __('Show content') }} ({{ $row->library_items_count }}) - - @endif -
-
- @if($row->library_items_count < 1) - - - {{ __('Show content') }} ({{ $row->library_items_count }}) - - @endif -
-
- - - {{ __('Show landing page') }} - -
-
- @if($row->created_by === auth()->id()) - - - {{ __('Edit') }} - - @endif -
-
diff --git a/resources/views/columns/lectures/areas/toolbar-left-end.blade.php b/resources/views/columns/lectures/areas/toolbar-left-end.blade.php deleted file mode 100644 index 3c50f1d3..00000000 --- a/resources/views/columns/lectures/areas/toolbar-left-end.blade.php +++ /dev/null @@ -1,6 +0,0 @@ -
- - - {{ __('Register lecturer') }} - -
diff --git a/resources/views/columns/library_items/action.blade.php b/resources/views/columns/library_items/action.blade.php deleted file mode 100644 index 11df8404..00000000 --- a/resources/views/columns/library_items/action.blade.php +++ /dev/null @@ -1,58 +0,0 @@ -
-
- @if(str($row->value)->contains('http')) - - - {{ __('Open') }} - - @endif -
-
- @if($row->type === 'downloadable_file') - - - {{ __('Download') }} - - @endif -
-
- @if($row->type === 'podcast_episode') - - - {{ __('Listen') }} - - @endif -
-
- @if($row->type === 'markdown_article') - - - {{ __('Read') }} - - @endif -
- -
- @if($row->type !== 'markdown_article') - - - {{ __('Share link') }} - - @else - - - {{ __('Share link') }} - - @endif -
-
diff --git a/resources/views/columns/library_items/image.blade.php b/resources/views/columns/library_items/image.blade.php deleted file mode 100644 index e885fe66..00000000 --- a/resources/views/columns/library_items/image.blade.php +++ /dev/null @@ -1,3 +0,0 @@ -
- {{ $row->name }} -
diff --git a/resources/views/columns/library_items/tags.blade.php b/resources/views/columns/library_items/tags.blade.php deleted file mode 100644 index 9aa5cfaa..00000000 --- a/resources/views/columns/library_items/tags.blade.php +++ /dev/null @@ -1,5 +0,0 @@ -
- @foreach($row->tags as $tag) - {{ $tag->name }} - @endforeach -
diff --git a/resources/views/columns/meetup_events/areas/toolbar-left-end.blade.php b/resources/views/columns/meetup_events/areas/toolbar-left-end.blade.php deleted file mode 100644 index 32d95a84..00000000 --- a/resources/views/columns/meetup_events/areas/toolbar-left-end.blade.php +++ /dev/null @@ -1,10 +0,0 @@ -
- - - {{ __('Register Meetup date') }} - - - - {{ __('My meetups') }} - -
diff --git a/resources/views/columns/meetup_events/confirmations.blade.php b/resources/views/columns/meetup_events/confirmations.blade.php deleted file mode 100644 index 0234b0a2..00000000 --- a/resources/views/columns/meetup_events/confirmations.blade.php +++ /dev/null @@ -1,18 +0,0 @@ -
-
- @if(count($row->attendees ?? []) > 0) - {{ __('Confirmations') }} - : {{ count($row->attendees ?? []) }} - @else - {{ __('Confirmations') }}: {{ count($row->attendees ?? []) }} - @endif -
-
- @if(count($row->might_attendees ?? []) > 0) - {{ __('Perhaps') }} - : {{ count($row->might_attendees ?? []) }} - @else - {{ __('Perhaps') }}: {{ count($row->might_attendees ?? []) }} - @endif -
-
diff --git a/resources/views/columns/meetup_events/link.blade.php b/resources/views/columns/meetup_events/link.blade.php deleted file mode 100644 index c208479b..00000000 --- a/resources/views/columns/meetup_events/link.blade.php +++ /dev/null @@ -1,68 +0,0 @@ -
-
- - - {{ __('Link to participate') }} - -
- @if($row->meetup->telegram_link) -
- - - {{ __('Telegram-Link') }} - -
- @endif - @if($row->meetup->webpage) -
- - - {{ __('Website') }} - -
- @endif - @if($row->meetup->twitter_username) -
- - - {{ __('Twitter') }} - -
- @endif - @if($row->nostr) -
- - - {{ __('Nostr') }} - -
- @endif -
diff --git a/resources/views/columns/meetup_events/manage.blade.php b/resources/views/columns/meetup_events/manage.blade.php deleted file mode 100644 index d9c10ecb..00000000 --- a/resources/views/columns/meetup_events/manage.blade.php +++ /dev/null @@ -1,16 +0,0 @@ -
-
- @if(auth()->user()->can('update', $row)) - - - {{ __('Edit') }} - - @else - {{ __('no authorization') }} - @endif -
-
diff --git a/resources/views/columns/meetup_events/name.blade.php b/resources/views/columns/meetup_events/name.blade.php deleted file mode 100644 index 9c0a3ffe..00000000 --- a/resources/views/columns/meetup_events/name.blade.php +++ /dev/null @@ -1,8 +0,0 @@ - -
- {{ $row->meetup->name }} -
- {{ $row->meetup->name }} -
-
-
diff --git a/resources/views/columns/meetups/action.blade.php b/resources/views/columns/meetups/action.blade.php deleted file mode 100644 index 0e08fa7c..00000000 --- a/resources/views/columns/meetups/action.blade.php +++ /dev/null @@ -1,125 +0,0 @@ -
- @if($row->meetup_events_count > 0) -
- - - {{ __('Show dates') }} ({{ $row->meetup_events_count }}) - -
- @endif - @if($row->meetup_events_count < 1) -
- - - {{ __('Show dates') }} ({{ $row->meetup_events_count }}) - -
- @endif -
- - - {{ __('Calendar Stream-Url') }} ({{ $row->meetup_events_count }}) - -
-
- - - {{ __('Show landing page') }} - -
- @if($row->telegram_link) -
- - - {{ __('Telegram-Link') }} - -
- @endif - @if($row->simplex) -
- - - {{ __('SimpleX-Link') }} - -
- @endif - @if($row->webpage) -
- - - {{ __('Website') }} - -
- @endif - @if($row->twitter_username) -
- - - {{ __('Twitter') }} - -
- @endif - @if($row->nostr) -
- - - {{ __('Nostr') }} - -
- @endif - @can('update', $row) -
- - - {{ __('Edit') }} - -
- @endcan -
diff --git a/resources/views/columns/meetups/areas/toolbar-left-end.blade.php b/resources/views/columns/meetups/areas/toolbar-left-end.blade.php deleted file mode 100644 index d87d92bf..00000000 --- a/resources/views/columns/meetups/areas/toolbar-left-end.blade.php +++ /dev/null @@ -1,10 +0,0 @@ -
- - - {{ __('Submit Meetup') }} - - - - {{ __('My meetups') }} - -
diff --git a/resources/views/columns/meetups/link.blade.php b/resources/views/columns/meetups/link.blade.php deleted file mode 100644 index aaae3cbb..00000000 --- a/resources/views/columns/meetups/link.blade.php +++ /dev/null @@ -1,8 +0,0 @@ -
- - - - {{ __('Open') }} - - -
diff --git a/resources/views/columns/meetups/name.blade.php b/resources/views/columns/meetups/name.blade.php deleted file mode 100644 index 3afa22d1..00000000 --- a/resources/views/columns/meetups/name.blade.php +++ /dev/null @@ -1,8 +0,0 @@ - -
- {{ $row->name }} -
- {{ $row->name }} -
-
-
diff --git a/resources/views/columns/meetups/osm-actions.blade.php b/resources/views/columns/meetups/osm-actions.blade.php deleted file mode 100644 index 32b92c5b..00000000 --- a/resources/views/columns/meetups/osm-actions.blade.php +++ /dev/null @@ -1,24 +0,0 @@ -
-
- @if($row->osm_relation) - has OSM relation - @endif -
-
- population {{ $row->population }} -
-
- @if($row->population_date) - population date {{ $row->population_date }} - @endif -
-
- - Open OSM Item - -
-
diff --git a/resources/views/columns/project_proposals/action.blade.php b/resources/views/columns/project_proposals/action.blade.php deleted file mode 100644 index 6b61f4ef..00000000 --- a/resources/views/columns/project_proposals/action.blade.php +++ /dev/null @@ -1,23 +0,0 @@ -
- @can('update', $row) -
- - - {{ __('Edit') }} - -
- @endcan - @auth -
- - - {{ __('Vote') }} [0] - -
- @else -
- {{ __('for voting you have to be logged in') }} -
- @endauth -
diff --git a/resources/views/columns/project_proposals/areas/toolbar-left-end.blade.php b/resources/views/columns/project_proposals/areas/toolbar-left-end.blade.php deleted file mode 100644 index 6132ad16..00000000 --- a/resources/views/columns/project_proposals/areas/toolbar-left-end.blade.php +++ /dev/null @@ -1,6 +0,0 @@ -
- - - {{ __('Submit project for funding') }} - -
diff --git a/resources/views/columns/project_proposals/author.blade.php b/resources/views/columns/project_proposals/author.blade.php deleted file mode 100644 index b65c9e84..00000000 --- a/resources/views/columns/project_proposals/author.blade.php +++ /dev/null @@ -1,6 +0,0 @@ -
- {{ $row->user->name }} -
- {{ str($row->user->name)->limit(10) }} -
-
diff --git a/resources/views/columns/venues/action.blade.php b/resources/views/columns/venues/action.blade.php deleted file mode 100644 index f114b75a..00000000 --- a/resources/views/columns/venues/action.blade.php +++ /dev/null @@ -1,24 +0,0 @@ -
-
- @if($row->course_events_count > 0 && !$manage) - - {{ __('Show dates') }} ({{ $row->course_events_count }}) - - @endif -
-
- @if($row->course_events_count < 1 && !$manage) - - {{ __('Show dates') }} ({{ $row->course_events_count }}) - - @endif -
-
- @can('update', $row) - - - {{ __('Edit') }} - - @endif -
-
diff --git a/resources/views/columns/venues/areas/toolbar-left-end.blade.php b/resources/views/columns/venues/areas/toolbar-left-end.blade.php deleted file mode 100644 index 42efd3a2..00000000 --- a/resources/views/columns/venues/areas/toolbar-left-end.blade.php +++ /dev/null @@ -1,6 +0,0 @@ -
- - - {{ __('Create venue') }} - -
diff --git a/resources/views/components/input/filepond.blade.php b/resources/views/components/input/filepond.blade.php deleted file mode 100644 index 39e3bbb9..00000000 --- a/resources/views/components/input/filepond.blade.php +++ /dev/null @@ -1,30 +0,0 @@ -
in Ordner suchen ' }}', - allowMultiple: {{ isset($attributes['multiple']) ? 'true' : 'false' }}, - server: { - process: (fieldName, file, metadata, load, error, progress, abort, transfer, options) => { - @this.upload('{{ $attributes['wire:model'] }}', file, load, error, progress) - }, - revert: (filename, load) => { - @this.removeUpload('{{ $attributes['wire:model'] }}', filename, load) - }, - load: (source, load, error, progress, abort, headers) => { - @this.load('{{ $attributes['wire:model'] }}', load, error, progress, abort, headers) - }, - }, - }); - FilePond.create($refs.input); - " -> - -
diff --git a/resources/views/components/input/group.blade.php b/resources/views/components/input/group.blade.php deleted file mode 100644 index fd9d40ee..00000000 --- a/resources/views/components/input/group.blade.php +++ /dev/null @@ -1,13 +0,0 @@ -@props([ - 'for', - 'label', -]) -
- -
- {{ $slot }} -
-
diff --git a/resources/views/components/input/simple-mde.blade.php b/resources/views/components/input/simple-mde.blade.php deleted file mode 100644 index 2f5ab7ff..00000000 --- a/resources/views/components/input/simple-mde.blade.php +++ /dev/null @@ -1,63 +0,0 @@ -
-
- -
- -
diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php deleted file mode 100644 index ea5ba4df..00000000 --- a/resources/views/dashboard.blade.php +++ /dev/null @@ -1,19 +0,0 @@ - - -

- {{ __('Dashboard') }} -

-
- -
-
-
-
- - WIP - -
-
-
-
-
diff --git a/resources/views/exports/meetupEventsAttendees.blade.php b/resources/views/exports/meetupEventsAttendees.blade.php deleted file mode 100644 index bcd6eeb5..00000000 --- a/resources/views/exports/meetupEventsAttendees.blade.php +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - @foreach($attendees as $a) - - - - - @endforeach - -
NameStatus
{{ $a['name'] }}{{ $a['status'] }}
diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index f09387f9..c3c23232 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -11,58 +11,23 @@ @stack('feeds') {!! seo($SEOData ?? null) !!} - + {{-- Fonts --}} @googlefonts - - - - - - - - - - - - - - - - - - + {{-- Scripts --}} - @mapstyles - @mapscripts - - - - @vite(['resources/css/app.css', 'resources/js/app.js']) - - - - + @vite(['resources/css/app.css', 'resources/js/app.js']) + {{-- Styles --}} @livewireStyles @include('layouts.styles') - + -@if(auth()->user()) - {{-- HIGHSCORE-CHAT --}} - -@endif -
- -
- {{ $slot }} -
-
+{{ $slot }} @stack('modals') @livewireScripts diff --git a/resources/views/layouts/guest.blade.php b/resources/views/layouts/guest.blade.php index 3a3adc71..c3c23232 100644 --- a/resources/views/layouts/guest.blade.php +++ b/resources/views/layouts/guest.blade.php @@ -11,56 +11,23 @@ @stack('feeds') {!! seo($SEOData ?? null) !!} - + {{-- Fonts --}} @googlefonts - - - - - - - - - - - - - - - - - - - + {{-- Scripts --}} - @mapscripts - - - - + @vite(['resources/css/app.css', 'resources/js/app.js']) - - + {{-- Styles --}} @livewireStyles @include('layouts.styles') - + - -@if(auth()->user()) - {{-- HIGHSCORE-CHAT --}} - -@endif + -
- -
- {{ $slot }} -
-
+{{ $slot }} @stack('modals') @livewireScripts diff --git a/resources/views/layouts/styles.blade.php b/resources/views/layouts/styles.blade.php index 718a6cb6..f377917f 100644 --- a/resources/views/layouts/styles.blade.php +++ b/resources/views/layouts/styles.blade.php @@ -1,67 +1,4 @@ - -
-
-
- - - - -
-
-

- {{ __('Bitcoin Events') }} -

-
-
- {{----}} -
-
- - - - {{-- FOOTER --}} - - - - diff --git a/resources/views/livewire/bitcoin-event/form/bitcoin-event-form.blade.php b/resources/views/livewire/bitcoin-event/form/bitcoin-event-form.blade.php deleted file mode 100644 index 8160c39a..00000000 --- a/resources/views/livewire/bitcoin-event/form/bitcoin-event-form.blade.php +++ /dev/null @@ -1,147 +0,0 @@ -
- {{-- HEADER --}} - - -
- -
-

{{ __('Bitcoin Event') }}

-
- @can('delete', $bitcoinEvent) - @if($bitcoinEvent->id) -
- - - {{ __('Delete') }} - -
- @endif - @endcan -
- - - {{ __('Back') }} - -
-
-
- -
-
-
- - -
- @if ($image && str($image->getMimeType())->contains(['image/jpeg','image/jpg', 'image/png', 'image/gif', 'image/svg+xml', 'image/webp'])) -
{{ __('Preview') }}:
- - @endif - @if ($bitcoinEvent->getFirstMediaUrl('logo')) -
{{ __('Current picture') }}:
- - @endif -
- - @error('image') {{ $message }} @enderror -
- - - -
-
- {{ __('Venue') }} -
- - - {{ __('Create venue') }} - -
-
- -
- - - - - - - - - - - - - - -
{{ __('For images in Markdown, please use eg. Imgur or another provider.') }}
- - @error('bitcoinEvent.description') {{ $message }} @enderror -
- - - - - - - -

{{ __('If checked, the event will be shown everywhere.') }}

-
- - - - - {{ __('Save') }} - - - -
-
-
-
- - -
diff --git a/resources/views/livewire/book-case/book-case-table.blade.php b/resources/views/livewire/book-case/book-case-table.blade.php deleted file mode 100644 index 36100886..00000000 --- a/resources/views/livewire/book-case/book-case-table.blade.php +++ /dev/null @@ -1,34 +0,0 @@ -
- {{-- HEADER --}} - - {{-- MAIN --}} -
-
-
-
-

- {{ __('Bookcases') }} -

-
-
- {{----}} -
-
- - -
-
- {{-- FOOTER --}} - - - -
diff --git a/resources/views/livewire/book-case/city-table.blade.php b/resources/views/livewire/book-case/city-table.blade.php deleted file mode 100644 index 08dd50a1..00000000 --- a/resources/views/livewire/book-case/city-table.blade.php +++ /dev/null @@ -1,23 +0,0 @@ -
- {{-- HEADER --}} - - {{-- MAIN --}} -
-
-
-
-

- {{ __('City search') }} -

-
-
- {{----}} -
-
- - -
-
- {{-- FOOTER --}} - -
diff --git a/resources/views/livewire/book-case/comment-book-case.blade.php b/resources/views/livewire/book-case/comment-book-case.blade.php deleted file mode 100644 index 86c10523..00000000 --- a/resources/views/livewire/book-case/comment-book-case.blade.php +++ /dev/null @@ -1,106 +0,0 @@ -
- - {{-- MAIN --}} -
-
- -
-
- - {{ __('💊 Orange Pill Now') }} - -
-
- -
- -
- -
- -
- {{--
- -
--}} -
-
-

Name

-

{{ $bookCase->title }}

-

Link

-

- {{ $this->url_to_absolute($bookCase->homepage) }} -

-

Adresse

-

{{ $bookCase->address }}

-

Art

-

{{ $bookCase->type }}

-

Geöffnet

-

{{ $bookCase->open }}

-

Kontakt

-

{{ $bookCase->contact }}

-

Information

-

{{ $bookCase->comment }}

-
-
-
- -
- @map([ - 'lat' => $bookCase->latitude, - 'lng' => $bookCase->longitude, - 'zoom' => 24, - 'markers' => [ - [ - 'title' => $bookCase->title, - 'lat' => $bookCase->latitude, - 'lng' => $bookCase->longitude, - 'url' => 'https://gonoware.com', - 'icon' => asset('img/btc-logo-6219386_1280.png'), - 'icon_size' => [42, 42], - ], - ], - ]) -
- -
- -
- -
-
-
- {{-- FOOTER --}} - - - -
diff --git a/resources/views/livewire/book-case/form/orange-pill-form.blade.php b/resources/views/livewire/book-case/form/orange-pill-form.blade.php deleted file mode 100644 index 948884b9..00000000 --- a/resources/views/livewire/book-case/form/orange-pill-form.blade.php +++ /dev/null @@ -1,89 +0,0 @@ -
- {{-- HEADER --}} - - -
- -
-

{{ __('Book Case') }}: {{ $bookCase->title }}

-
-
- @if($orangePill->id) - - - {{ __('Delete') }} - - @endif -
-
- - - {{ __('Back') }} - -
-
-
- -
-
-
- - -
- @if ($image && str($image->getMimeType())->contains(['image/jpeg','image/jpg', 'image/png', 'image/gif', 'image/svg+xml', 'image/webp'])) -
{{ __('Preview') }}:
- - @endif - @if ($orangePill->getFirstMediaUrl('images')) -
{{ __('Current picture') }}:
- - @endif -
- - @error('image') {{ $message }} @enderror -
- - @if($image && str($image->getMimeType())->contains(['image/jpeg','image/jpg', 'image/png', 'image/gif', 'image/svg+xml', 'image/webp'])) - - - - - - - - - - - - - - - - {{ __('Save') }} - - - @endif - -
-
-
-
-
diff --git a/resources/views/livewire/book-case/heatmap.blade.php b/resources/views/livewire/book-case/heatmap.blade.php deleted file mode 100644 index 8337f063..00000000 --- a/resources/views/livewire/book-case/heatmap.blade.php +++ /dev/null @@ -1,80 +0,0 @@ -
- {{-- HEADER --}} - - {{-- MAIN --}} -
-
- - - -

- {{ __('Orange Pill Heatmap') }} -

- -
-
-
- -
-
- {{-- FOOTER --}} - - - -
diff --git a/resources/views/livewire/book-case/highscore-table.blade.php b/resources/views/livewire/book-case/highscore-table.blade.php deleted file mode 100644 index 2f011414..00000000 --- a/resources/views/livewire/book-case/highscore-table.blade.php +++ /dev/null @@ -1,174 +0,0 @@ -
- {{-- HEADER --}} - - {{-- MAIN --}} -
-
- - - -
-
-

- {{ __('Highscore Table') }} -

-
-
- -
    - @foreach($plebs as $pleb) -
  • -
    -
    -
    - @if($pleb->lightning_address || $pleb->lnurl || $pleb->node_id) -
    - - -
    - @else - - - {{ __('Missing lightning address') }} - - @endif -
    -
    - @php - $address = match(true) { - $pleb->lightning_address !== '' => $pleb->lightning_address, - $pleb->lnurl !== '' => $pleb->lnurl, - $pleb->node_id !== '' => $pleb->node_id, - default => null, - }; - @endphp -
    - @if($address) -
    - -
    - @endif -
    -
    -
    - {{ $pleb->name }} -

    {{ $pleb->name }}

    -
    -
    {{ $pleb->orange_pills_count }} {{ __('Bookcases') }} {{ __('Orange pilled') }}
    -
    - {{ __('Points') }}: {{ $pleb->getPoints() }} -
    -
    -
    -
  • - @endforeach - - -
- - - - - - @if($modal) -
- {{ $modal->name }} -
- @endif -
- - - @if($modal) -
- -
-
-
    -
  • -
    -

    -
    - - - {{ $modal->name }} {{ __('has') }} {{ $modal->reputations->where('name', 'LoggedIn')->sum('point') }} {{ __('logins') }} -
    -

    -

    {{ __('You get a point when you log in.') }}

    -
    -
  • -
-
-
- - - -
- @endif -
- - - - @lang('Close') - - -
- -
-
- {{-- FOOTER --}} - - - -
diff --git a/resources/views/livewire/book-case/stats.blade.php b/resources/views/livewire/book-case/stats.blade.php deleted file mode 100644 index f1fbd15a..00000000 --- a/resources/views/livewire/book-case/stats.blade.php +++ /dev/null @@ -1,23 +0,0 @@ -
-
-
-
-
- {{ __('Book cases orange pilled') }} -
-
- {{ number_format($orangePills, 0, ',', '.') }} -
-
- -
-
- {{ __('Number of plebs') }} -
-
- {{ number_format($plebs, 0, ',', '.') }} -
-
-
-
-
diff --git a/resources/views/livewire/book-case/world-map.blade.php b/resources/views/livewire/book-case/world-map.blade.php deleted file mode 100644 index b8fe2b89..00000000 --- a/resources/views/livewire/book-case/world-map.blade.php +++ /dev/null @@ -1,67 +0,0 @@ -
- {{-- HEADER --}} - - {{-- MAIN --}} -
-
- - - -

- {{ __('World Map') }} -

- -
-
-
- -
-
- {{-- FOOTER --}} - - - -
diff --git a/resources/views/livewire/chat/highscore-chat.blade.php b/resources/views/livewire/chat/highscore-chat.blade.php deleted file mode 100644 index b06fb82a..00000000 --- a/resources/views/livewire/chat/highscore-chat.blade.php +++ /dev/null @@ -1,129 +0,0 @@ -
- -
-
-
- -
-
-
-
-

{{ __('PlebChat') }}

-
- -
-
-
-

- {{ __('This chat is limited by 21 messages.') }} -

-
-
-
- -
-
-
-
-
-
-
-
- - @php - $myMessageClass = 'col-start-1 col-end-8 p-3 rounded-lg'; - $otherMessageClass = 'col-start-6 col-end-13 p-3 rounded-lg'; - @endphp - - @foreach($messages as $message) -
-
-
- {{ $message['fromName'] }} -
-
-
-

- {{ $message['message'] }} -

-

- {{ $message['time'] }} -

-
-
-
-
- @endforeach -
-
-
-
-
-
-
- - @error('myNewMessage')

{{ $message }}

@enderror -
-
-
-
- -
-
-
-
-
-
-
- -
-
-
- -
-
-
-
diff --git a/resources/views/livewire/city/form/city-form.blade.php b/resources/views/livewire/city/form/city-form.blade.php deleted file mode 100644 index adff4037..00000000 --- a/resources/views/livewire/city/form/city-form.blade.php +++ /dev/null @@ -1,70 +0,0 @@ -
- {{-- HEADER --}} - -
- -
-

{{ __('City') }}

-
-
- - - {{ __('Back') }} - -
-
-
- -
-
-
- - - - - - - - - - - - - - - - - - - - - - - {{ __('Save') }} - - - -
-
-
-
-
diff --git a/resources/views/livewire/content-creator/form/content-creator-form.blade.php b/resources/views/livewire/content-creator/form/content-creator-form.blade.php deleted file mode 100644 index ca451a1d..00000000 --- a/resources/views/livewire/content-creator/form/content-creator-form.blade.php +++ /dev/null @@ -1,105 +0,0 @@ -
- {{-- HEADER --}} - - -
- -
-

{{ __('Lecturer/Content Creator') }}

-
-
- - - {{ __('Back') }} - -
-
-
- -
-
-
- - -
- @if ($image && str($image->getMimeType())->contains(['image/jpeg','image/jpg', 'image/png', 'image/gif', 'image/svg+xml', 'image/webp'])) -
{{ __('Preview') }}:
- - @endif - @if ($lecturer->getFirstMediaUrl('avatar')) -
{{ __('Current picture') }}:
- - @endif -
- - @error('image') {{ $message }} @enderror -
- - - - - - - - - - -
{{ __('For images in Markdown, please use eg. Imgur or another provider.') }}
- - @error('lecturer.intro') {{ $message }} @enderror - {{ __('This is the introduction text that is shown on the landing page.') }} -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ __('Save') }} - - - -
-
-
-
- - -
diff --git a/resources/views/livewire/frontend/footer.blade.php b/resources/views/livewire/frontend/footer.blade.php deleted file mode 100644 index 6ea04beb..00000000 --- a/resources/views/livewire/frontend/footer.blade.php +++ /dev/null @@ -1,57 +0,0 @@ - diff --git a/resources/views/livewire/frontend/header.blade.php b/resources/views/livewire/frontend/header.blade.php deleted file mode 100644 index aaba1c67..00000000 --- a/resources/views/livewire/frontend/header.blade.php +++ /dev/null @@ -1,112 +0,0 @@ -
- - -
diff --git a/resources/views/livewire/frontend/navigation/association.blade.php b/resources/views/livewire/frontend/navigation/association.blade.php deleted file mode 100644 index c1796fe4..00000000 --- a/resources/views/livewire/frontend/navigation/association.blade.php +++ /dev/null @@ -1,92 +0,0 @@ -
- -
-
-
-
-

{{ __('Association') }}

- -
-
-

{{ __('Manage') }}

- -
-
-
-

Recent posts

- - @foreach($projectProposals as $item) -
-
- -
-
-
-
-
{{ __('This project requires') }}
{{ number_format($item->support_in_sats, 0, ',', '.') }} {{ __('sats') }}
-
-

- - - {{ $item->name }} - -

-

- {{ __('Yes') }}: {{ $item->votes->where('value', 1)->count() }} / {{ __('No') }}: {{ $item->votes->where('value', 0)->count() }} -

-

- {{ __('From') }}: {{ $item->user->name }} -

-
-
- @endforeach - -
-
-
-
diff --git a/resources/views/livewire/frontend/navigation/bookcases.blade.php b/resources/views/livewire/frontend/navigation/bookcases.blade.php deleted file mode 100644 index 6ab15121..00000000 --- a/resources/views/livewire/frontend/navigation/bookcases.blade.php +++ /dev/null @@ -1,120 +0,0 @@ -
- -
-
- -
-

Recent posts

- - @foreach($orangePills as $item) - - @endforeach - -
-
-
-
diff --git a/resources/views/livewire/frontend/navigation/courses.blade.php b/resources/views/livewire/frontend/navigation/courses.blade.php deleted file mode 100644 index 2321a952..00000000 --- a/resources/views/livewire/frontend/navigation/courses.blade.php +++ /dev/null @@ -1,152 +0,0 @@ -
- -
-
- -
-

Recent posts

- - @foreach($courseEvents as $item) -
-
- {{ $item->course->lecturer->name }} -
-
-
-
- -
{{ $item->course->lecturer->name }}
-
-

- - - {{ $item->course->name }} - -

-

- {{ $item->course->description }} -

-
-
- @endforeach - -
-
-
-
diff --git a/resources/views/livewire/frontend/navigation/events.blade.php b/resources/views/livewire/frontend/navigation/events.blade.php deleted file mode 100644 index 99b24b02..00000000 --- a/resources/views/livewire/frontend/navigation/events.blade.php +++ /dev/null @@ -1,108 +0,0 @@ -
- -
-
- -
-

Recent posts

- - @foreach($bitcoinEvents as $item) - - @endforeach - -
-
-
-
diff --git a/resources/views/livewire/frontend/navigation/library.blade.php b/resources/views/livewire/frontend/navigation/library.blade.php deleted file mode 100644 index 16d996f7..00000000 --- a/resources/views/livewire/frontend/navigation/library.blade.php +++ /dev/null @@ -1,141 +0,0 @@ -
- -
-
- -
-

Recent posts

- - @foreach($libraryItems as $item) - - @endforeach - -
-
-
-
diff --git a/resources/views/livewire/frontend/navigation/meetups.blade.php b/resources/views/livewire/frontend/navigation/meetups.blade.php deleted file mode 100644 index 992e5182..00000000 --- a/resources/views/livewire/frontend/navigation/meetups.blade.php +++ /dev/null @@ -1,219 +0,0 @@ -
- -
-
- -
-

Recent posts

- - @foreach($meetups as $item) -
-
- -
-
-
-
- - -
-

- - - {{ $item->meetup->name }} - -

-

- {{ $item->location }} -

-
-
- @endforeach - -
-
-
-
diff --git a/resources/views/livewire/frontend/navigation/news.blade.php b/resources/views/livewire/frontend/navigation/news.blade.php deleted file mode 100644 index a2d2782d..00000000 --- a/resources/views/livewire/frontend/navigation/news.blade.php +++ /dev/null @@ -1,107 +0,0 @@ -
- -
-
-
- -
-

{{ __('Manage') }}

- -
-
-
-

Recent news article

- - @foreach($news as $item) - - @endforeach - -
-
-
-
diff --git a/resources/views/livewire/frontend/navigation/profile.blade.php b/resources/views/livewire/frontend/navigation/profile.blade.php deleted file mode 100644 index e018b836..00000000 --- a/resources/views/livewire/frontend/navigation/profile.blade.php +++ /dev/null @@ -1,109 +0,0 @@ -
- -
-
- -
-

Recent posts

- - {{--@foreach($orangePills as $item) - - @endforeach--}} - -
-
-
-
diff --git a/resources/views/livewire/frontend/navigation/settings.blade.php b/resources/views/livewire/frontend/navigation/settings.blade.php deleted file mode 100644 index c8ef326c..00000000 --- a/resources/views/livewire/frontend/navigation/settings.blade.php +++ /dev/null @@ -1,52 +0,0 @@ -
- -
-
-
-

{{ __('Settings') }}

- - - - -
-
-
-
diff --git a/resources/views/livewire/frontend/navigation_mobile/association.blade.php b/resources/views/livewire/frontend/navigation_mobile/association.blade.php deleted file mode 100644 index 9bd8ab4a..00000000 --- a/resources/views/livewire/frontend/navigation_mobile/association.blade.php +++ /dev/null @@ -1,24 +0,0 @@ -
- - -
diff --git a/resources/views/livewire/frontend/navigation_mobile/bookcases.blade.php b/resources/views/livewire/frontend/navigation_mobile/bookcases.blade.php deleted file mode 100644 index 30505897..00000000 --- a/resources/views/livewire/frontend/navigation_mobile/bookcases.blade.php +++ /dev/null @@ -1,32 +0,0 @@ - diff --git a/resources/views/livewire/frontend/navigation_mobile/courses.blade.php b/resources/views/livewire/frontend/navigation_mobile/courses.blade.php deleted file mode 100644 index 9878a269..00000000 --- a/resources/views/livewire/frontend/navigation_mobile/courses.blade.php +++ /dev/null @@ -1,30 +0,0 @@ - diff --git a/resources/views/livewire/frontend/navigation_mobile/events.blade.php b/resources/views/livewire/frontend/navigation_mobile/events.blade.php deleted file mode 100644 index a131a8da..00000000 --- a/resources/views/livewire/frontend/navigation_mobile/events.blade.php +++ /dev/null @@ -1,24 +0,0 @@ -
- - -
diff --git a/resources/views/livewire/frontend/navigation_mobile/library.blade.php b/resources/views/livewire/frontend/navigation_mobile/library.blade.php deleted file mode 100644 index 50ec1750..00000000 --- a/resources/views/livewire/frontend/navigation_mobile/library.blade.php +++ /dev/null @@ -1,26 +0,0 @@ -
- - -
diff --git a/resources/views/livewire/frontend/navigation_mobile/meetups.blade.php b/resources/views/livewire/frontend/navigation_mobile/meetups.blade.php deleted file mode 100644 index aabfd7ba..00000000 --- a/resources/views/livewire/frontend/navigation_mobile/meetups.blade.php +++ /dev/null @@ -1,28 +0,0 @@ - diff --git a/resources/views/livewire/frontend/navigation_mobile/news.blade.php b/resources/views/livewire/frontend/navigation_mobile/news.blade.php deleted file mode 100644 index 1b9f0e9f..00000000 --- a/resources/views/livewire/frontend/navigation_mobile/news.blade.php +++ /dev/null @@ -1,26 +0,0 @@ - diff --git a/resources/views/livewire/frontend/navigation_mobile/profile.blade.php b/resources/views/livewire/frontend/navigation_mobile/profile.blade.php deleted file mode 100644 index b9262485..00000000 --- a/resources/views/livewire/frontend/navigation_mobile/profile.blade.php +++ /dev/null @@ -1,27 +0,0 @@ -@auth -
- - -
-@endauth diff --git a/resources/views/livewire/frontend/search-tabs.blade.php b/resources/views/livewire/frontend/search-tabs.blade.php deleted file mode 100644 index dabdac4e..00000000 --- a/resources/views/livewire/frontend/search-tabs.blade.php +++ /dev/null @@ -1,31 +0,0 @@ -
-
-

{{ __('Search') }}

-
- - -
-
-
diff --git a/resources/views/livewire/frontend/welcome.blade.php b/resources/views/livewire/frontend/welcome.blade.php deleted file mode 100644 index 9f72a513..00000000 --- a/resources/views/livewire/frontend/welcome.blade.php +++ /dev/null @@ -1,198 +0,0 @@ -
-
- - -
-
-

{{ __('Einundzwanzig') }}

-

{{ __('Bitcoin Portal') }}

-

- {{ __('A Bitcoin community for all.') }} -

-
- - -
- @if(!auth()->check()) - - - {{ __('Login') }} - - @else -
- @csrf - - - {{ __('Logout') }} - -
- @endif -
-
-
- -
-
- {{-- FOOTER --}} -
- -
- - -
diff --git a/resources/views/livewire/guest/welcome.blade.php b/resources/views/livewire/guest/welcome.blade.php deleted file mode 100644 index 3c567588..00000000 --- a/resources/views/livewire/guest/welcome.blade.php +++ /dev/null @@ -1,94 +0,0 @@ -
-
-
- -
-
-

- Bitcoin {{ __('School') }} -

-

- {{ __('Find Bitcoin courses in your city') }} -

- - {{ __('👇 Find a course 👇') }} - -

{{-- TEXT --}}

-
-
- {{----}} - -
-
-
-
- -
-
-
-

{{ __('Search') }}

-
- -
- - -
- - -
-
- -
-
- -
diff --git a/resources/views/livewire/hello.blade.php b/resources/views/livewire/hello.blade.php deleted file mode 100644 index 663121bb..00000000 --- a/resources/views/livewire/hello.blade.php +++ /dev/null @@ -1,33 +0,0 @@ -
-
- @if(!$invoicePaid) -
- Deine Nachricht wird live vorgelesen. - Fülle zuerst das Textfeld mit deiner Nachricht aus - und bezahle erst danach mit Lightning. -
-
- -
-
- {{ __('Click QR-Code to open your wallet') }} -
-
- - qrcode - -
-
- 21 sats -
-
- @else -
- Danke für deine Nachricht. Wenn alles klappt, dann werden wir die Nachricht gleich hören. -
- @endif -
-
diff --git a/resources/views/livewire/library/form/library-item-form.blade.php b/resources/views/livewire/library/form/library-item-form.blade.php deleted file mode 100644 index f0a196ce..00000000 --- a/resources/views/livewire/library/form/library-item-form.blade.php +++ /dev/null @@ -1,216 +0,0 @@ -
- {{-- HEADER --}} - - -
- -
-

{{ __('Library Item') }}

-
-
- - - {{ __('Back') }} - -
-
-
- -
-
-
- - - -
-
- {{ __('Author') }} -
-
- - - {{ __('Create new author') }} - -
-
-
- -
- - - - - - - - - - - -
-
- {{ __('Tags') }} -
- @if(!$addTag) - - - {{ __('Add') }} - - @else - - - - - @endif -
-
-
- @foreach($tags as $tag) -
- @if(collect($selectedTags)->contains($tag['name'])) - - {{ $tag['name'] }} - - @else - - {{ $tag['name']}} - - @endif -
- @endforeach -
-
- - @if($libraryItem->lecturer_id && $libraryItem->type && $library && count($selectedTags) > 0) - -
- @if ($image && str($image->getMimeType())->contains(['image/jpeg','image/jpg', 'image/png', 'image/gif', 'image/svg+xml', 'image/webp'])) -
{{ __('Preview') }}:
- - @endif - @if ($libraryItem->getFirstMediaUrl('main')) -
{{ __('Current picture') }}:
- - @endif -
- - @error('image') {{ $message }} @enderror -
- - @if(!$isBindle) - - - - @endif - - - - - - @if(!$isBindle) - - - - - - - - - - - - @endif - - @if($libraryItem->type === App\Enums\LibraryItemType::MarkdownArticleExtern()) - -
{{ __('For images in Markdown, please use eg. Imgur or another provider.') }}
- - @error('libraryItem.value') {{ $message }} @enderror -
- @elseif($libraryItem->type !== App\Enums\LibraryItemType::DownloadableFile()) - - - - @elseif($libraryItem->type === App\Enums\LibraryItemType::DownloadableFile()) - - - @error('file') {{ $message }} @enderror - - @endif - - @if(!$isBindle) - - - - @endif - - - - - {{ __('Save') }} - - - @endif - -
-
-
-
- - -
diff --git a/resources/views/livewire/library/library-table.blade.php b/resources/views/livewire/library/library-table.blade.php deleted file mode 100644 index 30c44091..00000000 --- a/resources/views/livewire/library/library-table.blade.php +++ /dev/null @@ -1,184 +0,0 @@ -
- {{-- HEADER --}} - -
-
-
- - - {{ __('Submit contents') }} - -
- - -
- - - -
-
-
-
-
- {{-- MAIN --}} -
-
- -
-
- @if(request()->route()->getName() === 'library.table.lecturer') -

{{ __('Lecturer Libraries') }}

- @else -

{{ __('Libraries') }}

- @endif - {{ __('Reset filtering and search') }} -
-
- - {{--
- - -
--}} - - -
-
- - -
- -
- - @foreach($libraryItems as $libraryItem) - @php - $link = $isLecturerPage ? route('lecturerMaterial.view', ['libraryItem' => $libraryItem]) : route('libraryItem.view', ['libraryItem' => $libraryItem]); - @endphp -
-
- - {{ $libraryItem->name }} - -
-
-
-
-
{{ $libraryItem->tags->pluck('name')->join(', ') }}
-
- -

{{ $libraryItem->name }}

-

{{ strip_tags($libraryItem->excerpt) }}

-
-
-
-
-
- {{ $libraryItem->lecturer->name }} - {{ $libraryItem->lecturer->name }} -
-
-
-
-
{{ $libraryItem->lecturer->name }}
-
-
- - @if($libraryItem->read_time) - - {{ $libraryItem->read_time }} {{ __('min read') }} - @endif -
-
-
- - - {{ __('Edit') }} - -
-
-
-
-
-
- @endforeach - -
- - @if($libraryItems->hasMorePages()) - {{ __('load more...') }} - @endif - -
- -
-
-
- {{-- FOOTER --}} - - - -
diff --git a/resources/views/livewire/library/podcast-episodes-table.blade.php b/resources/views/livewire/library/podcast-episodes-table.blade.php deleted file mode 100644 index c34866dd..00000000 --- a/resources/views/livewire/library/podcast-episodes-table.blade.php +++ /dev/null @@ -1,130 +0,0 @@ -
- {{-- HEADER --}} - -
-
- - -
- - - -
-
-
-
-
- {{-- MAIN --}} -
-
- -
-
-

{{ __('Podcast Episodes') }}

- - {{ __('Reset filtering and search') }} - -
-
- -
- -
- - @foreach($episodes as $episode) -
-
- - {{ $episode->data['title'] }} - -
-
-
-
-
{{ __('Language') }}: {{ $episode->data['feedLanguage'] }}
-
- -

{{ $episode->data['title'] }}

-

{{ strip_tags($episode->data['description']) }}

-
-
-
-
-
- {{ $episode->podcast->title }} - {{ $episode->podcast->data['title'] }} -
-
-
-
-
{{ $episode->podcast->title }}
-
-
- - - {{ round($episode->data['duration'] / 60) }} {{ __('minutes') }} -
-
-
-
-
- @endforeach - -
- - @if($episodes->hasMorePages()) - {{ __('load more...') }} - @endif - -
- -
-
-
- {{-- FOOTER --}} - - - -
diff --git a/resources/views/livewire/library/search-by-tag-component.blade.php b/resources/views/livewire/library/search-by-tag-component.blade.php deleted file mode 100644 index 1d19dda3..00000000 --- a/resources/views/livewire/library/search-by-tag-component.blade.php +++ /dev/null @@ -1,52 +0,0 @@ - diff --git a/resources/views/livewire/meetup/embed/country-map.blade.php b/resources/views/livewire/meetup/embed/country-map.blade.php deleted file mode 100644 index 1a5ecd9b..00000000 --- a/resources/views/livewire/meetup/embed/country-map.blade.php +++ /dev/null @@ -1,50 +0,0 @@ -
- @php - $focus = ''; - $map = $country->code . '_merc'; - if (!\File::exists(public_path('vendor/jvector/maps/' . $country->code . '.js'))) { - $map = 'europe_merc'; - $focus = 'focusOn: {lat:'.$country->latitude.',lng:'.$country->longitude.',scale:8,animate:true},'; - } - @endphp -
-
-
-
diff --git a/resources/views/livewire/meetup/form/meetup-event-form.blade.php b/resources/views/livewire/meetup/form/meetup-event-form.blade.php deleted file mode 100644 index a163b1ad..00000000 --- a/resources/views/livewire/meetup/form/meetup-event-form.blade.php +++ /dev/null @@ -1,123 +0,0 @@ -
- {{-- HEADER --}} - - -
- -
-

{{ __('Meetup Event') }}

-
-
- @if($meetupEvent->id) - - - {{ __('Delete') }} - - @endif -
-
- - - {{ __('Back') }} - -
-
-
- -
-
-
- - - - - - - - - - @if(!$meetupEvent->id && $meetupEvent->start) - - -

{{ __('The recurring appointments are created in the database as new entries. Please be careful with this function, otherwise you will have to change or delete all the appointments you have created manually if you make an error.') }}

-
- @endif - - @if($recurring) - - - - @endif - - - - - - - - - - - - - - - @if($recurring && count($series) === $repetitions) -
- @for($i = 0; $i < $repetitions; $i++) - - @endfor -
- @endif -
- - - - - {{ __('Save') }} - - - -
-
-
-
-
diff --git a/resources/views/livewire/meetup/form/meetup-form.blade.php b/resources/views/livewire/meetup/form/meetup-form.blade.php deleted file mode 100644 index 45b09898..00000000 --- a/resources/views/livewire/meetup/form/meetup-form.blade.php +++ /dev/null @@ -1,137 +0,0 @@ -
- {{-- HEADER --}} - - -
- -
-

{{ __('Meetup') }}

-
- -
- - - {{ __('Back') }} - -
-
-
- -
-
-
- - -
- @if ($image && str($image->getMimeType())->contains(['image/jpeg','image/jpg', 'image/png', 'image/gif', 'image/svg+xml', 'image/webp'])) -
{{ __('Preview') }}:
- - @endif - @if ($meetup->getFirstMediaUrl('logo')) -
{{ __('Current picture') }}:
- - @endif -
- - @error('image') {{ $message }} @enderror -
- - - - - - - - - - - -
-
- {{ __('City/Area') }} -
- - - {{ __('New City') }} - -
-
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ __('Save') }} - - - -
-
-
-
-
diff --git a/resources/views/livewire/meetup/landing-page-event.blade.php b/resources/views/livewire/meetup/landing-page-event.blade.php deleted file mode 100644 index 3916139a..00000000 --- a/resources/views/livewire/meetup/landing-page-event.blade.php +++ /dev/null @@ -1,332 +0,0 @@ -
- - {{-- MAIN --}} -
-
- -
-
-
-
- -
- -
-
-
-
-

{{ $meetup->intro }}

-
-
- - - - {{ __('Download') }} - - -
-

{{ __('Confirmations') }}

-
-
    - - @foreach($attendees as $a) -
  • - {{ $a['name'] }} -
    -

    {{ $a['name'] }}

    -

    {{ __('Participation confirmed') }}

    -
    -
  • - @endforeach - -
- -
-

{{ __('Perhaps') }}

-
-
    - - @foreach($mightAttendees as $a) -
  • - {{ $a['name'] }} -
    -

    {{ $a['name'] }}

    -

    {{ __('Perhaps') }}

    -
    -
  • - @endforeach - -
-
- -
- -
-

{{ $meetup->name }}

-
-

- {{ __('When') }}: {{ $meetupEvent->start->asDateTime() }} -

-

- {{ __('Where') }}: {{ $meetupEvent->location }} -

-
- - {!! $meetupEvent->description !!} - -
-
- @if($meetupEvent->link) - - - {{ __('Event-Link') }} - - @endif -
-
-
-
- @if($meetup->telegram_link) - - - {{ __('Telegram-Link') }} - - @endif -
-
- @if($meetup->webpage) - - - {{ __('Website') }} - - @endif -
-
- @if($meetup->simplex) - - - {{ __('SimpleX') }} - - @endif -
-
- @if($meetup->matrix_group) - - - {{ __('Matrix-Group') }} - - @endif -
-
- @if($meetup->twitter_username) - - - {{ __('Twitter') }} - - @endif -
-
-
- - -
-
- -
-
{{ __('Confirmations') }}
-
{{ count($meetupEvent->attendees ?? []) }}
-
- -
-
{{ __('Perhaps') }}
-
{{ count($meetupEvent->might_attendees ?? []) }}
-
- -
- -
- -
- -
-
- @if(!$willShowUp && !$perhapsShowUp) -
- - - {{ __('I will show up') }} - -
- @else -
- - - {{ __('Unfortunately I cannot come') }} - -
- @endif -
-
- @if(!$perhapsShowUp && !$willShowUp) -
- - - {{ __('Might attend') }} - -
- @endif -
-
- -
- @auth - @else -
-
-
- - -
-
-

- {{ __('Remember that you are currently not logged in.') }} -

-
-
    -
  • {{ __('Your participation will only be saved for one week in the current browser session.') }}
  • -
  • {{ __('You cannot withdraw your participation after one week.') }}
  • -
  • {{ __('Log in so that you can edit your participation at any time.') }}
  • -
-
- - - {{ __('Login') }} - -
-
-
-
-
- @endauth -
-
-
-
-
- -
- -
- @push('modals') - - @auth - @else -
-
-
- - -
-
-

- {{ __('Remember that you are currently not logged in.') }} -

-
-
    -
  • {{ __('Your participation will only be saved for one week in the current browser session.') }}
  • -
  • {{ __('You cannot withdraw your participation after one week.') }}
  • -
  • {{ __('Log in so that you can edit your participation at any time.') }}
  • -
-
- - - {{ __('Login') }} - -
-
-
-
-
- @endauth -
- @endpush - {{-- FOOTER --}} - - - -
diff --git a/resources/views/livewire/meetup/landing-page.blade.php b/resources/views/livewire/meetup/landing-page.blade.php deleted file mode 100644 index a512dfd1..00000000 --- a/resources/views/livewire/meetup/landing-page.blade.php +++ /dev/null @@ -1,224 +0,0 @@ -
- - {{-- MAIN --}} -
-
-
-
-

- {{ $meetup->name }} - {{ __('Plebs together strong 💪') }} -

-
- - {!! $meetup->intro !!} - -
- - @if($meetup->telegram_link) - - - {{ __('Telegram-Link') }} - - @endif - @if($meetup->simplex) - - - {{ __('SimpleX-Link') }} - - @endif - @if($meetup->webpage) - - - {{ __('Website') }} - - @endif - @if($meetup->matrix_group) - - - {{ __('Matrix-Group') }} - - @endif - @if($meetup->twitter_username) - - - {{ __('Twitter') }} - - @endif - -
- -
- Logo -
-
-
- -
- -
-
-

- {{ __('Events') }} -

-
-
- -
    - @foreach($meetupEvents as $meetupEvent) - @php - $activeClass = $activeEvent === $meetupEvent->id ? 'bg-gradient-to-r from-amber-800 via-amber-600 to-amber-500' : 'bg-amber-500'; - @endphp -
  • -
    - {{--{{ $meetupEvent->meetup->name }}--}} -

    {{ $meetupEvent->start->asDateTime() }}

    -

    {{ $meetupEvent->location }}

    -
    -
    -
    -

    - -

    -
    -
    {!! nl2br($meetupEvent->description) !!}
    -
    -
    -
    -
    -
    - -
  • - @endforeach -
- -
- - @php - $locale = \Illuminate\Support\Facades\Cookie::get('lang', 'de'); - @endphp - - - - - - -
-
-
- -
- -
- -
- {{-- FOOTER --}} - - - -
diff --git a/resources/views/livewire/meetup/meetup-event-table.blade.php b/resources/views/livewire/meetup/meetup-event-table.blade.php deleted file mode 100644 index 4bb02f43..00000000 --- a/resources/views/livewire/meetup/meetup-event-table.blade.php +++ /dev/null @@ -1,189 +0,0 @@ -
- {{-- HEADER --}} - - {{-- MAIN --}} -
-
-
-
-
- - - {{ __('Calendar Stream-Url for all meetup events') }} - - @if(auth()->check() && auth()->user()->meetups->count() > 0) - - - {{ __('Calendar Stream-Url for my meetups only') }} - - @endif - - - {{ __('Copy embed code for the map') }} {{ $country->code }} - -
-
-
-
- - @php - $locale = \Illuminate\Support\Facades\Cookie::get('lang', 'de'); - @endphp - - - - - - -
-
-
-
- -
-
-
-
-

- {{ __('Meetup dates') }} -

-
-
- {{----}} -
-
- -
-
- {{-- FOOTER --}} - -
diff --git a/resources/views/livewire/meetup/meetup-table.blade.php b/resources/views/livewire/meetup/meetup-table.blade.php deleted file mode 100644 index 33b166b3..00000000 --- a/resources/views/livewire/meetup/meetup-table.blade.php +++ /dev/null @@ -1,108 +0,0 @@ -
- {{-- HEADER --}} - - {{-- MAIN --}} -
-
-
-
- - - {{ __('Calendar Stream-Url for all meetup events') }} - - @if(auth()->check() && auth()->user()->meetups->count() > 0) - - - {{ __('Calendar Stream-Url for my meetups only') }} - - @endif - - - {{ __('Copy embed code for the map') }} {{ $country->code }} - -
-
-
- @php - $focus = ''; - $map = $country->code . '_merc'; - if (!\File::exists(public_path('vendor/jvector/maps/' . $country->code . '.js'))) { - $map = 'europe_merc'; - $focus = 'focusOn: {lat:'.$country->latitude.',lng:'.$country->longitude.',scale:8,animate:true},'; - } elseif ($country->code === 'mx') { - $focus = 'focusOn: {lat:'.$country->latitude.',lng:'.$country->longitude.',scale:8,animate:true},'; - } - @endphp -
-
-
-
-
-
-
-
-

- {{ __('Meetups') }} -

-
-
- {{----}} -
-
- -
-
- {{-- FOOTER --}} - -
diff --git a/resources/views/livewire/meetup/prepare-for-btc-map-item.blade.php b/resources/views/livewire/meetup/prepare-for-btc-map-item.blade.php deleted file mode 100644 index 19187631..00000000 --- a/resources/views/livewire/meetup/prepare-for-btc-map-item.blade.php +++ /dev/null @@ -1,446 +0,0 @@ -
-
-
- - {{-- SEARCH PANEL --}} -
-
-
-

- {{ $meetup->name }} -

-
- -
- @if (!$model?->simplified_geojson || !$selectedItemOSMPolygons) -
-
- -
-
- Search -
-
- @else -
- - - Back - - -
-
-

- {{ $selectedItemOSMPolygons['display_name'] }} -

-

- -

-
-
-
-
-
- {{ $selectedItemOSMPolygons['type'] }} -
-
- OSM ID: {{ $selectedItemOSMPolygons['osm_id'] }} -
-
-
-
-
-
-
-
- -
-
- -
- - - -
-
-

- X, Y, Z are parameters for the following PostGIS equation. - The default values are chosen according to the size of the - original geometry to give a slighty bigger geometry, without - too many nodes. - -

-

Note that:

-

- X > 0 will give a polygon bigger than the original geometry, - and guaranteed to contain it. -

-

- X = 0 will give a polygon similar to the original geometry. -

-

- X < 0 will give a polygon smaller than the original - geometry, and guaranteed to be smaller.

-
-
- -
-
-
-
-
- @endif -
- @if (!$model?->simplified_geojson && $search) - - Now select the appropriate place so that a GeoJSON can be built. - - @endif -
-
- -
-
-
- @if ($search) -

- Search: {{ $search }} -

- @endif -
- -
-
-
    - - @foreach ($osmSearchResults as $item) - @php - $currentClass = $item['osm_id'] === $osm_id ? 'bg-amber-400 dark:bg-amber-900' : ''; - @endphp - -
  • -
    -
    -

    - {{ $item['display_name'] }}

    -

    - - {{ count($item['geojson']['coordinates'], COUNT_RECURSIVE) }} - points - -

    -
    -
    - {{ $item['type'] }} -
    -
    -
  • - @endforeach -
-
-
- -
-
-
-
- - {{-- Wikipedia Links --}} -
- @if ($search) - - @endif -
- - -
-
- - {{-- GeoJSON simplification --}} - @if ($model && $selectedItemOSMPolygons) -
-
-
-

- Mapshaper simplification of OSM GeoJSON - [{{ count($selectedItemOSMPolygons['geojson']['coordinates'], COUNT_RECURSIVE) }} - points] to - {{ count($model->simplified_geojson['coordinates'] ?? [], COUNT_RECURSIVE) }} points -

-
-
-
-

- (smaller percentage means fewer points - aim for no more than 150) -

- -
- -
-
- -
-
-
- @endif - - {{-- GeoJSON data --}} -
- @if ($model?->simplified_geojson && $selectedItemOSMPolygons) -
-
-
- @php - $jsonEncodedSelectedItem = json_encode($selectedItemOSMPolygons['geojson'], JSON_THROW_ON_ERROR); - @endphp -

- OSM GeoJSON - [{{ count($selectedItemOSMPolygons['geojson']['coordinates'] ?? [], COUNT_RECURSIVE) }} - points] -

-
-
-
{{ $jsonEncodedSelectedItem }}
-
- - Copy to clipboard - -
-
-
-
-
- @php - $jsonEncodedSimplifiedGeoJson = json_encode($model->simplified_geojson, JSON_THROW_ON_ERROR); - @endphp -

- Simplified GeoJSON - [{{ count($model->simplified_geojson['coordinates'] ?? [], COUNT_RECURSIVE) }} - points] -

-
-
-
{{ $jsonEncodedSimplifiedGeoJson }}
-
- - Save on model - -
-
-
-
- @if ($selectedItemOSMBoundaries) -
- @php - $jsonEncodedGeoJsonWater = json_encode($selectedItemOSMBoundaries, JSON_THROW_ON_ERROR); - @endphp -

- https://osm-boundaries.com water GeoJSON - [{{ count($selectedItemOSMBoundaries['coordinates'], COUNT_RECURSIVE) }} - points] -

-
-
-
{{ $jsonEncodedGeoJsonWater }}
-
- - Copy to clipboard - -
-
-
-
- @endif - @if ($selectedItemPolygonsOSMfr) -
- @php - $jsonEncodedGeoJsonOSMFr = json_encode($selectedItemPolygonsOSMfr, JSON_THROW_ON_ERROR); - @endphp -

- https://polygons.openstreetmap.fr GeoJSON - - @if ($selectedItemPolygonsOSMfr['type'] !== 'GeometryCollection') - [{{ count($selectedItemPolygonsOSMfr['coordinates'] ?? [], COUNT_RECURSIVE) }} - points] - @endif - -

-
-
-
{{ $jsonEncodedGeoJsonOSMFr }}
-
- - Copy to clipboard - -
-
-
-
- @endif -
- -
-
-
-

- GeoJSON preview -

-
-
-
-
-
-
-
- @endif -
- -
-

- GeoJSON helper is maintained by HolgerHatGarKeineNode [npub1pt0kw36ue3w2g4haxq3wgm6a2fhtptmzsjlc2j2vphtcgle72qesgpjyc6]. - This - software is open-sourced software - licensed under the MIT license. -

-
-
-
- - -
diff --git a/resources/views/livewire/meetup/world-map.blade.php b/resources/views/livewire/meetup/world-map.blade.php deleted file mode 100644 index 07def757..00000000 --- a/resources/views/livewire/meetup/world-map.blade.php +++ /dev/null @@ -1,74 +0,0 @@ -
- {{-- HEADER --}} - - {{-- MAIN --}} -
-
-
-
-
-
-
- -
-
-
-
-

- {{ __('Meetups') }} -

-
-
- {{----}} -
-
- -
-
- {{-- FOOTER --}} - - - -
diff --git a/resources/views/livewire/news/article-overview.blade.php b/resources/views/livewire/news/article-overview.blade.php deleted file mode 100644 index a45fca0a..00000000 --- a/resources/views/livewire/news/article-overview.blade.php +++ /dev/null @@ -1,216 +0,0 @@ -
- @push('feeds') - - @endpush - - - - -
-
-
-
-
-
-
- -
-
- @if(isset($filters['author'])) - {{ __('Reset filtering') }} - - @endif - @auth - - - {{ __('Submit news articles') }} - - @if(auth()->check() && auth()->user()->lnbits['wallet_id'] ?? false) - - - {{ __('Submit paid news article') }} - - - @elseif(auth()->check()) - - - {{ __('Setup LNBits for paid articles') }} - - - @endif - @endauth -
-
-
- - @foreach($libraryItems as $libraryItem) - @if($libraryItem->approved || $libraryItem->created_by === auth()->id() || auth()->user()?->hasRole('news-editor')) -
- @if($libraryItem->sats) -
-
- {{ number_format($libraryItem->sats, 0, ',', '.') }} {{ __('sats') }} -
-
- @endif -
- - {{ $libraryItem->name }} - -
-
-
-
-
{{ $libraryItem->tags->pluck('name')->join(', ') }}
-
- -

{{ $libraryItem->name }}

-

{{ strip_tags($libraryItem->excerpt) }}

-
-
-
-
-
- {{ $libraryItem->lecturer->name }} - {{ $libraryItem->lecturer->name }} -
-
-
-
-
{{ $libraryItem->lecturer->name }}
-
-
- - @if($libraryItem->read_time) - - {{ $libraryItem->read_time }} {{ __('min read') }} - @endif -
-
- @if($libraryItem->created_by === auth()->id() || auth()->user()?->hasRole('news-editor')) -
- @if($libraryItem->approved) -
- {{ __('approved') }} -
- @else -
- {{ __('not approved') }} -
- @endif -
-
- @if($libraryItem->approved && auth()->user()?->hasRole('news-editor') && !$libraryItem->nostr_status) -
- - - {{ __('Publish on Nostr') }} - -
- @endif - @if($libraryItem->approved && $libraryItem->nostr_status) -
- - - {{ __('nostr') }} - -
- @endif -
-
- @if(!$libraryItem->approved && auth()->user()?->hasRole('news-editor')) - - - {{ __('Approve') }} - - @endif -
-
- - - {{ __('Edit') }} - -
- @endif -
-
-
-
-
- @endif - @endforeach - -
- -
-
-
- - {{-- FOOTER --}} - - - @push('modals') - - @endpush -
diff --git a/resources/views/livewire/news/authors-overview.blade.php b/resources/views/livewire/news/authors-overview.blade.php deleted file mode 100644 index 34c6420b..00000000 --- a/resources/views/livewire/news/authors-overview.blade.php +++ /dev/null @@ -1,50 +0,0 @@ -
- {{-- HEADER --}} - - -
-
-
-

{{ __('News articles writer') }}

-

- {{ __('Click on any of the authors to see their articles.') }} -

-
- -
-
- - -
diff --git a/resources/views/livewire/news/form/news-article-form.blade.php b/resources/views/livewire/news/form/news-article-form.blade.php deleted file mode 100644 index 8556328e..00000000 --- a/resources/views/livewire/news/form/news-article-form.blade.php +++ /dev/null @@ -1,216 +0,0 @@ -
- {{-- HEADER --}} - - -
- -
- @if($paid) -

{{ __('Paid News Article') }}

- @else -

{{ __('News Article') }}

- @endif -
-
- @if($libraryItem->created_by === auth()->id()) - - - {{ __('Delete') }} - - @endif -
-
- - - {{ __('Back') }} - -
-
-
- -
-
-
- - @if($paid) - - - - @endif - - - -
-
- {{ __('Author') }} -
- - - {{ __('Create new author') }} - -
-
- -
- - - -
-
- {{ __('Tags') }} -
- @if(!$addTag) - - - {{ __('Add') }} - - @else - - - - - @endif -
-
-
-
- @foreach($tags as $tag) -
- @if(collect($selectedTags)->contains($tag['name'])) - - {{ $tag['name'] }} - - @else - - {{ $tag['name'] }} - - @endif -
- @endforeach -
- @error('selectedTags') -
{{ $message }}
- @enderror -
-
- - @if($libraryItem->lecturer_id) - -
- @if ($image && str($image->getMimeType())->contains(['image/jpeg','image/jpg', 'image/png', 'image/gif', 'image/svg+xml', 'image/webp'])) -
{{ __('Preview') }}:
- - @endif - @if ($libraryItem->getFirstMediaUrl('main')) -
{{ __('Current picture') }}:
- - @endif -
- - @error('image') {{ $message }} @enderror -
- - - - - - - - - - - - - - - - - - - - - - -
{{ __('For images in Markdown, please use eg. Imgur or another provider.') }}
- - @error('libraryItem.value') {{ $message }} @enderror -
- - @if($paid) - -
{{ __('For images in Markdown, please use eg. Imgur or another provider.') }}
- - @error('libraryItem.value_to_be_paid') {{ $message }} @enderror -
- @endif - - - - - - - - - {{ __('Save') }} - - - @endif - -
-
-
- -
- - -
diff --git a/resources/views/livewire/news/intern-article-view.blade.php b/resources/views/livewire/news/intern-article-view.blade.php deleted file mode 100644 index 8f968ac0..00000000 --- a/resources/views/livewire/news/intern-article-view.blade.php +++ /dev/null @@ -1,356 +0,0 @@ -
- @googlefonts('article') - {{-- HEADER --}} - - -
-
-
- -
-
-
-
-
-

{{ $libraryItem->tags->pluck('name')->join(', ') }}

-

{{ $libraryItem->name }}

-
-
-
-
-
- {{ $libraryItem->lecturer->name }} - {{ $libraryItem->lecturer->name }} -
-
-
-
-
{{ $libraryItem->lecturer->name }}
-
-
- - @if($libraryItem->read_time) - - {{ $libraryItem->read_time }} {{ __('min read') }} - @endif -
-
-
-
-
-
-
- {{ $libraryItem->name }} -
- - - {{ $libraryItem->main_image_caption ?? $libraryItem->name }} -
-
-
-
-
- -
-
- - {!! $libraryItem->subtitle !!} - -
-
-
-
- @if($libraryItem->type !== 'markdown_article' && str($libraryItem->value)->contains('http')) - @if($libraryItem->type === 'youtube_video') - - - {{ __('Open on Youtube') }} - - @elseif($libraryItem->type !== 'markdown_article' && $libraryItem->type !== 'markdown_article_extern') - - - {{ __('Open') }} - - @endif - @endif - @if($libraryItem->type === 'downloadable_file') - - - {{ __('Download') }} - - @endif - @if($libraryItem->type === 'podcast_episode') - - - {{ __('Listen') }} - - @endif - @if($libraryItem->type !== 'markdown_article') - - - {{ __('Share link') }} - - @elseif($libraryItem->news) - - - {{ __('Share link') }} - - @else - @endif -
- - @if($libraryItem->type === 'youtube_video') -
- -
- @endif - - @if($libraryItem->type === 'markdown_article' || $libraryItem->type === 'markdown_article_extern') - - {!! $libraryItem->value !!} - - @endif -
- - @if($libraryItem->sats && !$invoicePaid) -
-
-

- {{ __('You can read the full article if you paid with Lightning') }} -

-
-
-
-
- {{ $libraryItem->lecturer->name }} - {{ $libraryItem->lecturer->name }} -
-
-
-
-
{{ __('Receiver') }} - : {{ $libraryItem->lecturer->name }}
-
-
- -
-
-
-
- @if(!$invoice) -
- - - Pay with lightning - -
{{ __('already paid?') }} -
-
- @else -
-
- {{ __('Click QR-Code to open your wallet') }} -
-
- - qrcode - -
-
- @endif - @if(!$invoice) - - @endif - @if($alreadyPaid) -
-
-
- - - -
-
- @if($checkThisPaymentHash) -
- @endif -
- @endif - @if($invoice) -
-
-
- -
-
- - - {{ __('Copy payment hash') }} - -
-
-

{{ __('As a guest, please save your payment hash so that you can unlock this article later. Unfortunately, we cannot save your purchase status permanently for guests. Please log in to use this feature.') }}

-
-
-
-
- @endif -
-
- @else -
- - - {!! $libraryItem->value_to_be_paid !!} - - -
- @endif - - @if($payNymQrCode) -
-

PayNym

-
- qrcode -
-
- @endif - -
-
- @if($libraryItem->lecturer->lightning_address || $libraryItem->lecturer->lnurl || $libraryItem->lecturer->node_id) -

value-4-value

-
- -
- @endif -
- - -
- -
-
-
-
-
-
- - {{-- FOOTER --}} - - -
- - @push('modals') - - @endpush -
diff --git a/resources/views/livewire/nostr/plebs-overview.blade.php b/resources/views/livewire/nostr/plebs-overview.blade.php deleted file mode 100644 index 9e2f6077..00000000 --- a/resources/views/livewire/nostr/plebs-overview.blade.php +++ /dev/null @@ -1,317 +0,0 @@ -
- {{-- HEADER --}} - - -
-
-
-

{{ __('Follow Einundzwanzig plebs') }}

-

- {{ __('An overview of all Einundzwanzig plebs who have shared their npub.') }} -

- @auth -

- {{ __('Go to your profile and add your Nostr-npub. After that you can also log in with Nostr here on the portal.') }} -
- {{ __('Profile') }} -

- @endauth -

- -

-

- {{ __('Log in with your Nostr Extension so you can follow all plebs with one click.') }} -

-

- {{ __('Logged into Nostr as:') }} -

- - -
- -
-
-
- -
-
- - - {{ __('Follow all') }} - -
-
- -
-

- You should stack sats as long as this page loads here. This is a low time preference loading bar. 🤙 -

- -
-
-
-
- running-nostr - Loadingstr... -
- -
-

- You should stack sats as long as this page loads here. This is a low time preference loading bar. 🤙 -

- -
-
-
-
- running-nostr - Followstr... -
- -
    - - - -
-
-
-
- - {{-- FOOTER --}} - -
diff --git a/resources/views/livewire/nostr/start.blade.php b/resources/views/livewire/nostr/start.blade.php new file mode 100644 index 00000000..b2b426d8 --- /dev/null +++ b/resources/views/livewire/nostr/start.blade.php @@ -0,0 +1,3 @@ +
+ {{-- Because she competes with no one, no one can compete with her. --}} +
diff --git a/resources/views/livewire/profile/l-n-bits.blade.php b/resources/views/livewire/profile/l-n-bits.blade.php deleted file mode 100644 index a6014505..00000000 --- a/resources/views/livewire/profile/l-n-bits.blade.php +++ /dev/null @@ -1,53 +0,0 @@ -
- {{-- HEADER --}} - -
-
-
-
-

- {{ __('LNBits') }} -

-

- {{ __('Enter the data of your LNBits instance here to receive sats for articles, for example.') }} -

-
-
-
- -
- -
-
-
- - - - - - - - - - - - - - - - - {{ __('Save') }} - - - -
-
-
- -
-
-
diff --git a/resources/views/livewire/profile/meetups.blade.php b/resources/views/livewire/profile/meetups.blade.php deleted file mode 100644 index 9bb2c30a..00000000 --- a/resources/views/livewire/profile/meetups.blade.php +++ /dev/null @@ -1,109 +0,0 @@ -
- {{-- HEADER --}} - - -
-
-
-

- {{ __('My meetups') }} -

-

- {{ __('Select one or more meetup groups so that you can get access to these groups in the backend.') }} -

-
-
-
- -
- -
-

- {{ __('Your current Meetup groups') }} -

-
- @foreach($myMeetupNames as $myMeetup) - - - - @endforeach -
-
- -
-
-
- -
- - -
- - - -
-
-
-
- -
- -
    - - @foreach($meetups as $meetup) - - @php - $activeClass = in_array($meetup->id, $myMeetups, true) ? 'font-bold text-amber-500' : 'text-gray-200'; - @endphp - -
  • -
    -
    - {{ $meetup->name }} -
    -
    -

    {{ $meetup->name }}

    -

    {{ $meetup->city->name }}

    -
    -
    - @if(in_array($meetup->id, $myMeetups, true)) - - - {{ __('Deselect') }} - - @else - - - {{ __('Select') }} - - @endif -
    -
    -
  • - @endforeach - -
-
-
-
-
-
-
diff --git a/resources/views/livewire/project-proposal/form/project-proposal-form.blade.php b/resources/views/livewire/project-proposal/form/project-proposal-form.blade.php deleted file mode 100644 index 35ea0e3b..00000000 --- a/resources/views/livewire/project-proposal/form/project-proposal-form.blade.php +++ /dev/null @@ -1,75 +0,0 @@ -
- {{-- HEADER --}} - - -
- -
-

{{ __('Project Proposal') }}

-
-
- - - {{ __('Back') }} - -
-
-
- -
-
-
- - -
- @if ($image && str($image->getMimeType())->contains(['image/jpeg','image/jpg', 'image/png', 'image/gif', 'image/svg+xml', 'image/webp'])) -
{{ __('Preview') }}:
- - @endif - @if ($projectProposal->getFirstMediaUrl('main')) -
{{ __('Current picture') }}:
- - @endif -
- - @error('image') {{ $message }} @enderror -
- - - - - - - - - - - -
- {{ __('Project description') }} -
-
{{ __('Please write a detailed and understandable application text, so that the vote on a possible support can take place.') }}
-
-
{{ __('For images in Markdown, please use eg. Imgur or another provider.') }}
- - @error('projectProposal.description') {{ $message }} @enderror -
- - - - - {{ __('Save') }} - - -
-
-
-
- - -
diff --git a/resources/views/livewire/project-proposal/project-proposal-table.blade.php b/resources/views/livewire/project-proposal/project-proposal-table.blade.php deleted file mode 100644 index 285cb9fe..00000000 --- a/resources/views/livewire/project-proposal/project-proposal-table.blade.php +++ /dev/null @@ -1,22 +0,0 @@ -
- {{-- HEADER --}} - - {{-- MAIN --}} -
-
-
-
-

- {{ __('Submitted projects') }} -

-
-
- {{----}} -
-
- -
-
- {{-- FOOTER --}} - -
diff --git a/resources/views/livewire/project-proposal/project-proposal-voting.blade.php b/resources/views/livewire/project-proposal/project-proposal-voting.blade.php deleted file mode 100644 index b9e6be49..00000000 --- a/resources/views/livewire/project-proposal/project-proposal-voting.blade.php +++ /dev/null @@ -1,240 +0,0 @@ -
- {{-- HEADER --}} - - -
- -
-

{{ __('Voting') }} - : {{ $projectProposal->name }}

- {{ $projectProposal->name }} -
-
- - - {{ __('Back') }} - -
-
-
- -
-
-
- -
-
-

{{ __('Submitted by') }}

-
- -
-
-
-
- {{ $projectProposal->user->name }} - {{ $projectProposal->user->name }} -
-
-
-
-
{{ $projectProposal->user->name }}
-
-
- {{ __('This project requires') }} {{ number_format($projectProposal->support_in_sats, 0, ',', '.') }} {{ __('sats') }} -
-
-
-
- -
-

{{ __('Description') }}

-
- -
- - {!! $projectProposal->description !!} - -
-
- -
-
- - {{ __('Yes, support it!') }} - - - {{ __('No') }} - -
- {{ __('Your vote') }}: - @php - $myVote = $projectProposal->votes->where('user_id', auth()->id())->first(); - @endphp - @if($myVote && $myVote->value) - {{ __('Yes') }} - @endif - @if($myVote && !$myVote->value) - {{ __('No') }} - @endif - @if(!$myVote) - {{ __('not voted yet') }} - @endif -
-
- -
- - - -
- -
- - -
-
-
-
- -
- -
-
-

{{ __('Entitled voters') }}

-
- -
    - - @foreach($entitledVoters as $voter) - @php - $vote = $voter->votes->first(); - if (!$vote) { - $text = __('not voted yet'); - } elseif ($vote && !$vote->value) { - $text = __('Reason') . ': ' . $voter->votes->first()?->reason; - } else { - $text = ''; - } - @endphp -
  • - -
    -

    - {{ $voter->name }} - @if($voter->votes->first()?->value) - {{ __('Yes') }} - @endif - @if($voter->votes->first() && !$voter->votes->first()?->value) - {{ __('No') }} - @endif -

    -

    - {{ $text ?? '' }} -

    -
    -
  • - @endforeach - -
-
- -
-
-

{{ __('Other voters') }}

-
- -
    - - @foreach($otherVoters as $voter) - @php - $vote = $voter->votes->first(); - if (!$vote) { - $text = __('not voted yet'); - } elseif ($vote && !$vote->value) { - $text = __('Reason') . ': ' . $voter->votes->first()?->reason; - } else { - $text = ''; - } - @endphp -
  • - -
    -

    - {{ $voter->name }} - @if($voter->votes->first()?->value) - {{ __('Yes') }} - @endif - @if($voter->votes->first() && !$voter->votes->first()?->value) - {{ __('No') }} - @endif -

    -

    - {{ $text ?? '' }} -

    -
    -
  • - @endforeach - -
-
- -
-
- -
-
-
-
- - -
diff --git a/resources/views/livewire/school/city-table.blade.php b/resources/views/livewire/school/city-table.blade.php deleted file mode 100644 index 55c0f059..00000000 --- a/resources/views/livewire/school/city-table.blade.php +++ /dev/null @@ -1,22 +0,0 @@ -
- {{-- HEADER --}} - - {{-- MAIN --}} -
-
-
-
-

- {{ __('City search') }} -

-
-
- {{----}} -
-
- -
-
- {{-- FOOTER --}} - -
diff --git a/resources/views/livewire/school/course-table.blade.php b/resources/views/livewire/school/course-table.blade.php deleted file mode 100644 index 632af8c9..00000000 --- a/resources/views/livewire/school/course-table.blade.php +++ /dev/null @@ -1,24 +0,0 @@ -
- {{-- HEADER --}} - - {{-- MAIN --}} -
-
-
-
-

- {{ __('Courses') }} -

-
-
- {{----}} -
-
- -{{-- --}} - -
-
- {{-- FOOTER --}} - -
diff --git a/resources/views/livewire/school/event-table.blade.php b/resources/views/livewire/school/event-table.blade.php deleted file mode 100644 index 55337dcf..00000000 --- a/resources/views/livewire/school/event-table.blade.php +++ /dev/null @@ -1,141 +0,0 @@ -
- {{-- HEADER --}} - - {{-- MAIN --}} -
-
-
-
- - @php - $locale = \Illuminate\Support\Facades\Cookie::get('lang', 'de'); - @endphp - - - - - - - -
-
-
-
- -
- -
-
-

- {{ __('Course Events') }} -

-
-
- {{----}} -
-
- -
-
- {{-- FOOTER --}} - -
diff --git a/resources/views/livewire/school/form/course-event-form.blade.php b/resources/views/livewire/school/form/course-event-form.blade.php deleted file mode 100644 index e838dd9a..00000000 --- a/resources/views/livewire/school/form/course-event-form.blade.php +++ /dev/null @@ -1,127 +0,0 @@ -
- {{-- HEADER --}} - - -
- -
-

{{ __('Course Event') }}

-
- -
- - - {{ __('Back') }} - -
-
-
- -
-
-
- - - -
-
- {{ __('Course') }} -
- - - {{ __('Register course') }} - -
-
- -
- - - -
-
- {{ __('Venue') }} -
- - - {{ __('Create venue') }} - -
-
- -
- - - - - - - - - - - - - - - - - {{ __('Save') }} - - - -
-
-
-
- -
diff --git a/resources/views/livewire/school/form/course-form.blade.php b/resources/views/livewire/school/form/course-form.blade.php deleted file mode 100644 index 3a385541..00000000 --- a/resources/views/livewire/school/form/course-form.blade.php +++ /dev/null @@ -1,107 +0,0 @@ -
- {{-- HEADER --}} - - -
- -
-

{{ __('Course') }}

-
- -
- - - {{ __('Back') }} - -
-
-
- -
-
-
- - -
- @if ($image && str($image->getMimeType())->contains(['image/jpeg','image/jpg', 'image/png', 'image/gif', 'image/svg+xml', 'image/webp'])) -
{{ __('Preview') }}:
- - @endif - @if ($course->getFirstMediaUrl('logo')) -
{{ __('Current picture') }}:
- - @endif -
- - @error('image') {{ $message }} @enderror -
- - - - - - - - - - -
- @foreach($tags as $tag) -
- @if(collect($selectedTags)->contains($tag->name)) - - {{ $tag->name }} - - @else - - {{ $tag->name }} - - @endif -
- @endforeach -
-
- - -
{{ __('For images in Markdown, please use eg. Imgur or another provider.') }}
- - @error('course.description') {{ $message }} @enderror -
- - - - - {{ __('Save') }} - - - -
-
-
-
- - -
diff --git a/resources/views/livewire/school/lecturer-landing-page.blade.php b/resources/views/livewire/school/lecturer-landing-page.blade.php deleted file mode 100644 index ec6d7718..00000000 --- a/resources/views/livewire/school/lecturer-landing-page.blade.php +++ /dev/null @@ -1,205 +0,0 @@ -
- - {{-- MAIN --}} -
-
-
-
-

- {{ $lecturer->name }} - {{ $lecturer->subtitle }} -

-
- {{ $lecturer->intro }} -
-
- -
- Avatar -
-
- -
- -
- -
-
-

- {{ __('Courses') }} -

-

- {{ __('All courses of :name', ['name' => $lecturer->name]) }} -

-
-
- -
    - @foreach($courseEvents as $courseEvent) - @php - $activeClass = $activeEvent === $courseEvent->id ? 'bg-gradient-to-r from-amber-800 via-amber-600 to-amber-500' : 'bg-amber-500'; - @endphp -
  • -
    - {{ $courseEvent->course->name }} -

    {{ $courseEvent->from->asDate() }}

    -

    {{ $courseEvent->venue->city->name }}

    -

    {{ $courseEvent->venue->name }}

    -
    -
    -
    -

    - -

    -
    -
    {!! nl2br($courseEvent->course->description) !!}
    -
    -
    -
    -
    - @foreach($courseEvent->course->tags as $tag) - {{ $tag->name }} - @endforeach -
    -
    -
    - -
  • - @endforeach -
- -
-
-

- {{ __('Events') }} -

-

- {{ __('Here you can see all events of :name.', ['name' => $lecturer->name]) }} -

-
-
- -
- - @php - $locale = \Illuminate\Support\Facades\Cookie::get('lang', 'de'); - @endphp - - - - - - -
-
-
- -
- - - {{ __('Back') }} - -
-
- -
- -
- {{-- FOOTER --}} - - - -
diff --git a/resources/views/livewire/school/lecturer-table.blade.php b/resources/views/livewire/school/lecturer-table.blade.php deleted file mode 100644 index ada92af1..00000000 --- a/resources/views/livewire/school/lecturer-table.blade.php +++ /dev/null @@ -1,22 +0,0 @@ -
- {{-- HEADER --}} - - {{-- MAIN --}} -
-
-
-
-

- {{ __('Lecturers/Content Creators') }} -

-
-
- {{----}} -
-
- -
-
- {{-- FOOTER --}} - -
diff --git a/resources/views/livewire/school/search-by-tag-component.blade.php b/resources/views/livewire/school/search-by-tag-component.blade.php deleted file mode 100644 index 5f48d38e..00000000 --- a/resources/views/livewire/school/search-by-tag-component.blade.php +++ /dev/null @@ -1,52 +0,0 @@ -
- @foreach($tags->sortBy('name') as $tag) -
- @php - $isActive = collect($courses)->pluck('tag')->collapse()->contains($tag->name); - $activeClass = $isActive ? 'text-amber-500 bg-amber-500' : 'bg-blue-50 text-white hover:text-amber-500'; - @endphp - -
-
- -
-
-

- {{ $tag->name }} -

- -
-
-
-
- @endforeach -
diff --git a/resources/views/livewire/school/venue-table.blade.php b/resources/views/livewire/school/venue-table.blade.php deleted file mode 100644 index 6d2b9264..00000000 --- a/resources/views/livewire/school/venue-table.blade.php +++ /dev/null @@ -1,22 +0,0 @@ -
- {{-- HEADER --}} - - {{-- MAIN --}} -
-
-
-
-

- {{ __('Venues') }} -

-
-
- {{----}} -
-
- -
-
- {{-- FOOTER --}} - -
diff --git a/resources/views/livewire/specials/baltic-sea-circle.blade.php b/resources/views/livewire/specials/baltic-sea-circle.blade.php deleted file mode 100644 index bdf3fc60..00000000 --- a/resources/views/livewire/specials/baltic-sea-circle.blade.php +++ /dev/null @@ -1,87 +0,0 @@ -
- - -
- - Bitcoin Team 218 - logo - -
-
-
-

Start am 17.06.2023 09:30 Uhr

-

Baltic Sea Circle Rally - Bitcoin Team 218

-

Besucht das Bitcoin Team 218 von Daktari und - Cercatrova.

-

Gut Barsthorst, Hamburg

-

- - - Musik Jukebox - -

-

- - - Tracking - -

-
-

⚡ Lightning Hupe

- - qr - -

- Proof Of Honk - LN Fanfare Team 218 -

-
-
-
- - - - @push('modals') - - @endpush -
diff --git a/resources/views/livewire/venue/form/venue-form.blade.php b/resources/views/livewire/venue/form/venue-form.blade.php deleted file mode 100644 index 10fa2a64..00000000 --- a/resources/views/livewire/venue/form/venue-form.blade.php +++ /dev/null @@ -1,115 +0,0 @@ -
- {{-- HEADER --}} - -
- -
-

{{ __('Venue') }}

-
- {{--
- @if($venue->id) - - - {{ __('Delete') }} - - @endif -
--}} -
- - - {{ __('Back') }} - -
-
-
- -
-
-
- - -
- @if ($images) -
- @foreach($images as $image) - @if(str($image->getMimeType())->contains(['image/jpeg','image/jpg', 'image/png', 'image/gif', 'image/svg+xml', 'image/webp'])) -
-
{{ __('Preview') }}:
- -
- @endif - @endforeach -
- @endif - @if ($venue->getMedia('images')) -
{{ __('Current pictures') }}:
-
- @foreach($venue->getMedia('images') as $image) -
-
- -
-
- - - {{ __('Delete') }} - -
-
- @endforeach -
- @endif -
- -
- - - -
-
- {{ __('City') }} -
- - - {{ __('New City') }} - -
-
- -
- - - - - - - - - - - - - {{ __('Save') }} - - - -
-
-
-
-
diff --git a/resources/views/livewire/wallet/lightning-wallet.blade.php b/resources/views/livewire/wallet/lightning-wallet.blade.php deleted file mode 100644 index 31546cc1..00000000 --- a/resources/views/livewire/wallet/lightning-wallet.blade.php +++ /dev/null @@ -1,104 +0,0 @@ - - - - - -
- -
- -
- {{ __('Now log in with a new wallet') }} ⚡ -
- -
-
-
- -
-
-

{{ __('Caution') }}

-
-
    -
  • {{ __('You overwrite your user\'s public key and then have to log in with the wallet, which you now use to scan or log in.') }}
  • -
  • {{ __('You are logged in as:') }} {{ auth()->user()->name }}
  • -
-
-
-
-
- - @if(!$confirmed) -
- - - {{ __('Confirm') }} - - - - {{ __('Cancel') }} - -
- @endif - - @if($confirmed) -
- - qrcode - -
-
- -
-
-
- - - {{ __('Copy') }} - -
-
- - {{ __('Click to connect') }} - - - - - -
-
- -
- {{ __('Scan this code or copy & paste it to your lightning wallet. Or click to login with your wallet.') }} -
- @endif -
- -
- -
-
diff --git a/resources/views/modals/events/register.blade.php b/resources/views/modals/events/register.blade.php deleted file mode 100644 index d70f3d39..00000000 --- a/resources/views/modals/events/register.blade.php +++ /dev/null @@ -1,68 +0,0 @@ - - -
- {{ __('Registration') }} -
-
- - -
- -
-
- - -
-
-

{{ $currentModal?->course->name }}

-
-

{{ __('Lecturer') }}: {{ $currentModal?->course->lecturer->name }}

- {{ $currentModal?->course->lecturer->name }} -
-

{{ __('Von') }}: {{ $currentModal?->from->asDateTime() }}

-

{{ __('Bis') }}: {{ $currentModal?->to->asDateTime() }}

- {{ __('Link to the registration') }} -
- - {!! $currentModal?->course->description !!} - -
- {{ __('Link to the registration') }} -
-
-
-
-
-
- - - - @lang('Done') - - -
diff --git a/resources/views/navigation-menu.blade.php b/resources/views/navigation-menu.blade.php deleted file mode 100644 index a08e4cd5..00000000 --- a/resources/views/navigation-menu.blade.php +++ /dev/null @@ -1,271 +0,0 @@ - diff --git a/resources/views/policy.blade.php b/resources/views/policy.blade.php deleted file mode 100644 index e660b996..00000000 --- a/resources/views/policy.blade.php +++ /dev/null @@ -1,13 +0,0 @@ - -
-
-
- -
- -
- {!! $policy !!} -
-
-
-
diff --git a/resources/views/profile/delete-user-form.blade.php b/resources/views/profile/delete-user-form.blade.php deleted file mode 100644 index 92d16416..00000000 --- a/resources/views/profile/delete-user-form.blade.php +++ /dev/null @@ -1,46 +0,0 @@ - - - {{ __('Delete Account') }} - - - - {{ __('Permanently delete your account.') }} - - - -
- {{ __('Once your account is deleted, all of its resources and data will be permanently deleted. Before deleting your account, please download any data or information that you wish to retain.') }} -
- -
- - {{ __('Delete Account') }} - -
- - - - - {{ __('Delete Account') }} - - - - {{ __('Are you sure you want to delete your account? Once your account is deleted, all of its resources and data will be permanently deleted. Please enter your password to confirm you would like to permanently delete your account.') }} - - - - - {{ __('Cancel') }} - - - - {{ __('Delete Account') }} - - - -
-
diff --git a/resources/views/profile/logout-other-browser-sessions-form.blade.php b/resources/views/profile/logout-other-browser-sessions-form.blade.php deleted file mode 100644 index 84d50aa6..00000000 --- a/resources/views/profile/logout-other-browser-sessions-form.blade.php +++ /dev/null @@ -1,97 +0,0 @@ - - - {{ __('Browser Sessions') }} - - - - {{ __('Manage and log out your active sessions on other browsers and devices.') }} - - - -
- {{ __('If necessary, you may log out of all of your other browser sessions across all of your devices. Some of your recent sessions are listed below; however, this list may not be exhaustive. If you feel your account has been compromised, you should also update your password.') }} -
- - @if (count($this->sessions) > 0) -
- - @foreach ($this->sessions as $session) -
-
- @if ($session->agent->isDesktop()) - - - - @else - - - - @endif -
- -
-
- {{ $session->agent->platform() ? $session->agent->platform() : __('Unknown') }} - {{ $session->agent->browser() ? $session->agent->browser() : __('Unknown') }} -
- -
-
- {{ $session->ip_address }}, - - @if ($session->is_current_device) - {{ __('This device') }} - @else - {{ __('Last active') }} {{ $session->last_active }} - @endif -
-
-
-
- @endforeach -
- @endif - -
- - {{ __('Log Out Other Browser Sessions') }} - - - - {{ __('Done.') }} - -
- - - - - {{ __('Log Out Other Browser Sessions') }} - - - - {{ __('Please enter your password to confirm you would like to log out of your other browser sessions across all of your devices.') }} - -
- - - -
-
- - - - {{ __('Cancel') }} - - - {{-- - {{ __('Log Out Other Browser Sessions') }} - --}} - -
-
-
diff --git a/resources/views/profile/show.blade.php b/resources/views/profile/show.blade.php deleted file mode 100644 index 29ca6738..00000000 --- a/resources/views/profile/show.blade.php +++ /dev/null @@ -1,44 +0,0 @@ - - - - -
-
- @if (Laravel\Fortify\Features::canUpdateProfileInformation()) - @livewire('profile.update-profile-information-form') - - - @endif - - @if (Laravel\Fortify\Features::enabled(Laravel\Fortify\Features::updatePasswords())) -
- @livewire('profile.update-password-form') -
- - - @endif - - @if (Laravel\Fortify\Features::canManageTwoFactorAuthentication()) -
- @livewire('profile.two-factor-authentication-form') -
- - - @endif - -
- @livewire('profile.logout-other-browser-sessions-form') -
- - @if (Laravel\Jetstream\Jetstream::hasAccountDeletionFeatures()) - - -
- @livewire('profile.delete-user-form') -
- @endif -
-
- - -
diff --git a/resources/views/profile/two-factor-authentication-form.blade.php b/resources/views/profile/two-factor-authentication-form.blade.php deleted file mode 100644 index 081476a2..00000000 --- a/resources/views/profile/two-factor-authentication-form.blade.php +++ /dev/null @@ -1,124 +0,0 @@ - - - {{ __('Two Factor Authentication') }} - - - - {{ __('Add additional security to your account using two factor authentication.') }} - - - -

- @if ($this->enabled) - @if ($showingConfirmation) - {{ __('Finish enabling two factor authentication.') }} - @else - {{ __('You have enabled two factor authentication.') }} - @endif - @else - {{ __('You have not enabled two factor authentication.') }} - @endif -

- -
-

- {{ __('When two factor authentication is enabled, you will be prompted for a secure, random token during authentication. You may retrieve this token from your phone\'s Google Authenticator application.') }} -

-
- - @if ($this->enabled) - @if ($showingQrCode) -
-

- @if ($showingConfirmation) - {{ __('To finish enabling two factor authentication, scan the following QR code using your phone\'s authenticator application or enter the setup key and provide the generated OTP code.') }} - @else - {{ __('Two factor authentication is now enabled. Scan the following QR code using your phone\'s authenticator application or enter the setup key.') }} - @endif -

-
- -
- {!! $this->user->twoFactorQrCodeSvg() !!} -
- -
-

- {{ __('Setup Key') }}: {{ decrypt($this->user->two_factor_secret) }} -

-
- - @if ($showingConfirmation) -
- - - - - -
- @endif - @endif - - @if ($showingRecoveryCodes) -
-

- {{ __('Store these recovery codes in a secure password manager. They can be used to recover access to your account if your two factor authentication device is lost.') }} -

-
- -
- @foreach (json_decode(decrypt($this->user->two_factor_recovery_codes), true) as $code) -
{{ $code }}
- @endforeach -
- @endif - @endif - -
- @if (! $this->enabled) - - {{-- - {{ __('Enable') }} - --}} - - @else - @if ($showingRecoveryCodes) - - - {{ __('Regenerate Recovery Codes') }} - - - @elseif ($showingConfirmation) - - - {{ __('Confirm') }} - - - @else - - - {{ __('Show Recovery Codes') }} - - - @endif - - @if ($showingConfirmation) - - - {{ __('Cancel') }} - - - @else - - - {{ __('Disable') }} - - - @endif - - @endif -
-
-
diff --git a/resources/views/profile/update-password-form.blade.php b/resources/views/profile/update-password-form.blade.php deleted file mode 100644 index 651cdf67..00000000 --- a/resources/views/profile/update-password-form.blade.php +++ /dev/null @@ -1,39 +0,0 @@ - - - {{ __('Update Password') }} - - - - {{ __('Ensure your account is using a long, random password to stay secure.') }} - - - -
- - - -
- -
- - - -
- -
- - - -
-
- - - - {{ __('Saved.') }} - - - {{-- - {{ __('Save') }} - --}} - -
diff --git a/resources/views/profile/update-profile-information-form.blade.php b/resources/views/profile/update-profile-information-form.blade.php deleted file mode 100644 index e0cc760d..00000000 --- a/resources/views/profile/update-profile-information-form.blade.php +++ /dev/null @@ -1,153 +0,0 @@ - - - {{ __('Profile Information') }} - - - - {{ __('Update your account\'s profile information and email address.') }} - - - - - @if (Laravel\Jetstream\Jetstream::managesProfilePhotos()) -
- - - - - - -
- {{ $this->user->name }} -
- - - - - - {{ __('Select A New Photo') }} - - - @if ($this->user->profile_photo_path) - - {{ __('Remove Photo') }} - - @endif - - -
- @endif - - -
- - - -
- -
-

{{ __('Only one working address is required. But you can also fill in all fields if you have suitable data.') }}

-
- - -
- - - -
- - -
- - -

{{ __('starts with PM...') }}

- -
- - -
- - -

{{ __('for example xy@getalby.com') }}

- -
- - -
- - -

{{ __('starts with: lnurl1dp68gurn8gh....') }}

- -
- - -
- - - -
- - - {{--
- - - - - @if (Laravel\Fortify\Features::enabled(Laravel\Fortify\Features::emailVerification()) && !$this->user->hasVerifiedEmail() && $this->user->email) -

- {{ __('Your email address is unverified.') }} - - -

- - @if ($this->verificationLinkSent) -

- {{ __('A new verification link has been sent to your email address.') }} -

- @endif - @endif -
--}} - -
- - -
-
- - - - {{ __('Saved.') }} - - - - {{ __('Save') }} - - -
diff --git a/resources/views/teams/create-team-form.blade.php b/resources/views/teams/create-team-form.blade.php deleted file mode 100644 index 601823c9..00000000 --- a/resources/views/teams/create-team-form.blade.php +++ /dev/null @@ -1,36 +0,0 @@ - - - {{ __('Team Details') }} - - - - {{ __('Create a new team to collaborate with others on projects.') }} - - - -
- - -
- {{ $this->user->name }} - -
-
{{ $this->user->name }}
-
{{ $this->user->email }}
-
-
-
- -
- - - -
-
- - - - {{ __('Create') }} - - -
diff --git a/resources/views/teams/create.blade.php b/resources/views/teams/create.blade.php deleted file mode 100644 index 12d006a7..00000000 --- a/resources/views/teams/create.blade.php +++ /dev/null @@ -1,13 +0,0 @@ - - -

- {{ __('Create Team') }} -

-
- -
-
- @livewire('teams.create-team-form') -
-
-
diff --git a/resources/views/teams/delete-team-form.blade.php b/resources/views/teams/delete-team-form.blade.php deleted file mode 100644 index 49a2d7d1..00000000 --- a/resources/views/teams/delete-team-form.blade.php +++ /dev/null @@ -1,42 +0,0 @@ - - - {{ __('Delete Team') }} - - - - {{ __('Permanently delete this team.') }} - - - -
- {{ __('Once a team is deleted, all of its resources and data will be permanently deleted. Before deleting this team, please download any data or information regarding this team that you wish to retain.') }} -
- -
- - {{ __('Delete Team') }} - -
- - - - - {{ __('Delete Team') }} - - - - {{ __('Are you sure you want to delete this team? Once a team is deleted, all of its resources and data will be permanently deleted.') }} - - - - - {{ __('Cancel') }} - - - - {{ __('Delete Team') }} - - - -
-
diff --git a/resources/views/teams/show.blade.php b/resources/views/teams/show.blade.php deleted file mode 100644 index 92c43838..00000000 --- a/resources/views/teams/show.blade.php +++ /dev/null @@ -1,23 +0,0 @@ - - -

- {{ __('Team Settings') }} -

-
- -
-
- @livewire('teams.update-team-name-form', ['team' => $team]) - - @livewire('teams.team-member-manager', ['team' => $team]) - - @if (Gate::check('delete', $team) && ! $team->personal_team) - - -
- @livewire('teams.delete-team-form', ['team' => $team]) -
- @endif -
-
-
diff --git a/resources/views/teams/team-member-manager.blade.php b/resources/views/teams/team-member-manager.blade.php deleted file mode 100644 index 3594dc61..00000000 --- a/resources/views/teams/team-member-manager.blade.php +++ /dev/null @@ -1,256 +0,0 @@ -
- @if (Gate::check('addTeamMember', $team)) - - - -
- - - {{ __('Add Team Member') }} - - - - {{ __('Add a new team member to your team, allowing them to collaborate with you.') }} - - - -
-
- {{ __('Please provide the email address of the person you would like to add to this team.') }} -
-
- - -
- - - -
- - - @if (count($this->roles) > 0) -
- - - -
- @foreach ($this->roles as $index => $role) - - @endforeach -
-
- @endif -
- - - - {{ __('Added.') }} - - - - {{ __('Add') }} - - -
-
- @endif - - @if ($team->teamInvitations->isNotEmpty() && Gate::check('addTeamMember', $team)) - - - -
- - - {{ __('Pending Team Invitations') }} - - - - {{ __('These people have been invited to your team and have been sent an invitation email. They may join the team by accepting the email invitation.') }} - - - -
- @foreach ($team->teamInvitations as $invitation) -
-
{{ $invitation->email }}
- -
- @if (Gate::check('removeTeamMember', $team)) - - - @endif -
-
- @endforeach -
-
-
-
- @endif - - @if ($team->users->isNotEmpty()) - - - -
- - - {{ __('Team Members') }} - - - - {{ __('All of the people that are part of this team.') }} - - - - -
- @foreach ($team->users->sortBy('name') as $user) -
-
- {{ $user->name }} -
{{ $user->name }}
-
- -
- - @if (Gate::check('addTeamMember', $team) && Laravel\Jetstream\Jetstream::hasRoles()) - - @elseif (Laravel\Jetstream\Jetstream::hasRoles()) -
- {{ Laravel\Jetstream\Jetstream::findRole($user->membership->role)->name }} -
- @endif - - - @if ($this->user->id === $user->id) - - - - @elseif (Gate::check('removeTeamMember', $team)) - - @endif -
-
- @endforeach -
-
-
-
- @endif - - - - - {{ __('Manage Role') }} - - - -
- @foreach ($this->roles as $index => $role) - - @endforeach -
-
- - - - {{ __('Cancel') }} - - - - {{ __('Save') }} - - -
- - - - - {{ __('Leave Team') }} - - - - {{ __('Are you sure you would like to leave this team?') }} - - - - - {{ __('Cancel') }} - - - - {{ __('Leave') }} - - - - - - - - {{ __('Remove Team Member') }} - - - - {{ __('Are you sure you would like to remove this person from the team?') }} - - - - - {{ __('Cancel') }} - - - - {{ __('Remove') }} - - - -
diff --git a/resources/views/teams/update-team-name-form.blade.php b/resources/views/teams/update-team-name-form.blade.php deleted file mode 100644 index baecd34d..00000000 --- a/resources/views/teams/update-team-name-form.blade.php +++ /dev/null @@ -1,50 +0,0 @@ - - - {{ __('Team Name') }} - - - - {{ __('The team\'s name and owner information.') }} - - - - -
- - -
- {{ $team->owner->name }} - -
-
{{ $team->owner->name }}
-
{{ $team->owner->email }}
-
-
-
- - -
- - - - - -
-
- - @if (Gate::check('update', $team)) - - - {{ __('Saved.') }} - - - - {{ __('Save') }} - - - @endif -
diff --git a/resources/views/terms.blade.php b/resources/views/terms.blade.php deleted file mode 100644 index 7fd284ce..00000000 --- a/resources/views/terms.blade.php +++ /dev/null @@ -1,13 +0,0 @@ - -
-
-
- -
- -
- {!! $terms !!} -
-
-
-
diff --git a/routes/web.php b/routes/web.php index 9d9c4591..4f838bdd 100644 --- a/routes/web.php +++ b/routes/web.php @@ -1,21 +1,9 @@ get('/bsc', \App\Http\Livewire\Specials\BalticSeaCircle::class) - ->name('specials.bsc'); - -Route::middleware([]) - ->get('/', \App\Http\Livewire\Frontend\Welcome::class) - ->name('welcome'); - -Route::middleware([]) - ->get('/hello', \App\Http\Livewire\Hello::class) - ->name('hello'); +Route::get('/', \App\Http\Livewire\Nostr\Start::class) + ->name('start'); Route::middleware([]) ->get('/kaninchenbau', \App\Http\Livewire\Helper\FollowTheRabbit::class) @@ -37,344 +25,12 @@ Route::get('/img-public/{path}', \App\Http\Controllers\ImageController::class) ->where('path', '.*') ->name('imgPublic'); -Route::post('auth/auth47-callback', function (Request $request) { - $auth47Version = $request->auth47_response; - $challenge = $request->challenge; - $signature = $request->signature; - $nym = $request->nym; -}) - ->name('auth.auth47.callback'); - -Route::middleware([]) - ->get('/news', \App\Http\Livewire\News\ArticleOverview::class) - ->name('article.overview'); - -Route::middleware([]) - ->get('/news/authors', \App\Http\Livewire\News\AuthorsOverview::class) - ->name('authors.overview'); - Route::middleware([]) ->get('/nostr/einundzwanzig-plebs', function () { return redirect('https://einundzwanzigstr.codingarena.de/einundzwanzig-plebs'); }) ->name('nostr.plebs'); -/* - * News - * */ -Route::middleware([ - 'auth', -]) - ->as('news.') - ->prefix('/news') - ->group(function () { - Route::get('/form/{libraryItem?}', \App\Http\Livewire\News\Form\NewsArticleForm::class) - ->name('form'); - }); - -/* - * Exports - * */ -Route::middleware([ - 'auth', -]) - ->as('export.') - ->prefix('/export') - ->group(function () { - Route::get('/meetup-event/{meetupEvent}', - \App\Http\Controllers\Export\MeetupEventAttendeesExportController::class) - ->name('meetupEvent'); - }); - -/* - * Content Creator - * */ -Route::middleware([ - 'auth', -]) - ->as('contentCreator.') - ->prefix('/content-creator') - ->group(function () { - Route::get('/form/{lecturer?}', \App\Http\Livewire\ContentCreator\Form\ContentCreatorForm::class) - ->name('form'); - }); - -/* - * Bitcoin Event - * */ -Route::middleware([ - 'auth', -]) - ->as('bitcoinEvent.') - ->prefix('/bitcoin-event') - ->group(function () { - Route::get('/form/{bitcoinEvent?}', \App\Http\Livewire\BitcoinEvent\Form\BitcoinEventForm::class) - ->name('form'); - }); - -/* - * Course - * */ -Route::middleware([ - 'auth', -]) - ->as('course.') - ->prefix('/course') - ->group(function () { - Route::get('/form/course/{course?}', \App\Http\Livewire\School\Form\CourseForm::class) - ->name('form.course'); - Route::get('/form/course-event/{courseEvent?}', \App\Http\Livewire\School\Form\CourseEventForm::class) - ->name('form.courseEvent'); - }); - -/* - * Venue - * */ -Route::middleware([ - 'auth', -]) - ->as('venue.') - ->prefix('/venue') - ->group(function () { - Route::get('/form/{venue?}', \App\Http\Livewire\Venue\Form\VenueForm::class) - ->name('form'); - }); - -/* - * Cities - * */ -Route::middleware([ - 'auth', -]) - ->as('city.') - ->prefix('/city') - ->group(function () { - Route::get('/form/{city?}', \App\Http\Livewire\City\Form\CityForm::class) - ->name('form'); - }); - -Route::middleware([]) - ->get('/news/{libraryItem:slug}', InternArticleView::class) - ->name('article.view'); - -Route::middleware([]) - ->get('/library-item/{libraryItem:slug}', InternArticleView::class) - ->name('libraryItem.view'); - -Route::middleware([]) - ->get('/lecturer-material/{libraryItem:slug}', InternArticleView::class) - ->name('lecturerMaterial.view'); - -Route::get('/project/voting/{projectProposal:slug}', \App\Http\Livewire\ProjectProposal\ProjectProposalVoting::class) - ->name('voting.projectFunding') - ->middleware(['auth']); - -Route::middleware([ - 'auth', -]) - ->get('/my-meetups', \App\Http\Livewire\Profile\Meetups::class) - ->name('profile.meetups'); - -Route::middleware([ - 'auth', -]) - ->get('/lnbits', \App\Http\Livewire\Profile\LNBits::class) - ->name('profile.lnbits'); - -Route::middleware([ - 'auth', -]) - ->get('/change-lightning-wallet', \App\Http\Livewire\Wallet\LightningWallet::class) - ->name('profile.wallet'); - -Route::get('/auth/ln', \App\Http\Livewire\Auth\LNUrlAuth::class) - ->name('auth.ln'); - -Route::get('/auth/login', \App\Http\Livewire\Auth\Login::class) - ->name('auth.login'); - -Route::get('/login-as-admin', function(){ - auth()->loginUsingId(2); - return redirect()->route('dashboard'); -})->name('loginAsAdmin'); - -Route::get('/auth/twitter', function () { - return Socialite::driver('twitter') - ->scopes([ - 'tweet.write', - 'offline.access', - ]) - ->redirect(); -}) - ->name('auth.twitter.redirect'); - -Route::get('/auth/twitter/callback', function () { - $twitterUser = Socialite::driver('twitter') - ->user(); - $twitterAccount = \App\Models\TwitterAccount::updateOrCreate([ - 'twitter_id' => $twitterUser->id, - ], [ - 'twitter_id' => $twitterUser->id, - 'refresh_token' => $twitterUser->refreshToken, - 'nickname' => $twitterUser->nickname, - 'token' => $twitterUser->token, - 'expires_in' => $twitterUser->expiresIn, - 'data' => [], - ]); - - echo 'Twitter account updated. We can now tweet on: ' . $twitterUser->name; - exit; -}) - ->name('auth.twitter'); - -/* - * School - * */ -Route::middleware([]) - ->as('school.') - ->prefix('/{country:code}/school') - ->group(function () { - Route::get('/city', \App\Http\Livewire\School\CityTable::class) - ->name('table.city'); - - Route::get('/lecturer', \App\Http\Livewire\School\LecturerTable::class) - ->name('table.lecturer'); - - Route::get('/venue', \App\Http\Livewire\School\VenueTable::class) - ->name('table.venue'); - - Route::get('/course', \App\Http\Livewire\School\CourseTable::class) - ->name('table.course'); - - Route::get('/event', \App\Http\Livewire\School\EventTable::class) - ->name('table.event'); - - Route::get('/{lecturer:slug}', \App\Http\Livewire\School\LecturerLandingPage::class) - ->name('landingPage.lecturer'); - }); - -/* - * Library - * */ -Route::middleware([]) - ->as('library.') - ->prefix('/{country:code}/library') - ->group(function () { - Route::get('/library-item/form/{libraryItem?}', \App\Http\Livewire\Library\Form\LibraryItemForm::class) - ->name('libraryItem.form') - ->middleware(['auth']); - - Route::get('/library-item', \App\Http\Livewire\Library\LibraryTable::class) - ->name('table.libraryItems'); - - Route::get('/podcast-episodes', \App\Http\Livewire\Library\PodcastEpisodesTable::class) - ->name('table.podcastsEpisodes'); - - Route::get('/content-creator', \App\Http\Livewire\Library\LibraryTable::class) - ->name('table.lecturer'); - }); - -/* - * Project Funding - * */ -Route::middleware([]) - ->as('project.') - ->prefix('/{country:code}/project-funding') - ->group(function () { - Route::get('/project/form/{projectProposal?}', - \App\Http\Livewire\ProjectProposal\Form\ProjectProposalForm::class) - ->name('projectProposal.form') - ->middleware(['auth']); - - Route::get('/projects', \App\Http\Livewire\ProjectProposal\ProjectProposalTable::class) - ->name('table.projectFunding'); - }); - -/* - * Books - * */ -Route::middleware([]) - ->as('bookCases.') - ->prefix('/{country:code}/book-cases') - ->group(function () { - Route::get('/book-case/form/{bookCase}/{orangePill?}', \App\Http\Livewire\BookCase\Form\OrangePillForm::class) - ->name('form') - ->middleware(['auth']); - - Route::get('/city', \App\Http\Livewire\BookCase\CityTable::class) - ->name('table.city'); - - Route::get('/heatmap', \App\Http\Livewire\BookCase\Heatmap::class) - ->name('heatmap'); - - Route::get('/world-map', \App\Http\Livewire\BookCase\WorldMap::class) - ->name('world'); - - Route::get('/overview', \App\Http\Livewire\BookCase\BookCaseTable::class) - ->name('table.bookcases'); - - Route::get('/book-case/{bookCase}', \App\Http\Livewire\BookCase\CommentBookCase::class) - ->name('comment.bookcase'); - - Route::get('/high-score-table', \App\Http\Livewire\BookCase\HighscoreTable::class) - ->name('highScoreTable'); - }); - -/* - * Events - * */ -Route::middleware([]) - ->as('bitcoinEvent.') - ->prefix('/{country:code}/event') - ->group(function () { - Route::get('stream-calendar', \App\Http\Controllers\DownloadBitcoinEventCalendar::class) - ->name('ics'); - Route::get('overview', \App\Http\Livewire\BitcoinEvent\BitcoinEventTable::class) - ->name('table.bitcoinEvent'); - }); - -/* - * Meetups - * */ -Route::middleware([]) - ->as('meetup.') - ->prefix('/{country:code}/meetup') - ->group(function () { - Route::get('stream-calendar', \App\Http\Controllers\DownloadMeetupCalendar::class) - ->name('ics'); - - Route::get('world', \App\Http\Livewire\Meetup\WorldMap::class) - ->name('world'); - - Route::get('overview', \App\Http\Livewire\Meetup\MeetupTable::class) - ->name('table.meetup'); - - Route::get('embed', \App\Http\Livewire\Meetup\Embed\CountryMap::class) - ->name('embed.countryMap'); - - Route::get('/meetup/form/{meetup?}', \App\Http\Livewire\Meetup\Form\MeetupForm::class) - ->name('meetup.form') - ->middleware([ - 'auth', - ]); - - Route::get('/meetup-events/form/{meetupEvent?}', \App\Http\Livewire\Meetup\Form\MeetupEventForm::class) - ->name('event.form') - ->middleware([ - 'auth', - 'needMeetup', - ]); - - Route::get('/meetup-events/l/{meetupEvent}', \App\Http\Livewire\Meetup\LandingPageEvent::class) - ->name('event.landing'); - - Route::get('/meetup-events', \App\Http\Livewire\Meetup\MeetupEventTable::class) - ->name('table.meetupEvent'); - - Route::get('/{meetup:slug}', \App\Http\Livewire\Meetup\LandingPage::class) - ->name('landing'); - }); - /* * Authenticated * */ @@ -384,13 +40,6 @@ Route::middleware([ ]) ->group(function () { /* - * Dashboard - * */ - Route::get('/dashboard', function () { - return view('dashboard'); - }) - ->name('dashboard'); - /* * Meetup OSM * */ Route::get('/meetup-osm/table', \App\Http\Livewire\Meetup\PrepareForBtcMapTable::class)