chore: todo

This commit is contained in:
oomeow
2025-10-01 10:17:08 +08:00
Unverified
parent 223747e932
commit ae9e4faa7b
11 changed files with 27 additions and 11 deletions

View File

@@ -17,7 +17,10 @@ import { Virtuoso, type VirtuosoHandle } from "react-virtuoso";
import { useProxySelection } from "@/hooks/use-proxy-selection";
import { useVerge } from "@/hooks/use-verge";
import { useAppData } from "@/providers/app-data-provider";
import { updateProxyChainConfigInRuntime } from "@/services/cmds";
import {
getRuntimeConfig,
updateProxyChainConfigInRuntime,
} from "@/services/cmds";
import delayManager from "@/services/delay";
import { BaseEmpty } from "../base";
@@ -28,6 +31,8 @@ import { ProxyRender } from "./proxy-render";
import { ProxyGroupNavigator } from "./proxy-group-navigator";
import { useRenderList } from "./use-render-list";
import { delayGroup, healthcheckProxyProvider } from "tauri-plugin-mihomo-api";
import useSWR from "swr";
import { useMemo } from "react";
interface Props {
mode: string;
@@ -209,6 +214,7 @@ export const ProxyGroups = (props: Props) => {
const currentGroup = getCurrentGroup();
const availableGroups = getAvailableGroups();
// TODO: 频繁点击切换代理节点,导致应用卡死
const handleChangeProxy = useCallback(
(group: IProxyGroupItem, proxy: IProxyItem) => {
if (isChainMode) {

View File

@@ -2,7 +2,6 @@ import { List, Paper, ThemeProvider, SvgIcon } from "@mui/material";
import { getCurrentWebviewWindow } from "@tauri-apps/api/webviewWindow";
import dayjs from "dayjs";
import relativeTime from "dayjs/plugin/relativeTime";
import { useLocalStorage } from "foxact/use-local-storage";
import { useEffect, useCallback, useState, useRef } from "react";
import React from "react";
import { useTranslation } from "react-i18next";
@@ -37,7 +36,6 @@ import { invoke } from "@tauri-apps/api/core";
import { showNotice } from "@/services/noticeService";
import { NoticeManager } from "@/components/base/NoticeManager";
import { LogLevel } from "@/hooks/use-log-data";
import { useMemoryData } from "@/hooks/use-memory-data";
import { useTrafficData } from "@/hooks/use-traffic-data";
import { useConnectionData } from "@/hooks/use-connection-data";

View File

@@ -334,7 +334,7 @@ export const AppDataProvider = ({
// 高频率更新数据 (2秒)
const { data: uptimeData } = useSWR("appUptime", getAppUptime, {
// TODO: 运行时间
refreshInterval: 20000,
refreshInterval: 2000,
revalidateOnFocus: false,
suspense: false,
});