@extends('layouts.app') @section('title', __('account-security.sessions.page.title')) @php $otherSessions = $sessions->where('id', '!=', $currentSessionId); $hasOtherSessions = $otherSessions->isNotEmpty(); @endphp @section('content')
@include('components.alert_success')

{{ __('account-security.sessions.page.title') }}

@if ($hasOtherSessions) @endif

{{ __('account-security.sessions.page.intro') }}

@if ($sessions->isEmpty())
{{ __('account-security.sessions.page.empty') }}
@else {{-- Desktop table (>= md) --}}
@foreach ($sessions as $session) @php $isCurrent = $session->id === $currentSessionId; $deviceLabel = $session->deviceLabel(); @endphp @endforeach
{{ __('account-security.sessions.page.title') }} IP {{ __('account-security.sessions.page.last_activity', ['date' => '']) }} Actions
{{ $deviceLabel }} @if ($isCurrent) {{ __('account-security.sessions.page.this_device') }} @endif {{ $session->ip_address ?? '—' }} {{ optional($session->last_activity_at)->diffForHumans() ?? '—' }} @if (! $isCurrent) @endif
{{-- Mobile card stack (< md) --}}
@foreach ($sessions as $session) @php $isCurrent = $session->id === $currentSessionId; $deviceLabel = $session->deviceLabel(); @endphp
{{ $deviceLabel }} @if ($isCurrent) {{ __('account-security.sessions.page.this_device') }} @endif
IP : {{ $session->ip_address ?? '—' }}
{{ optional($session->last_activity_at)->diffForHumans() ?? '—' }}
@if (! $isCurrent) @endif
@endforeach
@endif
@if ($hasOtherSessions) @foreach ($otherSessions as $session) @endforeach @endif @endsection