mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-13 12:19:29 +00:00
No disconnect/reconnect when DNDing the widget.
- Updated to next Theia, - Added elecron launch config, - Yet another syling for the input + selects, - Close monitor connection on widget close not detach. Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
@@ -78,7 +78,7 @@ export class MonitorModel implements FrontendApplicationContribution {
|
||||
this.storeState().then(() => this.onChangeEmitter.fire({ property: 'lineEnding', value: this._lineEnding }));
|
||||
}
|
||||
|
||||
protected restoreState(state: MonitorModel.State) {
|
||||
protected restoreState(state: MonitorModel.State): void {
|
||||
this._autoscroll = state.autoscroll;
|
||||
this._timestamp = state.timestamp;
|
||||
this._baudRate = state.baudRate;
|
||||
@@ -86,7 +86,7 @@ export class MonitorModel implements FrontendApplicationContribution {
|
||||
}
|
||||
|
||||
protected async storeState(): Promise<void> {
|
||||
this.localStorageService.setData(MonitorModel.STORAGE_ID, {
|
||||
return this.localStorageService.setData(MonitorModel.STORAGE_ID, {
|
||||
autoscroll: this._autoscroll,
|
||||
timestamp: this._timestamp,
|
||||
baudRate: this._baudRate,
|
||||
|
||||
@@ -41,6 +41,7 @@ export class MonitorWidget extends ReactWidget {
|
||||
this.id = MonitorWidget.ID;
|
||||
this.title.label = 'Serial Monitor';
|
||||
this.title.iconClass = 'arduino-serial-monitor-tab-icon';
|
||||
this.title.closable = true;
|
||||
this.scrollOptions = undefined;
|
||||
this.toDispose.push(this.clearOutputEmitter);
|
||||
}
|
||||
@@ -56,14 +57,21 @@ export class MonitorWidget extends ReactWidget {
|
||||
this.update();
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
protected onAfterAttach(msg: Message): void {
|
||||
super.onAfterAttach(msg);
|
||||
this.monitorConnection.autoConnect = true;
|
||||
}
|
||||
|
||||
protected onBeforeDetach(msg: Message): void {
|
||||
super.onBeforeDetach(msg);
|
||||
onCloseRequest(msg: Message): void {
|
||||
this.monitorConnection.autoConnect = false;
|
||||
if (this.monitorConnection.connected) {
|
||||
this.monitorConnection.disconnect();
|
||||
}
|
||||
super.onCloseRequest(msg);
|
||||
}
|
||||
|
||||
protected onResize(msg: Widget.ResizeMessage): void {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
.serial-monitor .head .send {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
margin-right: 5px;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.serial-monitor .head .send > input {
|
||||
@@ -42,7 +42,7 @@
|
||||
}
|
||||
|
||||
.serial-monitor .head .config .select {
|
||||
margin-left: 5px;
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
.serial-monitor .body {
|
||||
|
||||
Reference in New Issue
Block a user