mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-24 09:45:35 +08:00
refactor: rule provider card
This commit is contained in:
parent
c6f3beec35
commit
1bca408ea1
@ -84,28 +84,24 @@ export default () => {
|
|||||||
<For each={rulesProviders()}>
|
<For each={rulesProviders()}>
|
||||||
{(rulesProvider) => (
|
{(rulesProvider) => (
|
||||||
<div class="card card-bordered card-compact mb-2 bg-base-200 p-4">
|
<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 pr-8">
|
||||||
<div class="break-all">
|
{rulesProvider.name} ({rulesProvider.ruleCount})
|
||||||
{rulesProvider.name} ({rulesProvider.ruleCount})
|
|
||||||
</div>
|
|
||||||
<Button
|
|
||||||
class="btn-circle btn-sm mr-2"
|
|
||||||
onClick={(e) =>
|
|
||||||
onUpdateProviderClick(e, rulesProvider.name)
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<IconReload
|
|
||||||
class={twMerge(
|
|
||||||
updatingMap()[rulesProvider.name] &&
|
|
||||||
'animate-spin text-success',
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</Button>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="text-xs text-slate-500">
|
<div class="text-xs text-slate-500">
|
||||||
{rulesProvider.vehicleType} / {rulesProvider.behavior} /
|
{rulesProvider.vehicleType} / {rulesProvider.behavior} /
|
||||||
{t('updated')} {formatTimeFromNow(rulesProvider.updatedAt)}
|
{t('updated')} {formatTimeFromNow(rulesProvider.updatedAt)}
|
||||||
</div>
|
</div>
|
||||||
|
<Button
|
||||||
|
class="btn-circle btn-sm absolute right-2 top-2 mr-2 h-4"
|
||||||
|
onClick={(e) => onUpdateProviderClick(e, rulesProvider.name)}
|
||||||
|
>
|
||||||
|
<IconReload
|
||||||
|
class={twMerge(
|
||||||
|
updatingMap()[rulesProvider.name] &&
|
||||||
|
'animate-spin text-success',
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</For>
|
</For>
|
||||||
|
Loading…
Reference in New Issue
Block a user