mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-08 02:52:07 +08:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user