mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-19 15:19:28 +00:00
Make tab width 2 spaces (#445)
This commit is contained in:
@@ -12,54 +12,49 @@ import { CloudSketchbookTreeModel } from './cloud-sketchbook-tree-model';
|
||||
|
||||
@injectable()
|
||||
export class CloudSketchbookCompositeWidget extends BaseWidget {
|
||||
@inject(AuthenticationClientService)
|
||||
protected readonly authenticationService: AuthenticationClientService;
|
||||
@inject(AuthenticationClientService)
|
||||
protected readonly authenticationService: AuthenticationClientService;
|
||||
|
||||
@inject(CloudSketchbookTreeWidget)
|
||||
protected readonly cloudSketchbookTreeWidget: CloudSketchbookTreeWidget;
|
||||
@inject(CloudSketchbookTreeWidget)
|
||||
protected readonly cloudSketchbookTreeWidget: CloudSketchbookTreeWidget;
|
||||
|
||||
private compositeNode: HTMLElement;
|
||||
private cloudUserStatusNode: HTMLElement;
|
||||
private compositeNode: HTMLElement;
|
||||
private cloudUserStatusNode: HTMLElement;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.compositeNode = document.createElement('div');
|
||||
this.compositeNode.classList.add('composite-node');
|
||||
this.cloudUserStatusNode = document.createElement('div');
|
||||
this.cloudUserStatusNode.classList.add('cloud-status-node');
|
||||
this.compositeNode.appendChild(this.cloudUserStatusNode);
|
||||
this.node.appendChild(this.compositeNode);
|
||||
this.title.caption = 'Cloud Sketchbook';
|
||||
this.title.iconClass = 'cloud-sketchbook-tree-icon';
|
||||
this.title.closable = false;
|
||||
this.id = 'cloud-sketchbook-composite-widget';
|
||||
}
|
||||
constructor() {
|
||||
super();
|
||||
this.compositeNode = document.createElement('div');
|
||||
this.compositeNode.classList.add('composite-node');
|
||||
this.cloudUserStatusNode = document.createElement('div');
|
||||
this.cloudUserStatusNode.classList.add('cloud-status-node');
|
||||
this.compositeNode.appendChild(this.cloudUserStatusNode);
|
||||
this.node.appendChild(this.compositeNode);
|
||||
this.title.caption = 'Cloud Sketchbook';
|
||||
this.title.iconClass = 'cloud-sketchbook-tree-icon';
|
||||
this.title.closable = false;
|
||||
this.id = 'cloud-sketchbook-composite-widget';
|
||||
}
|
||||
|
||||
protected onAfterAttach(message: Message): void {
|
||||
super.onAfterAttach(message);
|
||||
Widget.attach(this.cloudSketchbookTreeWidget, this.compositeNode);
|
||||
ReactDOM.render(
|
||||
<UserStatus
|
||||
model={
|
||||
this.cloudSketchbookTreeWidget
|
||||
.model as CloudSketchbookTreeModel
|
||||
}
|
||||
authenticationService={this.authenticationService}
|
||||
/>,
|
||||
this.cloudUserStatusNode
|
||||
);
|
||||
this.toDisposeOnDetach.push(
|
||||
Disposable.create(() =>
|
||||
Widget.detach(this.cloudSketchbookTreeWidget)
|
||||
)
|
||||
);
|
||||
}
|
||||
protected onAfterAttach(message: Message): void {
|
||||
super.onAfterAttach(message);
|
||||
Widget.attach(this.cloudSketchbookTreeWidget, this.compositeNode);
|
||||
ReactDOM.render(
|
||||
<UserStatus
|
||||
model={this.cloudSketchbookTreeWidget.model as CloudSketchbookTreeModel}
|
||||
authenticationService={this.authenticationService}
|
||||
/>,
|
||||
this.cloudUserStatusNode
|
||||
);
|
||||
this.toDisposeOnDetach.push(
|
||||
Disposable.create(() => Widget.detach(this.cloudSketchbookTreeWidget))
|
||||
);
|
||||
}
|
||||
|
||||
protected onResize(message: Widget.ResizeMessage): void {
|
||||
super.onResize(message);
|
||||
MessageLoop.sendMessage(
|
||||
this.cloudSketchbookTreeWidget,
|
||||
Widget.ResizeMessage.UnknownSize
|
||||
);
|
||||
}
|
||||
protected onResize(message: Widget.ResizeMessage): void {
|
||||
super.onResize(message);
|
||||
MessageLoop.sendMessage(
|
||||
this.cloudSketchbookTreeWidget,
|
||||
Widget.ResizeMessage.UnknownSize
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user