mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 10:26:08 +01:00 
			
		
		
		
	feat(note_language): set a default value for the combo
This commit is contained in:
		| @@ -2,6 +2,8 @@ import { Dropdown } from "bootstrap"; | |||||||
| import NoteContextAwareWidget from "./note_context_aware_widget.js"; | import NoteContextAwareWidget from "./note_context_aware_widget.js"; | ||||||
| import { getAvailableLocales, type Locale } from "../services/i18n.js"; | import { getAvailableLocales, type Locale } from "../services/i18n.js"; | ||||||
| import { t } from "i18next"; | import { t } from "i18next"; | ||||||
|  | import type { EventData } from "../components/app_context.js"; | ||||||
|  | import type FNote from "../entities/fnote.js"; | ||||||
|  |  | ||||||
| const TPL = `\ | const TPL = `\ | ||||||
| <div class="dropdown note-language-widget"> | <div class="dropdown note-language-widget"> | ||||||
| @@ -60,4 +62,14 @@ export default class NoteLanguageWidget extends NoteContextAwareWidget { | |||||||
|         } |         } | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     async refreshWithNote(note: FNote) { | ||||||
|  |         this.$noteLanguageDesc.text(t("note_language.not_set")); | ||||||
|  |     } | ||||||
|  |  | ||||||
|  |     async entitiesReloadedEvent({ loadResults }: EventData<"entitiesReloaded">) { | ||||||
|  |         if (loadResults.isNoteReloaded(this.noteId)) { | ||||||
|  |             this.refresh(); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |  | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user