feat: allow manually unfixing proxy nodes (#7756)

* feat(proxy): add ability to clear persisted node selection for groups

* feat(hooks): make proxy selection operations asynchronous

* chore: update tauri-plugin-mihomo deps

* refactor: rename clear_selected_node to forget_selected_node

* refactor(hooks): rename isFixed to isFixedProxy in useProxySelection

* docs: update changelog with manual node cancellation support

* chore(layout): remove dev-only mihomo websocket debugging interval
This commit is contained in:
oomeow
2026-08-18 12:16:42 +00:00
committed by GitHub
parent 9fa0e91e25
commit daadb126e0
12 changed files with 205 additions and 89 deletions
-19
View File
@@ -27,7 +27,6 @@ import type { CSSProperties } from 'react'
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { Outlet, useNavigate } from 'react-router'
import { MihomoWebSocket } from 'tauri-plugin-mihomo-api'
import iconDark from '@/assets/image/icon_dark.svg?react'
import iconLight from '@/assets/image/icon_light.svg?react'
@@ -125,24 +124,6 @@ const Layout = () => {
const navigate = useNavigate()
const themeReady = useMemo(() => Boolean(theme), [theme])
// 开发环境下检测 MihomoWebSocket 的所有实例
useEffect(() => {
let id: number
if (import.meta.env.DEV) {
id = setInterval(() => {
MihomoWebSocket.get_all_instances().then((list) => {
console.log('Mihomo ws instances', list)
})
}, 1000)
}
return () => {
if (id) {
clearInterval(id)
}
}
}, [])
const [menuUnlocked, setMenuUnlocked] = useState(false)
const [menuContextPosition, setMenuContextPosition] =
useState<MenuContextPosition | null>(null)