mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-11-14 06:25:35 +08:00
refactor: minor adjustments
This commit is contained in:
parent
84c70b0550
commit
9ffd0cf362
@ -14,10 +14,10 @@ export const ForTwoColumns = (props: { subChild: JSX.Element[] }) => {
|
|||||||
() => windowWidth() >= 640 && renderInTwoColumn(),
|
() => windowWidth() >= 640 && renderInTwoColumn(),
|
||||||
) // 640 is sm size in daisyui
|
) // 640 is sm size in daisyui
|
||||||
const leftCloumns = createMemo(() =>
|
const leftCloumns = createMemo(() =>
|
||||||
props.subChild.filter((i, index) => index % 2 === 0 || !isShowTwoColumns()),
|
props.subChild.filter((_, index) => index % 2 === 0 || !isShowTwoColumns()),
|
||||||
)
|
)
|
||||||
const rightCloumns = createMemo(() =>
|
const rightCloumns = createMemo(() =>
|
||||||
props.subChild.filter((i, index) => index % 2 === 1),
|
props.subChild.filter((_, index) => index % 2 === 1),
|
||||||
)
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -41,16 +41,24 @@ export const sortProxiesByOrderingType = (
|
|||||||
switch (orderingType) {
|
switch (orderingType) {
|
||||||
case PROXIES_ORDERING_TYPE.LATENCY_ASC:
|
case PROXIES_ORDERING_TYPE.LATENCY_ASC:
|
||||||
if (prevLatency === -1) return 1
|
if (prevLatency === -1) return 1
|
||||||
|
|
||||||
if (nextLatency === -1) return -1
|
if (nextLatency === -1) return -1
|
||||||
|
|
||||||
return prevLatency - nextLatency
|
return prevLatency - nextLatency
|
||||||
|
|
||||||
case PROXIES_ORDERING_TYPE.LATENCY_DESC:
|
case PROXIES_ORDERING_TYPE.LATENCY_DESC:
|
||||||
if (prevLatency === -1) return 1
|
if (prevLatency === -1) return 1
|
||||||
|
|
||||||
if (nextLatency === -1) return -1
|
if (nextLatency === -1) return -1
|
||||||
|
|
||||||
return nextLatency - prevLatency
|
return nextLatency - prevLatency
|
||||||
|
|
||||||
case PROXIES_ORDERING_TYPE.NAME_ASC:
|
case PROXIES_ORDERING_TYPE.NAME_ASC:
|
||||||
return a.localeCompare(b)
|
return a.localeCompare(b)
|
||||||
|
|
||||||
case PROXIES_ORDERING_TYPE.NAME_DESC:
|
case PROXIES_ORDERING_TYPE.NAME_DESC:
|
||||||
return b.localeCompare(a)
|
return b.localeCompare(a)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
:root,
|
:root,
|
||||||
[data-theme='wireframe'],
|
[data-theme='wireframe'],
|
||||||
[data-theme='cyberpunk'] {
|
[data-theme='cyberpunk'] {
|
||||||
font-family: '-apple-system', 'Fira Sans', 'Twemoji Mozilla', system-ui, monospace;
|
font-family: 'Fira Sans', 'Twemoji Mozilla', system-ui, monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
|
Loading…
Reference in New Issue
Block a user