feat(proxy): keep tab at the top

This commit is contained in:
kunish 2023-09-06 22:47:02 +08:00
parent 08ed61045f
commit 1bb36a1bd6
No known key found for this signature in database
GPG Key ID: 647A12B4F782C430

View File

@ -96,9 +96,9 @@ export default () => {
] ]
return ( return (
<div class="flex flex-col gap-2"> <div class="flex h-full flex-col gap-2">
<div class="flex items-center justify-between gap-2"> <div class="flex items-center justify-between gap-2">
<div class="tabs tabs-boxed gap-2"> <div class="tabs-boxed tabs gap-2">
<For each={tabs()}> <For each={tabs()}>
{(tab) => ( {(tab) => (
<button <button
@ -128,6 +128,7 @@ export default () => {
</Button> </Button>
</div> </div>
<div class="flex-1 overflow-y-auto">
<Show <Show
when={ when={
activeTab() === ActiveTab.all || activeTab() === ActiveTab.all ||
@ -171,7 +172,9 @@ export default () => {
<Button <Button
class="btn btn-circle btn-sm" class="btn btn-circle btn-sm"
disabled={healthCheckingMap()[proxyProvider.name]} disabled={healthCheckingMap()[proxyProvider.name]}
onClick={(e) => onHealthCheckClick(e, proxyProvider.name)} onClick={(e) =>
onHealthCheckClick(e, proxyProvider.name)
}
> >
<IconBrandSpeedtest <IconBrandSpeedtest
class={twMerge( class={twMerge(
@ -286,5 +289,6 @@ export default () => {
/> />
</Show> </Show>
</div> </div>
</div>
) )
} }