Skip to content

Build your personal knowledge base with Trilium Notes

feat(cpu_dialog): fix icon alignment & add message for windows

Elian Doran0a81e26e7e94
diff --git a/apps/client/src/translations/en/translation.json b/apps/client/src/translations/en/translation.json
index e0974312d2..ab7933617f 100644
--- a/apps/client/src/translations/en/translation.json
+++ b/apps/client/src/translations/en/translation.json
@@ -1920,9 +1920,10 @@
"color-scheme": "Color scheme"
},
"cpu_arch_warning": {
- "title": "Performance warning",
- "message": "TriliumNext is currently running under Rosetta 2 translation, which means you're using the Intel (x64) version on an Apple Silicon Mac. This will significantly impact performance and battery life.",
- "recommendation": "For the best experience, please download the native Apple Silicon (ARM64) version of TriliumNext from our releases page.",
+ "title": "Please download the ARM64 version",
+ "message_macos": "TriliumNext is currently running under Rosetta 2 translation, which means you're using the Intel (x64) version on Apple Silicon Mac. This will significantly impact performance and battery life.",
+ "message_windows": "TriliumNext is currently running emulation, which means you're using the Intel (x64) version on a Windows on ARM device. This will significantly impact performance and battery life.",
+ "recommendation": "For the best experience, please download the native ARM64 version of TriliumNext from our releases page.",
"download_link": "Download Native Version",
"continue_anyway": "Continue Anyway",
"dont_show_again": "Don't show this warning again"
diff --git a/apps/client/src/widgets/dialogs/incorrect_cpu_arch.ts b/apps/client/src/widgets/dialogs/incorrect_cpu_arch.ts
index 5a74336e1a..8cefce5333 100644
--- a/apps/client/src/widgets/dialogs/incorrect_cpu_arch.ts
+++ b/apps/client/src/widgets/dialogs/incorrect_cpu_arch.ts
@@ -7,33 +7,22 @@ const TPL = /*html*/`
<div class="rosetta-warning-dialog modal mx-auto" tabindex="-1" role="dialog" style="z-index: 2000;">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
- <div class="modal-header text-white">
- <h4 class="modal-title">
- <i class="bx bx-error-circle"></i>
- <span>${t("cpu_arch_warning.title")}</span>
- </h4>
- <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button>
+ <div class="modal-header">
+ <h5 class="modal-title">${t("cpu_arch_warning.title")}</h5>
+ <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
- <p>${t("cpu_arch_warning.message")}</p>
+ <p>${utils.isMac() ? t("cpu_arch_warning.message_macos") : t("cpu_arch_warning.message_windows")}</p>
<p>${t("cpu_arch_warning.recommendation")}</p>
</div>
<div class="modal-footer d-flex justify-content-between align-items-center">
- <div>
- <button class="download-correct-version-button btn btn-primary btn-lg me-2">
- <i class="bx bx-download"></i>
- <span>${t("cpu_arch_warning.download_link")}</span>
- </button>
+ <button class="download-correct-version-button btn btn-primary btn-lg me-2">
+ <span class="bx bx-download"></span>
+ ${t("cpu_arch_warning.download_link")}
+ </button>
- &nbsp;
-
- <button class="continue-anyway-button btn btn-secondary" data-bs-dismiss="modal">${t("cpu_arch_warning.continue_anyway")}</button>
- </div>
- <div class="form-check">
- <input class="form-check-input" type="checkbox" id="dontShowAgain">
- <label class="form-check-label" for="dontShowAgain">${t("cpu_arch_warning.dont_show_again")}</label>
- </div>
+ <button class="btn btn-secondary" data-bs-dismiss="modal">${t("cpu_arch_warning.continue_anyway")}</button>
</div>
</div>
</div>