metacubexd/src/components/IPv6Support.tsx
ak 4d5543c64b
feat: add support for IPv6 check (#403)
* feat: add support for IPv6 check

* Update src/i18n/en.ts

Co-authored-by: kunish <17328586+kunish@users.noreply.github.com>
Signed-off-by: ak <140048181+arkxfly@users.noreply.github.com>

* Update src/i18n/zh.ts

Co-authored-by: kunish <17328586+kunish@users.noreply.github.com>
Signed-off-by: ak <140048181+arkxfly@users.noreply.github.com>

---------

Signed-off-by: ak <140048181+arkxfly@users.noreply.github.com>
Co-authored-by: kunish <17328586+kunish@users.noreply.github.com>
2023-10-22 13:00:09 +08:00

16 lines
426 B
TypeScript

import { Show, createMemo } from 'solid-js'
import { useProxies } from '~/signals'
export const IPv6Support = (props: { name?: string }) => {
const { proxyIPv6SupportMap } = useProxies()
const support = createMemo(() => proxyIPv6SupportMap()[props.name!] === true)
return (
<Show when={support()}>
<span class="badge badge-sm p-px">
<span class="scale-75">IPv6</span>
</span>
</Show>
)
}