mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-25 07:17:04 +08:00 
			
		
		
		
	refactor(client): simplify DOM
This commit is contained in:
		
							parent
							
								
									fe1f4a4294
								
							
						
					
					
						commit
						a20a06c994
					
				
					 1 changed files with 7 additions and 20 deletions
				
			
		|  | @ -10,35 +10,31 @@ const TPL = /*html*/` | |||
|             <div class="modal-header text-white"> | ||||
|                 <h4 class="modal-title"> | ||||
|                     <i class="bx bx-error-circle"></i> | ||||
|                     <span class="rosetta-warning-title"></span> | ||||
|                     <span>${t("rosetta_warning.title")}</span> | ||||
|                 </h4> | ||||
|                 <button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal" aria-label="Close"></button> | ||||
|             </div> | ||||
|             <div class="modal-body"> | ||||
|                 <div class="alert alert-warning mb-3"> | ||||
|                     <strong>⚠️ <span class="rosetta-warning-performance-impact"></span></strong><br> | ||||
|                     <span class="rosetta-warning-message"></span> | ||||
|                     <strong>⚠️ ${t("rosetta_warning.performance_impact")}</strong><br> | ||||
|                     ${t("rosetta_warning.message")} | ||||
|                 </div> | ||||
| 
 | ||||
|                 <p class="mb-3"> | ||||
|                     <strong>Recommendation:</strong> <span class="rosetta-warning-recommendation"></span> | ||||
|                     <strong>Recommendation:</strong> ${t("rosetta_warning.recommendation")} | ||||
|                 </p> | ||||
| 
 | ||||
|                 <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 class="rosetta-warning-download-link"></span> | ||||
|                         </button> | ||||
|                         <button class="continue-anyway-button btn btn-secondary" data-bs-dismiss="modal"> | ||||
|                             <span class="rosetta-warning-continue-anyway"></span> | ||||
|                             <span>${t("rosetta_warning.download_link")}</span> | ||||
|                         </button> | ||||
|                         <button class="continue-anyway-button btn btn-secondary" data-bs-dismiss="modal">${t("rosetta_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"> | ||||
|                             <span class="rosetta-warning-dont-show-again"></span> | ||||
|                         </label> | ||||
|                         <label class="form-check-label" for="dontShowAgain">${t("rosetta_warning.dont_show_again")}</label> | ||||
|                     </div> | ||||
|                 </div> | ||||
|             </div> | ||||
|  | @ -57,15 +53,6 @@ export default class RosettaWarningDialog extends BasicWidget { | |||
|         this.$downloadButton = this.$widget.find(".download-correct-version-button"); | ||||
|         this.$continueButton = this.$widget.find(".continue-anyway-button"); | ||||
| 
 | ||||
|         // Populate text using translation keys
 | ||||
|         this.$widget.find(".rosetta-warning-title").text(t("rosetta_warning.title")); | ||||
|         this.$widget.find(".rosetta-warning-performance-impact").text(t("rosetta_warning.performance_impact")); | ||||
|         this.$widget.find(".rosetta-warning-message").text(t("rosetta_warning.message")); | ||||
|         this.$widget.find(".rosetta-warning-recommendation").text(t("rosetta_warning.recommendation")); | ||||
|         this.$widget.find(".rosetta-warning-download-link").text(t("rosetta_warning.download_link")); | ||||
|         this.$widget.find(".rosetta-warning-continue-anyway").text(t("rosetta_warning.continue_anyway")); | ||||
|         this.$widget.find(".rosetta-warning-dont-show-again").text(t("rosetta_warning.dont_show_again")); | ||||
| 
 | ||||
|         this.$downloadButton.on("click", () => { | ||||
|             // Open the releases page where users can download the correct version
 | ||||
|             if (utils.isElectron()) { | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue