mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 13:01:31 +08:00 
			
		
		
		
	style(cpu_dialog): use modal-footer
This commit is contained in:
		
							parent
							
								
									8edbbe27f8
								
							
						
					
					
						commit
						a635131f47
					
				| @ -23,13 +23,16 @@ 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="d-flex justify-content-between align-items-center"> |             <div class="modal-footer d-flex justify-content-between align-items-center"> | ||||||
|                 <div> |                 <div> | ||||||
|                     <button class="download-correct-version-button btn btn-primary btn-lg me-2"> |                     <button class="download-correct-version-button btn btn-primary btn-lg me-2"> | ||||||
|                         <i class="bx bx-download"></i> |                         <i class="bx bx-download"></i> | ||||||
|                         <span>${t("cpu_arch_warning.download_link")}</span> |                         <span>${t("cpu_arch_warning.download_link")}</span> | ||||||
|                     </button> |                     </button> | ||||||
|  | 
 | ||||||
|  |                       | ||||||
|  | 
 | ||||||
|                     <button class="continue-anyway-button btn btn-secondary" data-bs-dismiss="modal">${t("cpu_arch_warning.continue_anyway")}</button> |                     <button class="continue-anyway-button btn btn-secondary" data-bs-dismiss="modal">${t("cpu_arch_warning.continue_anyway")}</button> | ||||||
|                 </div> |                 </div> | ||||||
|                 <div class="form-check"> |                 <div class="form-check"> | ||||||
| @ -39,7 +42,6 @@ const TPL = /*html*/` | |||||||
|             </div> |             </div> | ||||||
|         </div> |         </div> | ||||||
|     </div> |     </div> | ||||||
|     </div> |  | ||||||
| </div>`;
 | </div>`;
 | ||||||
| 
 | 
 | ||||||
| export default class RosettaWarningDialog extends BasicWidget { | export default class RosettaWarningDialog extends BasicWidget { | ||||||
|  | |||||||
| @ -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 { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran