feat: make persisted for ipv6 result (#983)

This commit is contained in:
YetAnotherZephyruso 2024-09-08 10:20:26 +08:00 committed by GitHub
parent 6bd2029a5c
commit 2078051d7c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,3 +1,4 @@
import { makePersisted } from '@solid-primitives/storage'
import { proxyGroupLatencyTestAPI, proxyLatencyTestAPI } from '~/apis'
import {
latencyQualityMap,
@ -5,9 +6,13 @@ import {
urlForIPv6SupportTest,
} from './config'
export const [proxyIPv6SupportMap, setProxyIPv6SupportMap] = createSignal<
Record<string, boolean>
>({})
export const [proxyIPv6SupportMap, setProxyIPv6SupportMap] = makePersisted(
createSignal<Record<string, boolean>>({}),
{
name: 'proxyIPv6SupportMap',
storage: localStorage,
},
)
export const proxyIPv6SupportTest = async (
proxyName: string,