refactor(cpu_dialog): more mentions of rosetta

This commit is contained in:
Elian Doran
2025-06-12 22:53:15 +03:00
parent c6c59c63bb
commit 9713864bb6
3 changed files with 7 additions and 10 deletions

View File

@@ -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);
}
}
}