mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-29 08:45:41 +08:00
fix: portable flag
This commit is contained in:
@@ -22,6 +22,9 @@ import { useCustomTheme } from "@/components/layout/use-custom-theme";
|
||||
import getSystem from "@/utils/get-system";
|
||||
import "dayjs/locale/ru";
|
||||
import "dayjs/locale/zh-cn";
|
||||
import { getPortableFlag } from "@/services/cmds";
|
||||
|
||||
export let portableFlag = false;
|
||||
|
||||
dayjs.extend(relativeTime);
|
||||
|
||||
@@ -71,10 +74,12 @@ const Layout = () => {
|
||||
break;
|
||||
}
|
||||
});
|
||||
setTimeout(() => {
|
||||
void appWindow.unminimize();
|
||||
void appWindow.show();
|
||||
void appWindow.setFocus();
|
||||
|
||||
setTimeout(async () => {
|
||||
portableFlag = await getPortableFlag();
|
||||
await appWindow.unminimize();
|
||||
await appWindow.show();
|
||||
await appWindow.setFocus();
|
||||
}, 50);
|
||||
}, []);
|
||||
|
||||
@@ -119,9 +124,7 @@ const Layout = () => {
|
||||
<div className="the-logo" data-windrag>
|
||||
<LogoSvg />
|
||||
|
||||
{!(OS === "windows" && WIN_PORTABLE) && (
|
||||
<UpdateButton className="the-newbtn" />
|
||||
)}
|
||||
{!portableFlag && <UpdateButton className="the-newbtn" />}
|
||||
</div>
|
||||
|
||||
<List className="the-menu">
|
||||
|
||||
Reference in New Issue
Block a user