- btn-luxury-primary/secondary + x-delete-confirm-modal
- 膠囊式頁籤(對齊 x-tab-nav 外觀)
- 「新增」改用 __('Create')=新增(不動全域 New=新值,那是 products 變更紀錄用)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
38 lines
2.0 KiB
PHP
38 lines
2.0 KiB
PHP
{{-- APP UI元素設定 共用標題 + 頁籤列。傳入 $active = elements | bundles | machines --}}
|
|
@php
|
|
$tabs = [
|
|
'elements' => ['label' => __('UI Elements'), 'route' => 'admin.app.ui-elements'],
|
|
'bundles' => ['label' => __('UI Bundles'), 'route' => 'admin.app.ui-bundles'],
|
|
'machines' => ['label' => __('Machine Binding'), 'route' => 'admin.app.ui-machines'],
|
|
];
|
|
@endphp
|
|
|
|
<div class="flex flex-col sm:flex-row sm:items-center justify-between gap-4 mb-6">
|
|
<h3 class="text-gray-900 dark:text-gray-200 text-3xl font-medium">{{ __('APP UI Elements') }}</h3>
|
|
|
|
<div class="flex items-center gap-1 p-1.5 bg-slate-100 dark:bg-slate-900/50 rounded-2xl border border-slate-200/50 dark:border-slate-800/50 overflow-x-auto w-full sm:w-fit [&::-webkit-scrollbar]:hidden">
|
|
@foreach($tabs as $key => $tab)
|
|
<a href="{{ route($tab['route']) }}"
|
|
class="px-6 py-3 rounded-xl text-sm font-black uppercase tracking-widest transition-all duration-300 whitespace-nowrap flex-1 sm:flex-none text-center
|
|
{{ ($active ?? '') === $key
|
|
? 'bg-white dark:bg-slate-800 text-cyan-600 dark:text-cyan-400 shadow-sm shadow-cyan-500/10'
|
|
: 'text-slate-400 hover:text-slate-600 dark:hover:text-slate-200' }}">
|
|
{{ $tab['label'] }}
|
|
</a>
|
|
@endforeach
|
|
</div>
|
|
</div>
|
|
|
|
@if(session('success'))
|
|
<div class="mb-4 rounded-xl bg-emerald-50 dark:bg-emerald-900/30 text-emerald-700 dark:text-emerald-300 border border-emerald-200/60 dark:border-emerald-800/50 px-4 py-3 text-sm font-medium">
|
|
{{ session('success') }}
|
|
</div>
|
|
@endif
|
|
@if($errors->any())
|
|
<div class="mb-4 rounded-xl bg-rose-50 dark:bg-rose-900/30 text-rose-700 dark:text-rose-300 border border-rose-200/60 dark:border-rose-800/50 px-4 py-3 text-sm">
|
|
<ul class="list-disc ps-5">
|
|
@foreach($errors->all() as $error)<li>{{ $error }}</li>@endforeach
|
|
</ul>
|
|
</div>
|
|
@endif
|