mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-10 05:15:35 +08:00
feat: add PROXIES_PREVIEW_TYPE - off
This commit is contained in:
parent
071a607124
commit
fec64133fa
@ -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 (
|
||||
<>
|
||||
<Show when={!off()}>
|
||||
<Show when={isShowBar()}>
|
||||
<ProxyPreviewBar proxyNameList={props.proxyNameList} now={props.now} />
|
||||
</Show>
|
||||
<Show when={isShowDots()}>
|
||||
<ProxyPreviewDots proxyNameList={props.proxyNameList} now={props.now} />
|
||||
</Show>
|
||||
</>
|
||||
</Show>
|
||||
)
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ export enum DELAY {
|
||||
}
|
||||
|
||||
export enum PROXIES_PREVIEW_TYPE {
|
||||
OFF = 'off',
|
||||
DOTS = 'dots',
|
||||
BAR = 'bar',
|
||||
Auto = 'auto',
|
||||
|
@ -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',
|
||||
|
@ -37,6 +37,7 @@ export default {
|
||||
dots: '点阵',
|
||||
bar: '条形',
|
||||
auto: '自适应',
|
||||
off: '关闭',
|
||||
proxiesPreviewType: '节点组预览样式',
|
||||
urlForDelayTest: '测速链接',
|
||||
autoCloseConns: '切换代理时自动断开全部连接',
|
||||
|
Loading…
Reference in New Issue
Block a user