CluPilotCloud/resources/views/livewire/backups.blade.php

47 lines
2.6 KiB
PHP

<div class="space-y-6" x-data="{ msgs: @js(['restore' => __('backups.restore_toast')]) }">
<div class="flex flex-wrap items-center gap-3 animate-rise">
<div>
<h1 class="text-2xl font-semibold tracking-tight text-ink">{{ __('backups.title') }}</h1>
<p class="mt-1 text-sm text-muted">{{ __('backups.subtitle') }}</p>
</div>
<span class="ml-auto rounded-pill bg-success-bg px-3 py-1.5 text-xs font-semibold text-success">{{ __('backups.schedule') }}</span>
</div>
<div class="rounded-xl border border-line bg-surface p-5 shadow-xs animate-rise [animation-delay:60ms]">
<h2 class="font-semibold text-ink">{{ __('backups.size_trend') }}</h2>
<div class="mt-3 h-52" wire:ignore>
<x-ui.chart :config="$sizeChart" class="h-52" :label="__('backups.size_trend')" />
</div>
</div>
<div class="overflow-hidden rounded-xl border border-line bg-surface shadow-xs animate-rise [animation-delay:120ms]">
<div class="overflow-x-auto">
<table class="w-full text-sm">
<thead>
<tr class="border-b border-line bg-surface-2 text-left text-xs uppercase tracking-wide text-faint">
<th class="px-4 py-3 font-semibold">{{ __('backups.col_when') }}</th>
<th class="px-4 py-3 font-semibold">{{ __('backups.col_size') }}</th>
<th class="px-4 py-3 font-semibold">{{ __('backups.col_status') }}</th>
<th class="px-4 py-3"></th>
</tr>
</thead>
<tbody>
@foreach ($rows as $r)
<tr class="border-b border-line last:border-0 hover:bg-surface-hover">
<td class="px-4 py-3 font-mono text-xs text-body">{{ $r['when'] }}</td>
<td class="px-4 py-3 font-mono text-xs text-muted">{{ $r['size'] }}</td>
<td class="px-4 py-3"><x-ui.badge status="active">{{ __('backups.ok') }}</x-ui.badge></td>
<td class="px-4 py-3 text-right"><x-ui.button variant="secondary" size="sm" @click="$dispatch('notify', { message: msgs.restore })">{{ __('backups.restore') }}</x-ui.button></td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
<p class="flex gap-2 text-xs leading-relaxed text-muted animate-rise [animation-delay:180ms]">
<x-ui.icon name="shield" class="mt-px size-4 shrink-0 text-accent-active" />
<span>{{ __('backups.note', ['date' => $lastTest]) }}</span>
</p>
</div>