metacubexd/src/components/ProxyNodePreview.tsx

19 lines
669 B
TypeScript
Raw Normal View History

2023-09-02 12:05:31 +08:00
import { Show } from 'solid-js'
import { PROXIES_PREVIEW_TYPE } from '~/config/enum'
2023-09-02 11:52:51 +08:00
import { proxiesPreviewType } from '~/pages/Config'
2023-09-02 12:05:31 +08:00
import ProxyPreviewBar from './ProxyPreviewBar'
import ProxyPreviewDots from './ProxyPreviewDots'
2023-09-02 11:52:51 +08:00
export default (props: { proxyNameList: string[]; now?: string }) => {
return (
<>
<Show when={proxiesPreviewType() === PROXIES_PREVIEW_TYPE.BAR}>
2023-09-02 12:05:31 +08:00
<ProxyPreviewBar proxyNameList={props.proxyNameList} now={props.now} />
2023-09-02 11:52:51 +08:00
</Show>
<Show when={proxiesPreviewType() === PROXIES_PREVIEW_TYPE.DOTS}>
2023-09-02 12:05:31 +08:00
<ProxyPreviewDots proxyNameList={props.proxyNameList} now={props.now} />
2023-09-02 11:52:51 +08:00
</Show>
</>
)
}