mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-26 20:50:30 +08:00
feat: connection card pure number display
This commit is contained in:
parent
f488cc3643
commit
9681f77e20
@ -26,6 +26,7 @@ export const defaultConfig: IAppConfig = {
|
|||||||
floatingWindowCompatMode: true,
|
floatingWindowCompatMode: true,
|
||||||
disableHardwareAcceleration: false,
|
disableHardwareAcceleration: false,
|
||||||
disableLoopbackDetector: false,
|
disableLoopbackDetector: false,
|
||||||
|
hideConnectionCardWave: false,
|
||||||
disableEmbedCA: false,
|
disableEmbedCA: false,
|
||||||
disableSystemCA: false,
|
disableSystemCA: false,
|
||||||
skipSafePathCheck: false,
|
skipSafePathCheck: false,
|
||||||
|
|||||||
@ -64,7 +64,8 @@ const GeneralConfig: React.FC = () => {
|
|||||||
autoCheckUpdate,
|
autoCheckUpdate,
|
||||||
appTheme = 'system',
|
appTheme = 'system',
|
||||||
language = 'zh-CN',
|
language = 'zh-CN',
|
||||||
triggerMainWindowBehavior = 'show' // 添加这一行
|
triggerMainWindowBehavior = 'show',
|
||||||
|
hideConnectionCardWave = false
|
||||||
} = appConfig || {}
|
} = appConfig || {}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -412,6 +413,15 @@ const GeneralConfig: React.FC = () => {
|
|||||||
<Tab key="toggle" title={t('settings.triggerMainWindowBehaviorToggle')} />
|
<Tab key="toggle" title={t('settings.triggerMainWindowBehaviorToggle')} />
|
||||||
</Tabs>
|
</Tabs>
|
||||||
</SettingItem>
|
</SettingItem>
|
||||||
|
<SettingItem title={t('settings.hideConnectionCardWave')} divider>
|
||||||
|
<Switch
|
||||||
|
size="sm"
|
||||||
|
isSelected={hideConnectionCardWave}
|
||||||
|
onValueChange={async (v) => {
|
||||||
|
await patchAppConfig({ hideConnectionCardWave: v })
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</SettingItem>
|
||||||
<SettingItem
|
<SettingItem
|
||||||
title={t('settings.disableHardwareAcceleration')}
|
title={t('settings.disableHardwareAcceleration')}
|
||||||
actions={
|
actions={
|
||||||
|
|||||||
@ -36,7 +36,7 @@ interface Props {
|
|||||||
const ConnCard: React.FC<Props> = (props) => {
|
const ConnCard: React.FC<Props> = (props) => {
|
||||||
const { iconOnly } = props
|
const { iconOnly } = props
|
||||||
const { appConfig } = useAppConfig()
|
const { appConfig } = useAppConfig()
|
||||||
const { showTraffic = false, connectionCardStatus = 'col-span-2', disableAnimations = false } = appConfig || {}
|
const { showTraffic = false, connectionCardStatus = 'col-span-2', disableAnimations = false, hideConnectionCardWave = false } = appConfig || {}
|
||||||
const location = useLocation()
|
const location = useLocation()
|
||||||
const navigate = useNavigate()
|
const navigate = useNavigate()
|
||||||
const match = location.pathname.includes('/connections')
|
const match = location.pathname.includes('/connections')
|
||||||
@ -224,9 +224,11 @@ const ConnCard: React.FC<Props> = (props) => {
|
|||||||
</h3>
|
</h3>
|
||||||
</CardFooter>
|
</CardFooter>
|
||||||
</Card>
|
</Card>
|
||||||
<div className="w-full h-full absolute top-0 left-0 pointer-events-none overflow-hidden rounded-[14px]">
|
{!hideConnectionCardWave && (
|
||||||
<Line data={chartData} options={chartOptions} />
|
<div className="w-full h-full absolute top-0 left-0 pointer-events-none overflow-hidden rounded-[14px]">
|
||||||
</div>
|
<Line data={chartData} options={chartOptions} />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<Card
|
<Card
|
||||||
|
|||||||
@ -69,6 +69,7 @@
|
|||||||
"settings.disableAnimations": "Disable Animation Effects",
|
"settings.disableAnimations": "Disable Animation Effects",
|
||||||
"settings.showTraffic_windows": "Show Network Speed in Taskbar",
|
"settings.showTraffic_windows": "Show Network Speed in Taskbar",
|
||||||
"settings.showTraffic_mac": "Show Network Speed in Status Bar",
|
"settings.showTraffic_mac": "Show Network Speed in Status Bar",
|
||||||
|
"settings.hideConnectionCardWave": "Connection Card Pure Number Display",
|
||||||
"settings.showDockIcon": "Show Dock Icon",
|
"settings.showDockIcon": "Show Dock Icon",
|
||||||
"settings.useWindowFrame": "Use System Title Bar",
|
"settings.useWindowFrame": "Use System Title Bar",
|
||||||
"settings.triggerMainWindowBehavior": "Window Trigger Behavior",
|
"settings.triggerMainWindowBehavior": "Window Trigger Behavior",
|
||||||
|
|||||||
@ -69,6 +69,7 @@
|
|||||||
"settings.disableAnimations": "禁用动画效果",
|
"settings.disableAnimations": "禁用动画效果",
|
||||||
"settings.showTraffic_windows": "在任务栏显示网速",
|
"settings.showTraffic_windows": "在任务栏显示网速",
|
||||||
"settings.showTraffic_mac": "在状态栏显示网速",
|
"settings.showTraffic_mac": "在状态栏显示网速",
|
||||||
|
"settings.hideConnectionCardWave": "连接卡片纯数字显示",
|
||||||
"settings.showDockIcon": "显示 Dock 图标",
|
"settings.showDockIcon": "显示 Dock 图标",
|
||||||
"settings.useWindowFrame": "使用系统标题栏",
|
"settings.useWindowFrame": "使用系统标题栏",
|
||||||
"settings.triggerMainWindowBehavior": "窗口触发行为",
|
"settings.triggerMainWindowBehavior": "窗口触发行为",
|
||||||
|
|||||||
1
src/shared/types.d.ts
vendored
1
src/shared/types.d.ts
vendored
@ -242,6 +242,7 @@ interface IAppConfig {
|
|||||||
connectionCardStatus?: CardStatus
|
connectionCardStatus?: CardStatus
|
||||||
dnsCardStatus?: CardStatus
|
dnsCardStatus?: CardStatus
|
||||||
logCardStatus?: CardStatus
|
logCardStatus?: CardStatus
|
||||||
|
hideConnectionCardWave?: boolean
|
||||||
pauseSSID?: string[]
|
pauseSSID?: string[]
|
||||||
mihomoCoreCardStatus?: CardStatus
|
mihomoCoreCardStatus?: CardStatus
|
||||||
overrideCardStatus?: CardStatus
|
overrideCardStatus?: CardStatus
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user