mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-24 09:45: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'
|
import ProxyPreviewDots from './ProxyPreviewDots'
|
||||||
|
|
||||||
export default (props: { proxyNameList: string[]; now?: string }) => {
|
export default (props: { proxyNameList: string[]; now?: string }) => {
|
||||||
|
const off = () => proxiesPreviewType() === PROXIES_PREVIEW_TYPE.OFF
|
||||||
|
|
||||||
const isSmallGroup = createMemo(() => props.proxyNameList.length <= 30)
|
const isSmallGroup = createMemo(() => props.proxyNameList.length <= 30)
|
||||||
|
|
||||||
const isShowBar = createMemo(() => {
|
const isShowBar = createMemo(() => {
|
||||||
const type = proxiesPreviewType()
|
const type = proxiesPreviewType()
|
||||||
|
|
||||||
@ -25,13 +28,13 @@ export default (props: { proxyNameList: string[]; now?: string }) => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<Show when={!off()}>
|
||||||
<Show when={isShowBar()}>
|
<Show when={isShowBar()}>
|
||||||
<ProxyPreviewBar proxyNameList={props.proxyNameList} now={props.now} />
|
<ProxyPreviewBar proxyNameList={props.proxyNameList} now={props.now} />
|
||||||
</Show>
|
</Show>
|
||||||
<Show when={isShowDots()}>
|
<Show when={isShowDots()}>
|
||||||
<ProxyPreviewDots proxyNameList={props.proxyNameList} now={props.now} />
|
<ProxyPreviewDots proxyNameList={props.proxyNameList} now={props.now} />
|
||||||
</Show>
|
</Show>
|
||||||
</>
|
</Show>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,7 @@ export enum DELAY {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export enum PROXIES_PREVIEW_TYPE {
|
export enum PROXIES_PREVIEW_TYPE {
|
||||||
|
OFF = 'off',
|
||||||
DOTS = 'dots',
|
DOTS = 'dots',
|
||||||
BAR = 'bar',
|
BAR = 'bar',
|
||||||
Auto = 'auto',
|
Auto = 'auto',
|
||||||
|
@ -37,6 +37,7 @@ export default {
|
|||||||
dots: 'Dots',
|
dots: 'Dots',
|
||||||
bar: 'Bar',
|
bar: 'Bar',
|
||||||
auto: 'Auto',
|
auto: 'Auto',
|
||||||
|
off: 'Off',
|
||||||
proxiesPreviewType: 'Proxies preview type',
|
proxiesPreviewType: 'Proxies preview type',
|
||||||
urlForDelayTest: 'Url for delay test',
|
urlForDelayTest: 'Url for delay test',
|
||||||
autoCloseConns: 'Automatically close all connections',
|
autoCloseConns: 'Automatically close all connections',
|
||||||
|
@ -37,6 +37,7 @@ export default {
|
|||||||
dots: '点阵',
|
dots: '点阵',
|
||||||
bar: '条形',
|
bar: '条形',
|
||||||
auto: '自适应',
|
auto: '自适应',
|
||||||
|
off: '关闭',
|
||||||
proxiesPreviewType: '节点组预览样式',
|
proxiesPreviewType: '节点组预览样式',
|
||||||
urlForDelayTest: '测速链接',
|
urlForDelayTest: '测速链接',
|
||||||
autoCloseConns: '切换代理时自动断开全部连接',
|
autoCloseConns: '切换代理时自动断开全部连接',
|
||||||
|
Loading…
Reference in New Issue
Block a user