@extends('admin.layouts.app') @section('title', __('admin.api_credentials.title')) @section('content') @if($errors->any())
@endif @if(session('new_secret'))
{{ __('admin.api_credentials.save_secret_warning') }}
{{ session('new_secret') }}
@endif

{{ __('admin.api_credentials.description') }}

@if(($credentials ?? collect())->isEmpty())
{{ __('admin.api_credentials.no_keys') }}
@else @foreach($credentials as $cred) @endforeach
{{ __('common.table.description') }}{{ __('admin.api_credentials.identifier') }}{{ __('admin.api_credentials.admin') }}{{ __('admin.api_credentials.allowed_from') }}{{ __('common.table.created') }}{{ __('common.table.status') }}{{ __('common.table.actions') }}
{{ $cred->description ?: __('admin.api_credentials.no_description') }} {{ $cred->identifier }} {{ $cred->admin->full_name ?? 'N/A' }} @if(! empty($cred->allowed_ips)){{ implode(', ', $cred->allowed_ips) }}@else{{ __('admin.api_credentials.anywhere') }}@endif {{ $cred->created_at?->timezone(display_tz())->format(datetime_fmt()) ?? '-' }} {{ $cred->active ? __('common.status.active') : __('common.status.disabled') }}
@csrf @method('DELETE')
@endif
{{ __('admin.api_credentials.api_usage') }}: {{ __('admin.api_credentials.api_usage_desc') }} /api/v1/{action} {{ __('admin.api_credentials.api_usage_params') }} @if(Route::has('admin.api-docs')) {{ __('admin.api_credentials.view_docs') }} @endif
{{-- Generate Modal --}} {{-- Edit modals: description, allowed addresses, on/off. The secret never changes. --}} @foreach($credentials ?? [] as $cred) @endforeach @endsection