Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
feat(status_bar): indicate selected code mime in menu
Elian Doran88a779bbdb0c
diff --git a/apps/client/src/widgets/layout/StatusBar.tsx b/apps/client/src/widgets/layout/StatusBar.tsxindex cbbb2f305a..2e5b78860f 100644--- a/apps/client/src/widgets/layout/StatusBar.tsx+++ b/apps/client/src/widgets/layout/StatusBar.tsx@@ -364,6 +364,7 @@ function CodeNoteSwitcher({ note }: StatusBarContext) {dropdownOptions={{ autoClose: true }}><NoteTypeCodeNoteList+ currentMimeType={currentNoteMime}mimeTypes={mimeTypes}changeNoteType={(type, mime) => server.put(`notes/${note.noteId}/type`, { type, mime })}setModalShown={() => {}}diff --git a/apps/client/src/widgets/ribbon/BasicPropertiesTab.tsx b/apps/client/src/widgets/ribbon/BasicPropertiesTab.tsxindex 75887c0b46..772acbc793 100644--- a/apps/client/src/widgets/ribbon/BasicPropertiesTab.tsx+++ b/apps/client/src/widgets/ribbon/BasicPropertiesTab.tsx@@ -131,7 +131,8 @@ export function NoteTypeDropdownContent({ currentNoteType, currentNoteMime, note);}-export function NoteTypeCodeNoteList({ mimeTypes, changeNoteType, setModalShown }: {+export function NoteTypeCodeNoteList({ currentMimeType, mimeTypes, changeNoteType, setModalShown }: {+ currentMimeType?: string;mimeTypes: MimeType[];changeNoteType(type: NoteType, mime: string): void;setModalShown(shown: boolean): void;@@ -141,6 +142,7 @@ export function NoteTypeCodeNoteList({ mimeTypes, changeNoteType, setModalShown{mimeTypes.map(({ title, mime }) => (<FormListItemkey={mime}+ checked={mime === currentMimeType}onClick={() => changeNoteType("code", mime)}>{title}