country = request()->route('country', config('app.domain_country')); } public function filterByType(?string $type): void { $this->typeFilter = $this->typeFilter === $type ? null : $type; $this->resetPage(); } public function with(): array { return [ 'services' => SelfHostedService::query() ->with('createdBy') ->when($this->search, fn($q) => $q->whereLike('name', '%'.$this->search.'%')) ->when($this->typeFilter, fn($q) => $q->where('type', $this->typeFilter)) ->orderBy('name') ->paginate(15), 'types' => \App\Enums\SelfHostedServiceType::cases(), ]; } }; ?>
{{ __('Self Hosted Services') }}
@auth {{ __('Service erstellen') }} @endauth
@foreach($types as $type) {{ $type->label() }} @endforeach @if($typeFilter) {{ __('Filter zurücksetzen') }} @endif
{{ __('Name') }} {{ __('Typ') }} {{ __('Links') }} {{ __('Erstellt von') }} {{ __('Datum') }} @foreach ($services as $service) {{ $service->name }} @if($service->type) {{ $service->type->label() }} @endif @php $serviceUrls = [ ['href' => $service->url_clearnet, 'color' => 'text-blue-600 dark:text-blue-400', 'icon' => 'globe-alt', 'label' => 'Clearnet'], ['href' => $service->url_onion, 'color' => 'text-purple-600 dark:text-purple-400', 'icon' => 'lock-closed', 'label' => 'Onion'], ['href' => $service->url_i2p, 'color' => 'text-green-600 dark:text-green-400', 'icon' => 'link', 'label' => 'I2P'], ['href' => $service->url_pkdns, 'color' => 'text-orange-600 dark:text-orange-400', 'icon' => 'link', 'label' => 'pkdns'], ]; @endphp
@foreach($serviceUrls as $serviceUrl) @if($serviceUrl['href'])
{{ $serviceUrl['label'] }}
{{ __('Copy') }}
@endif @endforeach @if($service->ip)
{{ $service->ip }}
{{ __('Copy') }}
@endif
@if($service->anon || !$service->createdBy) {{ __('Anonymous') }} @else
{{ Str::length($service->createdBy->name) > 20 ? Str::substr($service->createdBy->name, 0, 4) . '...' . Str::substr($service->createdBy->name, -3) : $service->createdBy->name }} @if($service->createdBy->nostr) @endif
@endif
{{ $service->created_at->format('d.m.Y') }}
@if($service->created_at->ne($service->updated_at))
{{ $service->updated_at->format('d.m.Y') }}
@endif
@endforeach