mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-04-18 16:30:32 +08:00
refactor(proxies): reorder chain-mode toggle for immediate UI feedback
This commit is contained in:
parent
51760a5b95
commit
45020fceda
@ -38,6 +38,7 @@
|
|||||||
- 性能优化系统状态获取
|
- 性能优化系统状态获取
|
||||||
- 优化托盘菜单当前订阅检测逻辑
|
- 优化托盘菜单当前订阅检测逻辑
|
||||||
- 优化连接页面表格渲染
|
- 优化连接页面表格渲染
|
||||||
|
- 优化链式代理 UI 反馈
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
|||||||
@ -74,6 +74,10 @@ const ProxyPage = () => {
|
|||||||
const onToggleChainMode = useLockFn(async () => {
|
const onToggleChainMode = useLockFn(async () => {
|
||||||
const newChainMode = !isChainMode;
|
const newChainMode = !isChainMode;
|
||||||
|
|
||||||
|
setIsChainMode(newChainMode);
|
||||||
|
// 保存链式代理按钮状态到 localStorage
|
||||||
|
localStorage.setItem("proxy-chain-mode-enabled", newChainMode.toString());
|
||||||
|
|
||||||
if (!newChainMode) {
|
if (!newChainMode) {
|
||||||
// 退出链式代理模式时,清除链式代理配置
|
// 退出链式代理模式时,清除链式代理配置
|
||||||
try {
|
try {
|
||||||
@ -84,11 +88,6 @@ const ProxyPage = () => {
|
|||||||
console.error("Failed to clear chain configuration:", error);
|
console.error("Failed to clear chain configuration:", error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
setIsChainMode(newChainMode);
|
|
||||||
|
|
||||||
// 保存链式代理按钮状态到 localStorage
|
|
||||||
localStorage.setItem("proxy-chain-mode-enabled", newChainMode.toString());
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// 当开启链式代理模式时,获取配置数据
|
// 当开启链式代理模式时,获取配置数据
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user