update filament to v4

fix torrent name
This commit is contained in:
NekoCH
2025-09-21 18:07:30 +08:00
parent 3f04ae4163
commit f0b50e4826
58 changed files with 2172 additions and 1324 deletions

View File

@@ -1,10 +1,10 @@
<x-filament::page>
<form wire:submit.prevent="submit">
<form wire:submit.prevent="submit" class="fi-sc fi-sc-has-gap fi-grid">
{{ $this->form }}
<div class="flex justify-center mt-10" style="margin-top: 20px;">
<button type="submit" class="inline-flex items-center justify-center gap-1 font-medium rounded-lg border transition-colors focus:outline-none focus:ring-offset-2 focus:ring-2 focus:ring-inset filament-button h-9 px-4 text-sm text-white shadow focus:ring-white border-transparent bg-primary-600 hover:bg-primary-500 focus:bg-primary-700 focus:ring-offset-primary-700 filament-page-button-action">
<x-filament::actions>
<x-filament::button type="submit">
{{__('filament-actions::edit.single.modal.actions.save.label')}}
</button>
</div>
</x-filament::button>
</x-filament::actions>
</form>
</x-filament::page>

View File

@@ -1,46 +1,51 @@
<div class="fi-ta-content relative divide-y divide-gray-200 overflow-x-auto dark:divide-white/10 dark:border-t-white/10">
<table class="fi-ta-table w-full table-auto divide-y divide-gray-200 text-start dark:divide-white/5">
<thead class="divide-y divide-gray-200 dark:divide-white/5">
<tr class="bg-gray-50 dark:bg-white/5">
<th class="fi-ta-header-cell px-3 py-3.5 sm:first-of-type:ps-6 sm:last-of-type:pe-6 fi-table-header-cell-id">
<span class="group flex w-full items-center gap-x-1 whitespace-nowrap justify-start">
<span class="fi-ta-header-cell-label text-sm font-semibold text-gray-950 dark:text-white">
{{ __('label.exam.index_required_label') }}
</span>
</span>
</th>
<th class="fi-ta-header-cell px-3 py-3.5 sm:first-of-type:ps-6 sm:last-of-type:pe-6 fi-table-header-cell-id">
<span class="group flex w-full items-center gap-x-1 whitespace-nowrap justify-start">
<span class="fi-ta-header-cell-label text-sm font-semibold text-gray-950 dark:text-white">
{{ __('label.exam.index_required_value') }}
</span>
</span>
</th>
<th class="fi-ta-header-cell px-3 py-3.5 sm:first-of-type:ps-6 sm:last-of-type:pe-6 fi-table-header-cell-id">
<span class="group flex w-full items-center gap-x-1 whitespace-nowrap justify-start">
<span class="fi-ta-header-cell-label text-sm font-semibold text-gray-950 dark:text-white">
{{ __('label.exam.index_current_value') }}
</span>
</span>
</th>
<th class="fi-ta-header-cell px-3 py-3.5 sm:first-of-type:ps-6 sm:last-of-type:pe-6 fi-table-header-cell-id">
<span class="group flex w-full items-center gap-x-1 whitespace-nowrap justify-start">
<span class="fi-ta-header-cell-label text-sm font-semibold text-gray-950 dark:text-white">
{{ __('label.exam.index_result') }}
</span>
</span>
</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200 whitespace-nowrap dark:divide-white/5">
@foreach ($getState() as $index)
<tr class="dark:bg-gray-800">
<td class="fi-ta-cell p-0 first-of-type:ps-1 last-of-type:pe-1 sm:first-of-type:ps-3 sm:last-of-type:pe-3 fi-table-cell-id">{{ $index['index_formatted'] }}</td>
<td class="fi-ta-cell p-0 first-of-type:ps-1 last-of-type:pe-1 sm:first-of-type:ps-3 sm:last-of-type:pe-3 fi-table-cell-id">{{ $index['require_value_formatted'] }}</td>
<td class="fi-ta-cell p-0 first-of-type:ps-1 last-of-type:pe-1 sm:first-of-type:ps-3 sm:last-of-type:pe-3 fi-table-cell-id">{{ $index['current_value_formatted'] }}</td>
<td class="fi-ta-cell p-0 first-of-type:ps-1 last-of-type:pe-1 sm:first-of-type:ps-3 sm:last-of-type:pe-3 fi-table-cell-id">{!! $index['index_result'] !!}</td>
<div class="fi-ta-ctn">
<div class="fi-ta-content-ctn">
<table class="fi-ta-table">
<thead>
<tr>
<th class="fi-ta-header-cell fi-ta-header-cell-id">
{{ __('label.exam.index_required_label') }}
</th>
<th class="fi-ta-header-cell fi-ta-header-cell-id">
{{ __('label.exam.index_required_value') }}
</th>
<th class="fi-ta-header-cell fi-ta-header-cell-id">
{{ __('label.exam.index_current_value') }}
</th>
<th class="fi-ta-header-cell fi-ta-header-cell-id">
{{ __('label.exam.index_result') }}
</th>
</tr>
@endforeach
</tbody>
</table>
</thead>
<tbody class="divide-y divide-gray-200 whitespace-nowrap dark:divide-white/5">
@foreach ($getState() as $index)
<tr class="fi-ta-row">
<td class="fi-ta-cell fi-ta-cell-id">
<div class="fi-ta-col">
<div class="fi-size-sm fi-ta-text-item fi-ta-text">{{ $index['index_formatted'] }}</div>
</div>
</td>
<td class="fi-ta-cell fi-ta-cell-id">
<div class="fi-ta-col">
<div
class="fi-size-sm fi-ta-text-item fi-ta-text">{{ $index['require_value_formatted'] }}</div>
</div>
</td>
<td class="fi-ta-cell fi-ta-cell-id">
<div class="fi-ta-col">
<div
class="fi-size-sm fi-ta-text-item fi-ta-text">{{ $index['current_value_formatted'] }}</div>
</div>
</td>
<td class="fi-ta-cell fi-ta-cell-id">
<div class="fi-ta-col">
<div class="fi-size-sm fi-ta-text-item fi-ta-text">{!! $index['index_result'] !!}</div>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>

View File

@@ -4,18 +4,20 @@
<x-filament-widgets::widget class="fi-account-widget">
<x-filament::section>
<div class="flex items-center gap-x-3">
<x-filament-panels::avatar.user
size="lg"
:user="$user"
loading="lazy"
/>
<div class="flex-1">
<h2
class="grid flex-1 text-base font-semibold leading-6 text-gray-950 dark:text-white"
>
{{ __('filament-panels::widgets/account-widget.welcome', ['app' => config('app.name')]) }},
{{ filament()->getUserName($user) . '(' . $user->classText . ')' }}
</h2>
</div>
<div class="fi-account-widget-main">
<h2 class="fi-account-widget-heading">
{{ __('filament-panels::widgets/account-widget.welcome', ['app' => config('app.name')]) }}
</h2>
<p class="fi-account-widget-user-name">
{{ filament()->getUserName($user) . ' (' . $user->classText . ')' }}
</p>
</div>
</x-filament::section>
</x-filament-widgets::widget>

View File

@@ -1,36 +1,33 @@
<x-filament-widgets::widget class="fi-wi-table">
<div class="filament-widgets-card rounded-lg border border-gray-300 dark:border-gray-700 bg-white dark:bg-gray-800 shadow-sm p-6">
<!-- Header Section -->
<div class="fi-ta-header flex flex-col gap-3 p-4 sm:px-6 sm:flex-row sm:items-center">
<div class="grid gap-y-1">
<h3 class="fi-ta-header-heading text-base font-semibold leading-6 text-gray-950 dark:text-white">
{{ $header }}
</h3>
</div>
</div>
<!-- Table Section -->
<div class="fi-ta-content border-t relative divide-y divide-gray-200 overflow-x-auto dark:divide-white/10 dark:border-t-white/10">
<table class="fi-ta-table w-full table-auto divide-y divide-gray-200 text-start dark:divide-white/5">
<tbody class="divide-y divide-gray-200 whitespace-nowrap dark:divide-white/5">
@foreach(array_chunk($data, 2) as $chunk)
<tr class="bg-white dark:bg-gray-800">
@foreach($chunk as $item)
<th class="fi-ta-header-cell px-3 py-3.5 sm:first-of-type:ps-6 sm:last-of-type:pe-6 fi-table-header-cell-id">
{{$item['text']}}
</th>
<td class="fi-ta-cell p-0 first-of-type:ps-1 last-of-type:pe-1 sm:first-of-type:ps-3 sm:last-of-type:pe-3 fi-table-cell-id"
@if($loop->count == 1)
colspan="3"
@endif
>
<div class="{{$item['class'] ?? ''}}">{{$item['value']}}</div>
</td>
@endforeach
</tr>
@endforeach
</tbody>
</table>
<x-filament-widgets::widget class="fi-ta-ctn fi-ta-ctn-with-header">
<!-- Header Section -->
<div class="fi-ta-header">
<div>
<h2 class="fi-ta-header-heading">
{{$header}}
</h2>
</div>
</div>
<!-- Table Section -->
<div class="fi-ta-content-ctn">
<table class="fi-ta-table">
<tbody>
@foreach(array_chunk($data, 2) as $chunk)
<tr>
@foreach($chunk as $item)
<th class="fi-ta-header-cell fi-ta-header-cell-id">
{{$item['text']}}
</th>
<td class="fi-ta-cell fi-table-cell-id"
@if($loop->count == 1)
colspan="3"
@endif
>
<div class="{{$item['class'] ?? ''}}">{{$item['value']}}</div>
</td>
@endforeach
</tr>
@endforeach
</tbody>
</table>
</div>
</x-filament-widgets::widget>