@php abort_unless(timebank_config('android_app.enabled', true), 404); $layout = Auth::check() ? 'app-layout' : 'guest-layout'; $fallbackTexts = [ 'en' => 'The :platform Android app lets you quickly access your account using biometric login. Check your balance, make payments, chat with other members, and get push notifications — all from your phone. Download the APK below to install the app directly on your Android device.', 'nl' => 'De :platform Android-app geeft je snel toegang tot je account via biometrische login. Bekijk je saldo, doe betalingen, chat met andere leden en ontvang pushmeldingen — allemaal vanaf je telefoon. Download de APK hieronder om de app direct op je Android-apparaat te installeren.', 'fr' => 'L\'application Android :platform te permet d\'accéder rapidement à ton compte grâce à la connexion biométrique. Consulte ton solde, effectue des paiements, discute avec d\'autres membres et reçois des notifications push — tout depuis ton téléphone. Télécharge l\'APK ci-dessous pour installer l\'application directement sur ton appareil Android.', 'de' => 'Die :platform Android-App ermöglicht dir den schnellen Zugriff auf dein Konto per biometrischem Login. Sieh deinen Kontostand ein, tätige Zahlungen, chatte mit anderen Mitgliedern und erhalte Push-Benachrichtigungen – alles von deinem Telefon aus. Lade die APK unten herunter, um die App direkt auf deinem Android-Gerät zu installieren.', 'es' => 'La app Android de :platform te permite acceder rápidamente a tu cuenta mediante inicio de sesión biométrico. Consulta tu saldo, realiza pagos, chatea con otros miembros y recibe notificaciones push — todo desde tu teléfono. Descarga el APK a continuación para instalar la app directamente en tu dispositivo Android.', ]; $locale = app()->getLocale(); $fallbackText = str_replace(':platform', platform_name(), $fallbackTexts[$locale] ?? $fallbackTexts['en']); $apkUrl = \App\Http\Controllers\AppVersionController::latest()['apkUrl']; $hasPost = \App\Models\Post::whereHas('category', fn($q) => $q->where('type', 'SiteContents\Static\AndroidApp')) ->whereHas('translations', fn($q) => $q ->where('locale', 'like', $locale . '%') ->whereDate('from', '<=', now()) ->where(fn($q2) => $q2->whereDate('till', '>', now())->orWhereNull('till')) )->exists(); @endphp {{ __('Android app') }}
@if($hasPost) @livewire('static-post', [ 'type' => 'SiteContents\Static\AndroidApp', 'limit' => timebank_config('posts.static.android-app.limit'), 'hideAuthor' => timebank_config('posts.static.android-app.hideAuthor'), ]) @endif {{-- Fallback text (when no post) and Download APK button (always shown) --}}
@if(!$hasPost)

{{ $fallbackText }}

@endif