mirror of
https://github.com/MetaCubeX/metacubexd.git
synced 2024-12-26 07:24:10 +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(),
|
||||
) // 640 is sm size in daisyui
|
||||
const leftCloumns = createMemo(() =>
|
||||
props.subChild.filter((i, index) => index % 2 === 0 || !isShowTwoColumns()),
|
||||
props.subChild.filter((_, index) => index % 2 === 0 || !isShowTwoColumns()),
|
||||
)
|
||||
const rightCloumns = createMemo(() =>
|
||||
props.subChild.filter((i, index) => index % 2 === 1),
|
||||
props.subChild.filter((_, index) => index % 2 === 1),
|
||||
)
|
||||
|
||||
return (
|
||||
|
@ -41,16 +41,24 @@ export const sortProxiesByOrderingType = (
|
||||
switch (orderingType) {
|
||||
case PROXIES_ORDERING_TYPE.LATENCY_ASC:
|
||||
if (prevLatency === -1) return 1
|
||||
|
||||
if (nextLatency === -1) return -1
|
||||
|
||||
return prevLatency - nextLatency
|
||||
|
||||
case PROXIES_ORDERING_TYPE.LATENCY_DESC:
|
||||
if (prevLatency === -1) return 1
|
||||
|
||||
if (nextLatency === -1) return -1
|
||||
|
||||
return nextLatency - prevLatency
|
||||
|
||||
case PROXIES_ORDERING_TYPE.NAME_ASC:
|
||||
return a.localeCompare(b)
|
||||
|
||||
case PROXIES_ORDERING_TYPE.NAME_DESC:
|
||||
return b.localeCompare(a)
|
||||
|
||||
default:
|
||||
return 0
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
:root,
|
||||
[data-theme='wireframe'],
|
||||
[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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user