feat(touchbar): display modal title

This commit is contained in:
Elian Doran 2025-04-13 20:29:56 +03:00
parent e6e2bde274
commit a0447c41b4
No known key found for this signature in database

View File

@ -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.