feat(touch_bar): use disabled button for geomap

This commit is contained in:
Elian Doran 2025-03-08 23:25:06 +02:00
parent a3c58834d1
commit ff78ab650a
No known key found for this signature in database

View File

@ -397,8 +397,6 @@ export default class GeoMapTypeWidget extends TypeWidget {
return;
}
switch (this._state) {
case State.Normal:
return [
new TouchBar.TouchBarSlider({
label: "Zoom",
@ -412,16 +410,10 @@ export default class GeoMapTypeWidget extends TypeWidget {
}),
new TouchBar.TouchBarButton({
label: "New geo note",
click: () => this.triggerCommand("geoMapCreateChildNote", { ntxId: this.ntxId })
click: () => this.triggerCommand("geoMapCreateChildNote", { ntxId: this.ntxId }),
enabled: (this._state === State.Normal)
})
];
case State.NewNote:
return [
new TouchBar.TouchBarSpacer({ size: "flexible" }),
new TouchBar.TouchBarLabel({ label: "New note" })
]
}
}
}