mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-17 22:29:27 +00:00
Toolbar enhancements (#1194)
This commit is contained in:
@@ -13,6 +13,7 @@ import { ipcRenderer } from '@theia/electron/shared/electron';
|
||||
import { MonitorManagerProxyClient } from '../../../common/protocol';
|
||||
import { BoardsServiceProvider } from '../../boards/boards-service-provider';
|
||||
import { MonitorModel } from '../../monitor-model';
|
||||
import { ArduinoToolbar } from '../../toolbar/arduino-toolbar';
|
||||
|
||||
const queryString = require('query-string');
|
||||
|
||||
@@ -30,6 +31,9 @@ export namespace SerialPlotterContribution {
|
||||
export const RESET: Command = {
|
||||
id: 'serial-plotter-reset',
|
||||
};
|
||||
export const OPEN_TOOLBAR: Command = {
|
||||
id: 'serial-plotter-open-toolbar',
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,6 +75,14 @@ export class PlotterFrontendContribution extends Contribution {
|
||||
registry.registerCommand(SerialPlotterContribution.Commands.RESET, {
|
||||
execute: () => this.reset(),
|
||||
});
|
||||
registry.registerCommand(
|
||||
{ id: SerialPlotterContribution.Commands.OPEN_TOOLBAR.id },
|
||||
{
|
||||
isVisible: (widget) =>
|
||||
ArduinoToolbar.is(widget) && widget.side === 'right',
|
||||
execute: this.startPlotter.bind(this),
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
override registerMenus(menus: MenuModelRegistry): void {
|
||||
|
||||
Reference in New Issue
Block a user