refactor: rule provider card

This commit is contained in:
Zephyruso 2023-09-05 21:39:04 +08:00
parent c6f3beec35
commit 1bca408ea1

View File

@ -84,15 +84,16 @@ export default () => {
<For each={rulesProviders()}>
{(rulesProvider) => (
<div class="card card-bordered card-compact mb-2 bg-base-200 p-4">
<div class="flex items-center justify-between">
<div class="break-all">
<div class="break-all pr-8">
{rulesProvider.name} ({rulesProvider.ruleCount})
</div>
<div class="text-xs text-slate-500">
{rulesProvider.vehicleType} / {rulesProvider.behavior} /
{t('updated')} {formatTimeFromNow(rulesProvider.updatedAt)}
</div>
<Button
class="btn-circle btn-sm mr-2"
onClick={(e) =>
onUpdateProviderClick(e, rulesProvider.name)
}
class="btn-circle btn-sm absolute right-2 top-2 mr-2 h-4"
onClick={(e) => onUpdateProviderClick(e, rulesProvider.name)}
>
<IconReload
class={twMerge(
@ -102,11 +103,6 @@ export default () => {
/>
</Button>
</div>
<div class="text-xs text-slate-500">
{rulesProvider.vehicleType} / {rulesProvider.behavior} /
{t('updated')} {formatTimeFromNow(rulesProvider.updatedAt)}
</div>
</div>
)}
</For>
</div>