style(cpu_dialog): use modal-footer

This commit is contained in:
Elian Doran 2025-06-12 22:23:37 +03:00
parent 8edbbe27f8
commit a635131f47
No known key found for this signature in database
2 changed files with 15 additions and 30 deletions

View File

@ -23,19 +23,21 @@ const TPL = /*html*/`
<p class="mb-3"> <p class="mb-3">
<strong>Recommendation:</strong> ${t("cpu_arch_warning.recommendation")} <strong>Recommendation:</strong> ${t("cpu_arch_warning.recommendation")}
</p> </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"> &nbsp;
<div>
<button class="download-correct-version-button btn btn-primary btn-lg me-2"> <button class="continue-anyway-button btn btn-secondary" data-bs-dismiss="modal">${t("cpu_arch_warning.continue_anyway")}</button>
<i class="bx bx-download"></i> </div>
<span>${t("cpu_arch_warning.download_link")}</span> <div class="form-check">
</button> <input class="form-check-input" type="checkbox" id="dontShowAgain">
<button class="continue-anyway-button btn btn-secondary" data-bs-dismiss="modal">${t("cpu_arch_warning.continue_anyway")}</button> <label class="form-check-label" for="dontShowAgain">${t("cpu_arch_warning.dont_show_again")}</label>
</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>
</div> </div>
</div> </div>

View File

@ -14,24 +14,7 @@ function systemChecks() {
* @returns true if running under Rosetta 2, false otherwise * @returns true if running under Rosetta 2, false otherwise
*/ */
export const isRunningUnderRosetta2 = () => { export const isRunningUnderRosetta2 = () => {
if (!isMac) return false; return true;
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;
}
}; };
export default { export default {