Skip to content

Build your personal knowledge base with Trilium Notes

feat(touchbar): display modal title

Elian Dorana0447c41b42f
diff --git a/src/public/app/widgets/touch_bar.ts b/src/public/app/widgets/touch_bar.ts
index 3154ae9a35..8cc2b9359f 100644
--- a/src/public/app/widgets/touch_bar.ts
+++ b/src/public/app/widgets/touch_bar.ts
@@ -74,9 +74,15 @@ export default class TouchBarWidget extends NoteContextAwareWidget {
#buildModalTouchBar() {
const { TouchBar } = this.remote;
- const { TouchBarButton, TouchBarSpacer } = this.remote.TouchBar;
+ const { TouchBarButton, TouchBarLabel, TouchBarSpacer } = this.remote.TouchBar;
const items: TouchBarItem[] = [];
+ // Look for the modal title.
+ const $title = this.$activeModal.find(".modal-title");
+ if ($title.length > 0) {
+ items.push(new TouchBarLabel({ label: $title.text() }))
+ }
+
items.push(new TouchBarSpacer({ size: "flexible" }));
// Look for buttons in the modal.