feat: update proxy layout

This commit is contained in:
kunish 2023-08-31 00:45:51 +08:00
parent 2ca99f1040
commit b60c85566c
No known key found for this signature in database
GPG Key ID: 647A12B4F782C430
3 changed files with 15 additions and 12 deletions

View File

@ -31,7 +31,7 @@ const Collapse: ParentComponent<Props> = (props) => {
)} )}
> >
<div <div
class={'collapse-title text-xl font-medium'} class="collapse-title text-xl font-medium"
onClick={() => onCollapse(!props.isOpen)} onClick={() => onCollapse(!props.isOpen)}
> >
{title} {title}

View File

@ -33,7 +33,7 @@ export default (props: {
const t = type.toLowerCase() const t = type.toLowerCase()
if (t === 'shadowsocks') { if (t === 'shadowsocks') {
return 'SS' return 'ss'
} }
return t return t

View File

@ -40,19 +40,22 @@ export default () => {
<For each={proxies()}> <For each={proxies()}>
{(proxy) => { {(proxy) => {
const title = ( const title = (
<> <div class="flex items-center justify-between">
<div class="flex items-center gap-2"> <div class="flex flex-col">
<span>{proxy.name}</span> <span>{proxy.name}</span>
<IconBrandSpeedtest <div class="text-sm text-slate-500">
class="cursor-pointer" {proxy.type} :: {proxy.now}
onClick={(e) => onSpeedTestClick(e, proxy.name)} </div>
/>
</div> </div>
<div class="text-sm text-slate-500">
{proxy.type} :: {proxy.now} <button
</div> class="btn btn-circle btn-sm"
</> onClick={(e) => onSpeedTestClick(e, proxy.name)}
>
<IconBrandSpeedtest />
</button>
</div>
) )
const content = ( const content = (