|
@@ -99,11 +99,11 @@ export function fileExists(file: string): boolean {
|
|
|
return fs.existsSync(file);
|
|
|
}
|
|
|
|
|
|
-/** 检测当前运行的进程中是否有“向日葵” */
|
|
|
-export function nodeCheckRemoteDesktop(): boolean {
|
|
|
- if (import.meta.env.DEV) return false;
|
|
|
+/** 检测当前运行的进程中是否有“向日葵”和"ToDesk" */
|
|
|
+export function nodeCheckRemoteDesktop() {
|
|
|
+ if (import.meta.env.DEV) return {};
|
|
|
// FIXME: 在苹果电脑跳过检测
|
|
|
- if (navigator.userAgent.includes("Macintosh")) return false;
|
|
|
+ if (navigator.userAgent.includes("Macintosh")) return {};
|
|
|
|
|
|
logger({
|
|
|
pgu: "AUTO",
|
|
@@ -119,7 +119,13 @@ export function nodeCheckRemoteDesktop(): boolean {
|
|
|
// console.debug(appList);
|
|
|
|
|
|
const regex = new RegExp("sunloginclient|选择免安装运行,截图识别", "gi");
|
|
|
- return !!(appList?.match(regex) || []).length;
|
|
|
+ const hasSun = !!(appList?.match(regex) || []).length;
|
|
|
+
|
|
|
+ let hasTodesk = false;
|
|
|
+ if ((appList.match(/todesk/gi) || []).length > 0) {
|
|
|
+ hasTodesk = true;
|
|
|
+ }
|
|
|
+ return { hasSun, hasTodesk };
|
|
|
}
|
|
|
|
|
|
let previousAppList: string[] = [];
|