Browse Source

fix: something

GyDi 2 years ago
parent
commit
a211fc7c97
2 changed files with 2 additions and 1 deletions
  1. 1 0
      src/pages/_layout.tsx
  2. 1 1
      src/pages/proxies.tsx

+ 1 - 0
src/pages/_layout.tsx

@@ -54,6 +54,7 @@ const Layout = () => {
       // the clash info may be updated
       await getAxios(true);
       mutate("getProxies");
+      mutate("getVersion");
       mutate("getClashConfig");
     });
 

+ 1 - 1
src/pages/proxies.tsx

@@ -42,7 +42,7 @@ const ProxyPage = () => {
   // 仅mode为全局和直连的时候展示global分组
   const displayGroups = useMemo(() => {
     if (!global) return groups;
-    if (curMode === "global" || curMode === "direct")
+    if (curMode === "global" || curMode === "direct" || groups.length === 0)
       return [global, ...groups];
     return groups;
   }, [global, groups, curMode]);