[FIX] 補全遠端指令中心歷史紀錄頁面的逾時 (Timeout) 樣式與多語系
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)」選項。
This commit is contained in:
parent
3bb5d8cfcc
commit
83f4178790
@ -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;
|
||||
},
|
||||
|
||||
@ -96,6 +96,7 @@
|
||||
'success' => __('Success'),
|
||||
'failed' => __('Failed'),
|
||||
'superseded' => __('Superseded'),
|
||||
'timeout' => __('Timeout'),
|
||||
]" :selected="request('status')" :placeholder="__('All Status')" :hasSearch="false" @change="searchInTab('history')" />
|
||||
</div>
|
||||
|
||||
@ -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'
|
||||
}"></div>
|
||||
<span x-text="getCommandStatus({{ Js::from($item->status) }})"></span>
|
||||
@ -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'
|
||||
}"></div>
|
||||
<span x-text="getCommandStatus({{ Js::from($item->status) }})"></span>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user