mirror of
https://github.com/zadam/trilium.git
synced 2025-11-10 23:35:50 +01:00
refactor(client,server): rebrand to CPU arch warnings
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
import server from "../services/server";
|
||||
import Component from "./component";
|
||||
|
||||
// TODO: Deduplicate.
|
||||
interface CpuArchResponse {
|
||||
isCpuArchMismatch: boolean;
|
||||
}
|
||||
|
||||
export class StartupChecks extends Component {
|
||||
|
||||
constructor() {
|
||||
@@ -11,10 +16,10 @@ export class StartupChecks extends Component {
|
||||
async checkRosetta2Warning() {
|
||||
try {
|
||||
// Check if running under Rosetta 2 by calling the server
|
||||
const response = await server.get("system-info/rosetta-check") as { isRunningUnderRosetta2: boolean };
|
||||
if (response.isRunningUnderRosetta2) {
|
||||
const response = await server.get("system-checks") as CpuArchResponse;
|
||||
if (response.isCpuArchMismatch) {
|
||||
// Trigger the Rosetta 2 warning dialog
|
||||
this.triggerCommand("showRosettaWarning", {});
|
||||
this.triggerCommand("showCpuArchWarning", {});
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn("Could not check Rosetta 2 status:", error);
|
||||
|
||||
Reference in New Issue
Block a user