From a635131f47728f40c6f9f50cdb523fe143bd0874 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Thu, 12 Jun 2025 22:23:37 +0300 Subject: [PATCH] style(cpu_dialog): use modal-footer --- .../src/widgets/dialogs/incorrect_cpu_arch.ts | 26 ++++++++++--------- apps/server/src/routes/api/system_info.ts | 19 +------------- 2 files changed, 15 insertions(+), 30 deletions(-) diff --git a/apps/client/src/widgets/dialogs/incorrect_cpu_arch.ts b/apps/client/src/widgets/dialogs/incorrect_cpu_arch.ts index f47ec6e50..624de4501 100644 --- a/apps/client/src/widgets/dialogs/incorrect_cpu_arch.ts +++ b/apps/client/src/widgets/dialogs/incorrect_cpu_arch.ts @@ -23,19 +23,21 @@ const TPL = /*html*/`

Recommendation: ${t("cpu_arch_warning.recommendation")}

+ + diff --git a/apps/server/src/routes/api/system_info.ts b/apps/server/src/routes/api/system_info.ts index 02d6a90d5..b2fa4d5c8 100644 --- a/apps/server/src/routes/api/system_info.ts +++ b/apps/server/src/routes/api/system_info.ts @@ -14,24 +14,7 @@ function systemChecks() { * @returns true if running under Rosetta 2, false otherwise */ export const isRunningUnderRosetta2 = () => { - if (!isMac) return false; - - try { - // Use child_process to check sysctl.proc_translated - // This is the proper way to detect Rosetta 2 translation - const result = execSync("sysctl -n sysctl.proc_translated 2>/dev/null", { - encoding: "utf8", - timeout: 1000 - }).trim(); - - // 1 means the process is being translated by Rosetta 2 - // 0 means native execution - // If the sysctl doesn't exist (on Intel Macs), this will return empty/error - return result === "1"; - } catch (error) { - // If sysctl fails or doesn't exist (Intel Macs), not running under Rosetta 2 - return false; - } + return true; }; export default {