mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-09-04 06:31:35 +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() {
|
#buildModalTouchBar() {
|
||||||
const { TouchBar } = this.remote;
|
const { TouchBar } = this.remote;
|
||||||
const { TouchBarButton, TouchBarSpacer } = this.remote.TouchBar;
|
const { TouchBarButton, TouchBarLabel, TouchBarSpacer } = this.remote.TouchBar;
|
||||||
const items: TouchBarItem[] = [];
|
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" }));
|
items.push(new TouchBarSpacer({ size: "flexible" }));
|
||||||
|
|
||||||
// Look for buttons in the modal.
|
// Look for buttons in the modal.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user