mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-30 19:19:03 +01:00 
			
		
		
		
	feat(note_language): display checkbox to the right
This commit is contained in:
		
							parent
							
								
									d31ba6f47c
								
							
						
					
					
						commit
						9f6b97cdfa
					
				| @ -19,6 +19,10 @@ const TPL = `\ | |||||||
|         .note-language-dropdown [dir=rtl] { |         .note-language-dropdown [dir=rtl] { | ||||||
|             text-align: right; |             text-align: right; | ||||||
|         } |         } | ||||||
|  | 
 | ||||||
|  |         .dropdown-item.rtl > .check { | ||||||
|  |             order: 1; | ||||||
|  |         } | ||||||
|     </style> |     </style> | ||||||
| </div> | </div> | ||||||
| `;
 | `;
 | ||||||
| @ -77,9 +81,6 @@ export default class NoteLanguageWidget extends NoteContextAwareWidget { | |||||||
|         for (const locale of this.locales) { |         for (const locale of this.locales) { | ||||||
|             if (typeof locale === "object") { |             if (typeof locale === "object") { | ||||||
|                 const $title = $("<span>").text(locale.name); |                 const $title = $("<span>").text(locale.name); | ||||||
|                 if (locale.rtl) { |  | ||||||
|                     $title.attr("dir", "rtl"); |  | ||||||
|                 } |  | ||||||
| 
 | 
 | ||||||
|                 const $link = $('<a class="dropdown-item">') |                 const $link = $('<a class="dropdown-item">') | ||||||
|                     .attr("data-language", locale.id) |                     .attr("data-language", locale.id) | ||||||
| @ -90,6 +91,10 @@ export default class NoteLanguageWidget extends NoteContextAwareWidget { | |||||||
|                     this.save(languageId); |                     this.save(languageId); | ||||||
|                 }); |                 }); | ||||||
| 
 | 
 | ||||||
|  |                 if (locale.rtl) { | ||||||
|  |                     $link.attr("dir", "rtl"); | ||||||
|  |                 } | ||||||
|  | 
 | ||||||
|                 if (locale.id === this.currentLanguageId) { |                 if (locale.id === this.currentLanguageId) { | ||||||
|                     $link.addClass("selected"); |                     $link.addClass("selected"); | ||||||
|                 } |                 } | ||||||
|  | |||||||
| @ -1006,7 +1006,8 @@ body.desktop .dropdown-submenu .dropdown-menu { | |||||||
| 
 | 
 | ||||||
| .dropdown-item, | .dropdown-item, | ||||||
| body.mobile .dropdown-submenu .dropdown-toggle { | body.mobile .dropdown-submenu .dropdown-toggle { | ||||||
|     padding: 2px 16px 2px 8px !important; |     padding: 2px 2px 2px 8px !important; | ||||||
|  |     padding-inline-end: 16px; | ||||||
|     /* Note: the right padding should also accommodate the submenu arrow. */ |     /* Note: the right padding should also accommodate the submenu arrow. */ | ||||||
|     border-radius: 6px; |     border-radius: 6px; | ||||||
|     cursor: default !important; |     cursor: default !important; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran