mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-01 03:42:07 +08:00
style(home): fix layout shift in current-proxy-card by adding fixed heights (#7494)
This commit is contained in:
+2
-1
@@ -17,7 +17,8 @@
|
||||
"enabled": true,
|
||||
"indentStyle": "space",
|
||||
"indentWidth": 2,
|
||||
"lineWidth": 80
|
||||
"lineWidth": 80,
|
||||
"lineEnding": "auto"
|
||||
},
|
||||
"javascript": {
|
||||
"formatter": {
|
||||
|
||||
@@ -28,7 +28,7 @@ import {
|
||||
useTheme,
|
||||
} from '@mui/material'
|
||||
import { useLockFn } from 'ahooks'
|
||||
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { useNavigate } from 'react-router'
|
||||
import { delayGroup } from 'tauri-plugin-mihomo-api'
|
||||
@@ -380,7 +380,9 @@ export const CurrentProxyCard = () => {
|
||||
(g: { type?: string }) =>
|
||||
g?.type === 'Selector' || g?.type === 'URLTest',
|
||||
)
|
||||
.forEach((selectableGroup: any) => registerGroup(selectableGroup))
|
||||
.forEach((selectableGroup: any) => {
|
||||
registerGroup(selectableGroup)
|
||||
})
|
||||
|
||||
const filteredGroups = Array.from(groupsMap.values())
|
||||
|
||||
@@ -582,7 +584,6 @@ export const CurrentProxyCard = () => {
|
||||
state.selection.group,
|
||||
state.selection.proxy,
|
||||
sortType,
|
||||
setDelaySortRefresh,
|
||||
])
|
||||
|
||||
useEffect(() => {
|
||||
@@ -883,7 +884,7 @@ export const CurrentProxyCard = () => {
|
||||
}
|
||||
>
|
||||
{isCoreDataPending ? (
|
||||
<Box sx={{ py: 4 }} />
|
||||
<Box sx={{ py: 4, height: 24 }} />
|
||||
) : currentProxy ? (
|
||||
<Box>
|
||||
{/* 代理节点信息显示 */}
|
||||
@@ -1049,7 +1050,11 @@ export const CurrentProxyCard = () => {
|
||||
</Box>
|
||||
) : (
|
||||
<Box sx={{ textAlign: 'center', py: 4 }}>
|
||||
<Typography variant="body1" color="text.secondary">
|
||||
<Typography
|
||||
sx={{ height: 24 }}
|
||||
variant="body1"
|
||||
color="text.secondary"
|
||||
>
|
||||
{t('home.components.currentProxy.labels.noActiveNode')}
|
||||
</Typography>
|
||||
</Box>
|
||||
|
||||
Reference in New Issue
Block a user