mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-31 19:51:36 +08:00
feat(touchbar): display modal title
This commit is contained in:
parent
e6e2bde274
commit
a0447c41b4
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user