star-cloud/resources/views/admin/app/_tabs.blade.php
terrylee bfbe311503 feat(app-ui): APP UI元素設定 Phase 1 — 後台三頁(元素/組合/機台綁定)+ B014 UISet 下發
- ui_elements/ui_bundles/ui_bundle_items 三表 + Models(TenantScoped)
- config/ui_parts.php 部位定義(Phase 1 啟用 A1/A2/A3 滿版)
- UiElementController 三頁 CRUD + 圖片上傳(ImageHandler storeAsWebp)
- 機台綁定存 machines.settings['ui_bundle_id']
- B014 getSettings 新增 UISet(部位→絕對圖URL,mirror B005)
- 解除 sidebar APP管理 註解 + can:menu.app + 權限白名單
- zh_TW/en 翻譯

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-15 12:45:50 +08:00

41 lines
1.7 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="mb-6">
<div class="flex items-center justify-between">
<div>
<h3 class="text-gray-900 dark:text-gray-100 text-2xl font-semibold">{{ __('APP Management') }}</h3>
<p class="text-sm text-rose-500 mt-1">{{ __('UI Elements') }}</p>
</div>
</div>
<div class="mt-4 inline-flex rounded-lg bg-gray-100 dark:bg-gray-800 p-1 gap-1">
@foreach($tabs as $key => $tab)
<a href="{{ route($tab['route']) }}"
class="px-4 py-2 text-sm font-medium rounded-md transition-colors
{{ ($active ?? '') === $key
? 'bg-emerald-600 text-white shadow'
: 'text-gray-600 dark:text-gray-300 hover:bg-white/60 dark:hover:bg-gray-700' }}">
{{ $tab['label'] }}
</a>
@endforeach
</div>
</div>
@if(session('success'))
<div class="mb-4 rounded-lg bg-emerald-100 dark:bg-emerald-900/40 text-emerald-800 dark:text-emerald-200 px-4 py-3 text-sm">
{{ session('success') }}
</div>
@endif
@if($errors->any())
<div class="mb-4 rounded-lg bg-rose-100 dark:bg-rose-900/40 text-rose-800 dark:text-rose-200 px-4 py-3 text-sm">
<ul class="list-disc ps-5">
@foreach($errors->all() as $error)<li>{{ $error }}</li>@endforeach
</ul>
</div>
@endif