Skip to content

Build your personal knowledge base with Trilium Notes

refactor(cpu_dialog): more mentions of rosetta

Elian Doran9713864bb627
diff --git a/apps/client/src/components/startup_checks.ts b/apps/client/src/components/startup_checks.ts
index 025eec98b8..b320d7e134 100644
--- a/apps/client/src/components/startup_checks.ts
+++ b/apps/client/src/components/startup_checks.ts
@@ -10,19 +10,17 @@ export class StartupChecks extends Component {
constructor() {
super();
- this.checkRosetta2Warning();
+ this.checkCpuArchMismatch();
}
- async checkRosetta2Warning() {
+ async checkCpuArchMismatch() {
try {
- // Check if running under Rosetta 2 by calling the server
const response = await server.get("system-checks") as CpuArchResponse;
if (response.isCpuArchMismatch) {
- // Trigger the Rosetta 2 warning dialog
this.triggerCommand("showCpuArchWarning", {});
}
} catch (error) {
- console.warn("Could not check Rosetta 2 status:", error);
+ console.warn("Could not check CPU arch status:", error);
}
}
}
diff --git a/apps/client/src/widgets/dialogs/incorrect_cpu_arch.ts b/apps/client/src/widgets/dialogs/incorrect_cpu_arch.ts
index c45d8bb291..8e30060fec 100644
--- a/apps/client/src/widgets/dialogs/incorrect_cpu_arch.ts
+++ b/apps/client/src/widgets/dialogs/incorrect_cpu_arch.ts
@@ -28,7 +28,7 @@ const TPL = /*html*/`
</div>
</div>`;
-export default class RosettaWarningDialog extends BasicWidget {
+export default class IncorrectCpuArchDialog extends BasicWidget {
private modal!: Modal;
private $downloadButton!: JQuery<HTMLElement>;
diff --git a/apps/server/src/routes/api/system_info.ts b/apps/server/src/routes/api/system_info.ts
index b40c01d243..32c7f91f7f 100644
--- a/apps/server/src/routes/api/system_info.ts
+++ b/apps/server/src/routes/api/system_info.ts
@@ -9,10 +9,9 @@ function systemChecks() {
}
/**
- * Detects if the application is running under Rosetta 2 translation on Apple Silicon.
- * This happens when an x64 version of the app is run on an M1/M2/M3 Mac.
- * Uses the macOS sysctl.proc_translated to properly detect translation.
- * @returns true if running under Rosetta 2, false otherwise
+ * Detects if the application is running under emulation on Apple Silicon or Windows on ARM.
+ * This happens when an x64 version of the app is run on an M1/M2/M3 Mac or on a Windows Snapdragon chip.
+ * @returns true if running on x86 emulation on ARM, false otherwise.
*/
export const isCpuArchMismatch = () => {
if (isMac) {