chore(admin-ui): remove inline styles from platform order show and add layout helpers

This commit is contained in:
萝卜
2026-03-14 07:47:58 +00:00
parent ea842272c0
commit e7cd9c5e45
2 changed files with 19 additions and 10 deletions

View File

@@ -162,6 +162,8 @@ button.btn-sm{
textarea.w-full,input.w-full{width:100%;} textarea.w-full,input.w-full{width:100%;}
.pre-wrap{white-space:pre-wrap;}
.w-100{width:100px;} .w-100{width:100px;}
.w-120{width:120px;} .w-120{width:120px;}
.w-140{width:140px;} .w-140{width:140px;}
@@ -200,7 +202,14 @@ input.w-90{width:90px;}
.actions-spread{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;flex-wrap:wrap;} .actions-spread{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;flex-wrap:wrap;}
.inline-links,.card-link-list{display:flex;gap:8px;flex-wrap:wrap;} .inline-links,.card-link-list{display:flex;gap:8px;flex-wrap:wrap;}
/* Layout helpers */
.flex-between{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;}
.items-center{align-items:center;}
.gap-12{gap:12px;} .gap-12{gap:12px;}
.gap-10{gap:10px;}
.flex-between{display:flex;align-items:center;justify-content:space-between;}
.focus-box,.nav-box,.profile-box{padding:12px;border:1px solid #334155;border-radius:8px;} .focus-box,.nav-box,.profile-box{padding:12px;border:1px solid #334155;border-radius:8px;}
.summary-box,.stat-box,.status-card,.status-link{padding:12px;border:1px solid #334155;border-radius:8px;} .summary-box,.stat-box,.status-card,.status-link{padding:12px;border:1px solid #334155;border-radius:8px;}

View File

@@ -387,8 +387,8 @@
</div> </div>
<div class="card mb-20" id="payment-receipts"> <div class="card mb-20" id="payment-receipts">
<div class="flex-between" style="align-items:center;"> <div class="flex-between items-center">
<h3 style="margin:0;">支付回执(对账留痕)</h3> <h3 class="mb-0">支付回执(对账留痕)</h3>
@php @php
$makeExportLedgerUrl = function (array $query = []) use ($order) { $makeExportLedgerUrl = function (array $query = []) use ($order) {
// download 必须显式为 1导出安全阀且为了测试/口径稳定,固定放在 query 的第一位 // download 必须显式为 1导出安全阀且为了测试/口径稳定,固定放在 query 的第一位
@@ -397,7 +397,7 @@
return '/admin/platform-orders/' . $order->id . '/export-ledger?' . \Illuminate\Support\Arr::query($query); return '/admin/platform-orders/' . $order->id . '/export-ledger?' . \Illuminate\Support\Arr::query($query);
}; };
@endphp @endphp
<div class="muted" style="display:flex; gap:10px;"> <div class="muted inline-links">
<a class="muted" href="{!! $makeExportLedgerUrl() !!}" target="_blank" rel="noopener">导出对账明细CSV</a> <a class="muted" href="{!! $makeExportLedgerUrl() !!}" target="_blank" rel="noopener">导出对账明细CSV</a>
<a class="muted" href="{!! $makeExportLedgerUrl(['include_order_snapshot' => 1]) !!}" target="_blank" rel="noopener">导出含订单摘要CSV</a> <a class="muted" href="{!! $makeExportLedgerUrl(['include_order_snapshot' => 1]) !!}" target="_blank" rel="noopener">导出含订单摘要CSV</a>
</div> </div>
@@ -592,11 +592,11 @@
<table> <table>
<thead> <thead>
<tr> <tr>
<th style="width:180px;">动作</th> <th class="w-200">动作</th>
<th style="width:120px;">范围</th> <th class="w-120">范围</th>
<th style="width:200px;">时间</th> <th class="w-200">时间</th>
<th style="width:100px;">管理员</th> <th class="w-120">管理员</th>
<th style="width:180px;">快照</th> <th class="w-200">快照</th>
<th>备注</th> <th>备注</th>
</tr> </tr>
</thead> </thead>
@@ -663,10 +663,10 @@
<div class="card"> <div class="card">
<h3>原始 metaJSON</h3> <h3>原始 metaJSON</h3>
<pre style="white-space: pre-wrap;">{{ json_encode($order->meta, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) }}</pre> <pre class="pre-wrap">{{ json_encode($order->meta, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) }}</pre>
</div> </div>
<div class="mb-20" style="margin-top:16px;"> <div class="mb-20 mt-16">
@php @php
$back = (string) request()->query('back', ''); $back = (string) request()->query('back', '');
// back 安全校验:只接受相对路径,且拒绝引号/尖括号,并拒绝 nested back避免潜在 XSS/URL 膨胀。 // back 安全校验:只接受相对路径,且拒绝引号/尖括号,并拒绝 nested back避免潜在 XSS/URL 膨胀。