diff --git a/src/public/app/widgets/touch_bar.ts b/src/public/app/widgets/touch_bar.ts index 3154ae9a3..8cc2b9359 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.