统一后台列表页样式并调整站长菜单

This commit is contained in:
2026-04-26 18:10:37 +08:00
parent 61cfc2091c
commit 00270b3904
36 changed files with 2590 additions and 2345 deletions
@@ -4,6 +4,8 @@
@section('title', '节日福利管理')
@section('content')
@php require resource_path('views/admin/partials/list-theme.php'); @endphp
@php
$visibleEvents = $events->getCollection();
$enabledCount = $visibleEvents->where('enabled', true)->count();
@@ -24,14 +26,13 @@
];
@endphp
<div class="space-y-6">
{{-- 页头 --}}
<div class="rounded-xl border border-gray-100 bg-white p-5 shadow-sm">
<div class="{{ $adminListPageClass }}">
<div class="{{ $adminListHeaderCardClass }}">
<div class="flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between">
<div class="space-y-2">
<div>
<h2 class="text-xl font-black tracking-tight text-slate-800">节日福利管理</h2>
<p class="mt-1 text-sm text-slate-500">统一维护节日福利模板与触发计划。</p>
<h2 class="{{ $adminListHeaderTitleClass }}">节日福利管理</h2>
<p class="{{ $adminListHeaderSubtitleClass }}">统一维护节日福利模板与触发计划。</p>
</div>
<div class="flex flex-wrap gap-2 text-xs font-semibold">
<span class="rounded-full bg-slate-100 px-3 py-1 text-slate-600">当前页 {{ $visibleEvents->count() }} 个活动</span>
@@ -41,40 +42,39 @@
</div>
<a href="{{ route('admin.holiday-events.create') }}"
class="inline-flex items-center justify-center gap-2 rounded-lg bg-amber-500 px-4 py-2.5 text-sm font-bold text-white shadow-sm transition hover:bg-amber-600">
class="inline-flex items-center justify-center gap-2 rounded-lg bg-amber-500 px-4 py-2.5 text-sm font-semibold text-white shadow-sm transition hover:bg-amber-600">
<span class="text-base leading-none"></span>
<span>创建活动</span>
</a>
</div>
</div>
{{-- 列表 --}}
<div class="overflow-hidden rounded-xl border border-gray-100 bg-white shadow-sm">
<div class="border-b border-gray-100 px-6 py-3">
<div class="{{ $adminListCardClass }}">
<div class="{{ $adminListSectionHeadClass }}">
<div class="flex flex-col gap-1 lg:flex-row lg:items-center lg:justify-between">
<div>
<h3 class="text-base font-bold text-slate-800">福利模板列表</h3>
<p class="mt-1 text-xs text-slate-500">列表按关键信息压缩展示,适合批量查看。</p>
<h3 class="{{ $adminListSectionTitleClass }}">福利模板列表</h3>
<p class="{{ $adminListSectionDescClass }}">列表按关键信息压缩展示,适合批量查看。</p>
</div>
<div class="text-xs text-slate-400">年度模板额外显示月日、持续天数、轮次与轮次间隔</div>
</div>
</div>
<div class="overflow-x-auto">
<div class="{{ $adminListTableWrapClass }}">
<table class="min-w-[1120px] w-full table-fixed text-sm">
<thead class="bg-slate-50 text-left text-xs font-bold uppercase tracking-[0.16em] text-slate-500">
<tr>
<th class="px-4 py-3 w-14">编号</th>
<th class="px-4 py-3 w-[25%]">活动信息</th>
<th class="px-4 py-3 w-[10%]">奖池</th>
<th class="px-4 py-3 w-[10%]">分配</th>
<th class="px-4 py-3 w-[11%]">限额 / 重复</th>
<th class="px-4 py-3 w-[15%]">触发计划</th>
<th class="px-4 py-3 w-[13%]">运行状态</th>
<th class="px-4 py-3 w-[16%] text-right">操作</th>
<thead>
<tr class="{{ $adminListTableHeadRowClass }}">
<th class="{{ $adminListTableHeadCellClass }} w-14">编号</th>
<th class="{{ $adminListTableHeadCellClass }} w-[25%]">活动信息</th>
<th class="{{ $adminListTableHeadCellClass }} w-[10%]">奖池</th>
<th class="{{ $adminListTableHeadCellClass }} w-[10%]">分配</th>
<th class="{{ $adminListTableHeadCellClass }} w-[11%]">限额 / 重复</th>
<th class="{{ $adminListTableHeadCellClass }} w-[15%]">触发计划</th>
<th class="{{ $adminListTableHeadCellClass }} w-[13%]">运行状态</th>
<th class="{{ $adminListTableHeadCellClass }} w-[16%] text-right">操作</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-100">
<tbody class="{{ $adminListTableBodyClass }}">
@forelse ($events as $event)
@php
[$statusLabel, $statusClass] = $statusMap[$event->status] ?? ['未知', 'bg-slate-100 text-slate-600'];
@@ -203,14 +203,14 @@
method="POST" data-holiday-event-confirm="确定立即触发此活动吗?">
@csrf
<button type="submit"
class="inline-flex items-center justify-center rounded-lg bg-amber-500 px-3 py-2 text-xs font-bold text-white transition hover:bg-amber-600">
class="{{ $adminListActionButtonClass }} inline-flex items-center justify-center bg-amber-500 text-white hover:bg-amber-600">
立即触发
</button>
</form>
@endif
<a href="{{ route('admin.holiday-events.edit', $event) }}"
class="inline-flex items-center justify-center rounded-lg bg-indigo-50 px-3 py-2 text-xs font-bold text-indigo-700 transition hover:bg-indigo-100">
class="{{ $adminListActionButtonClass }} inline-flex items-center justify-center bg-indigo-50 text-indigo-700 hover:bg-indigo-100">
编辑
</a>
@@ -219,7 +219,7 @@
@csrf
@method('DELETE')
<button type="submit"
class="inline-flex items-center justify-center rounded-lg bg-rose-50 px-3 py-2 text-xs font-bold text-rose-600 transition hover:bg-rose-100">
class="{{ $adminListActionButtonClass }} inline-flex items-center justify-center bg-rose-50 text-rose-600 hover:bg-rose-100">
删除
</button>
</form>
@@ -228,7 +228,7 @@
</tr>
@empty
<tr>
<td colspan="8" class="px-6 py-16 text-center text-slate-400">
<td colspan="8" class="{{ $adminListEmptyClass }}">
暂无节日福利活动,<a href="{{ route('admin.holiday-events.create') }}"
class="font-bold text-amber-500 hover:text-amber-600">立即创建一个</a>
</td>
@@ -239,7 +239,7 @@
</div>
@if ($events->hasPages())
<div class="border-t border-gray-100 px-6 py-4">
<div class="{{ $adminListPaginationClass }}">
{{ $events->links() }}
</div>
@endif