mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	style(cpu_dialog): use modal-footer
This commit is contained in:
		| @@ -23,19 +23,21 @@ const TPL = /*html*/` | ||||
|                 <p class="mb-3"> | ||||
|                     <strong>Recommendation:</strong> ${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> | ||||
|  | ||||
|                 <div class="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="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="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> | ||||
|             </div> | ||||
|         </div> | ||||
|   | ||||
| @@ -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 { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user