From 83f41787903e0ba5221ce44420aaca619606e2f8 Mon Sep 17 00:00:00 2001 From: sky121113 Date: Tue, 12 May 2026 09:03:32 +0800 Subject: [PATCH] =?UTF-8?q?[FIX]=20=E8=A3=9C=E5=85=A8=E9=81=A0=E7=AB=AF?= =?UTF-8?q?=E6=8C=87=E4=BB=A4=E4=B8=AD=E5=BF=83=E6=AD=B7=E5=8F=B2=E7=B4=80?= =?UTF-8?q?=E9=8C=84=E9=A0=81=E9=9D=A2=E7=9A=84=E9=80=BE=E6=99=82=20(Timeo?= =?UTF-8?q?ut)=20=E6=A8=A3=E5=BC=8F=E8=88=87=E5=A4=9A=E8=AA=9E=E7=B3=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 更新 index.blade.php 的 Alpine.js translations 物件,新增 'Timeout' 與詳細備註的翻譯映射。 2. 修正 index.blade.php 的 getCommandBadgeClass 與 getCommandStatus,補全 timeout 狀態的樣式 (rose) 與顯示文字。 3. 於 tab-history-index.blade.php 補全逾時狀態的小圓點視覺引導 (dot logic)。 4. 在歷史紀錄篩選下拉選單中加入「逾時 (Timeout)」選項。 --- resources/views/admin/remote/index.blade.php | 9 +++++++-- .../admin/remote/partials/tab-history-index.blade.php | 5 +++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/resources/views/admin/remote/index.blade.php b/resources/views/admin/remote/index.blade.php index 6be2763..7b4262e 100644 --- a/resources/views/admin/remote/index.blade.php +++ b/resources/views/admin/remote/index.blade.php @@ -46,9 +46,11 @@ 'Success' => __('Success'), 'Failed' => __('Failed'), 'Superseded' => __('Superseded'), + 'Timeout' => __('Timeout'), 'System' => __('System'), 'Superseded by new adjustment' => __('Superseded by new adjustment'), 'Superseded by new command' => __('Superseded by new command'), + 'Superseded by new command (Timeout)' => __('Superseded by new command (Timeout)'), 'Slot' => __('Slot'), 'Stock' => __('Stock'), 'Expiry' => __('Expiry'), @@ -424,6 +426,7 @@ case 'sent': return 'bg-cyan-100 text-cyan-600 dark:bg-cyan-500/10 dark:text-cyan-400 border-cyan-200 dark:border-cyan-500/20'; case 'success': return 'bg-emerald-100 text-emerald-600 dark:bg-emerald-500/10 dark:text-emerald-400 border-emerald-200 dark:border-emerald-500/20'; case 'failed': return 'bg-rose-100 text-rose-600 dark:bg-rose-500/10 dark:text-rose-400 border-rose-200 dark:border-rose-500/20'; + case 'timeout': return 'bg-rose-100 text-rose-600 dark:bg-rose-500/10 dark:text-rose-400 border-rose-200 dark:border-rose-500/20'; case 'superseded': return 'bg-slate-100 text-slate-500 dark:bg-slate-500/10 dark:text-slate-400 border-slate-200 dark:border-slate-500/20 opacity-80'; default: return 'bg-slate-100 text-slate-600 border-slate-200'; } @@ -449,7 +452,8 @@ 'sent': this.translations['Sent'], 'success': this.translations['Success'], 'failed': this.translations['Failed'], - 'superseded': this.translations['Superseded'] + 'superseded': this.translations['Superseded'], + 'timeout': this.translations['Timeout'] }; return statuses[status] || status; }, @@ -462,7 +466,8 @@ if (!note) return ''; const translations = { 'Superseded by new adjustment': this.translations['Superseded by new adjustment'], - 'Superseded by new command': this.translations['Superseded by new command'] + 'Superseded by new command': this.translations['Superseded by new command'], + 'Superseded by new command (Timeout)': this.translations['Superseded by new command (Timeout)'] }; return translations[note] || note; }, diff --git a/resources/views/admin/remote/partials/tab-history-index.blade.php b/resources/views/admin/remote/partials/tab-history-index.blade.php index 9d09f8d..9d7030c 100644 --- a/resources/views/admin/remote/partials/tab-history-index.blade.php +++ b/resources/views/admin/remote/partials/tab-history-index.blade.php @@ -96,6 +96,7 @@ 'success' => __('Success'), 'failed' => __('Failed'), 'superseded' => __('Superseded'), + 'timeout' => __('Timeout'), ]" :selected="request('status')" :placeholder="__('All Status')" :hasSearch="false" @change="searchInTab('history')" /> @@ -223,7 +224,7 @@ 'bg-amber-500 animate-pulse': {{ Js::from($item->status) }} === 'pending', 'bg-cyan-500': {{ Js::from($item->status) }} === 'sent', 'bg-emerald-500': {{ Js::from($item->status) }} === 'success', - 'bg-rose-500': {{ Js::from($item->status) }} === 'failed', + 'bg-rose-500': {{ Js::from($item->status) }} === 'failed' || {{ Js::from($item->status) }} === 'timeout', 'bg-slate-400': {{ Js::from($item->status) }} === 'superseded' }"> @@ -282,7 +283,7 @@ 'bg-amber-500 animate-pulse': {{ Js::from($item->status) }} === 'pending', 'bg-cyan-500': {{ Js::from($item->status) }} === 'sent', 'bg-emerald-500': {{ Js::from($item->status) }} === 'success', - 'bg-rose-500': {{ Js::from($item->status) }} === 'failed', + 'bg-rose-500': {{ Js::from($item->status) }} === 'failed' || {{ Js::from($item->status) }} === 'timeout', 'bg-slate-400': {{ Js::from($item->status) }} === 'superseded' }">