diff --git a/src/components/ProxyNodePreview.tsx b/src/components/ProxyNodePreview.tsx index df0b4f2..50a28ac 100644 --- a/src/components/ProxyNodePreview.tsx +++ b/src/components/ProxyNodePreview.tsx @@ -5,7 +5,10 @@ import ProxyPreviewBar from './ProxyPreviewBar' import ProxyPreviewDots from './ProxyPreviewDots' export default (props: { proxyNameList: string[]; now?: string }) => { + const off = () => proxiesPreviewType() === PROXIES_PREVIEW_TYPE.OFF + const isSmallGroup = createMemo(() => props.proxyNameList.length <= 30) + const isShowBar = createMemo(() => { const type = proxiesPreviewType() @@ -25,13 +28,13 @@ export default (props: { proxyNameList: string[]; now?: string }) => { }) return ( - <> + - + ) } diff --git a/src/config/enum.ts b/src/config/enum.ts index 22033b3..83d2bad 100644 --- a/src/config/enum.ts +++ b/src/config/enum.ts @@ -31,6 +31,7 @@ export enum DELAY { } export enum PROXIES_PREVIEW_TYPE { + OFF = 'off', DOTS = 'dots', BAR = 'bar', Auto = 'auto', diff --git a/src/i18n/en.ts b/src/i18n/en.ts index 25323ba..049e13d 100644 --- a/src/i18n/en.ts +++ b/src/i18n/en.ts @@ -37,6 +37,7 @@ export default { dots: 'Dots', bar: 'Bar', auto: 'Auto', + off: 'Off', proxiesPreviewType: 'Proxies preview type', urlForDelayTest: 'Url for delay test', autoCloseConns: 'Automatically close all connections', diff --git a/src/i18n/zh.ts b/src/i18n/zh.ts index be3ac99..e026ec2 100644 --- a/src/i18n/zh.ts +++ b/src/i18n/zh.ts @@ -37,6 +37,7 @@ export default { dots: '点阵', bar: '条形', auto: '自适应', + off: '关闭', proxiesPreviewType: '节点组预览样式', urlForDelayTest: '测速链接', autoCloseConns: '切换代理时自动断开全部连接',