@extends('admin/settings/sidebar') @section('title', __('admin.update.title')) @section('setting')
@if ($publishedVersions) @php $icons = [ 'added' => 'bi bi-plus text-green-500', 'removed' => 'bi bi-dash text-red-500', 'changed' => 'bi bi-arrow-repeat text-blue-500', 'fixed' => 'bi bi-wrench text-yellow-500', 'other' => 'bi bi-three-dots text-gray-500', 'security' => 'bi bi-shield text-purple-500', ]; @endphp

{{ __('admin.update.status_title') }}

{{ __('admin.update.status_subtitle') }}

@if (app()->isLocal()) @endif @if (version_compare($currentVersion, $publishedVersions->version, '>='))

{{ __('admin.update.current_version') }}

v{{ $currentVersion }} @if ($appIsGit) {{ $appVersion }} @endif
@csrf
@else

{{ __('admin.update.current_version') }}

v{{ $currentVersion }}

{{ __('admin.update.available_version') }}

{{ $publishedVersions->version }}
@csrf
@endif

{{ __('admin.update.whats_new_in', ['version' => $publishedVersions->version]) }}

{{ $publishedVersions->version_name }} • {{ __('admin.update.published_on', ['date' => \Carbon\Carbon::parse($publishedVersions->created_at)->isoFormat('LL')]) }}

{{ __('admin.update.changelog') }}
@foreach ($icons as $key => $icon) @if (!empty($publishedVersions->changelog->$key))

{{ __('admin.update.' . $key) }}

    @foreach ($publishedVersions->changelog->$key as $item)
  • {{ preg_replace('/^[\x{1F000}-\x{1FFFF}\x{2600}-\x{27BF}]+\s*/u', '', $item) }}
  • @endforeach
@endif @endforeach

{{ __('admin.update.previous_updates') }}

@foreach (collect($changelog)->skip(1)->take(4) as $version)

{{ $version->version }}

{{ \Carbon\Carbon::parse($version->created_at)->isoFormat('LL') }}
@foreach ($icons as $key => $icon) @if (!empty($version->changelog->$key))
{{ __('admin.update.' . $key) }}
    @foreach (array_slice($version->changelog->$key, 0, 3) as $item)
  • • {{ Str::limit(preg_replace('/^[\x{1F000}-\x{1FFFF}\x{2600}-\x{27BF}]+\s*/u', '', $item), 50) }}
  • @endforeach @if (count($version->changelog->$key) > 3)
  • + {{ count($version->changelog->$key) - 3 }} {{ __('admin.update.other') }}...
  • @endif
@endif @endforeach
@endforeach
@else

{{ __('admin.update.error_fetching') }}

{{ __('admin.update.error_fetching_message') }}

@endif
@endsection @section('scripts') @endsection