mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-10-27 03:58:33 +00:00
Use eslint&prettier for code linting&formatting
This commit is contained in:
committed by
Francesco Stasi
parent
2a3873a923
commit
0592199858
@@ -8,7 +8,6 @@ import { SketchesService, Sketch } from '../../../common/protocol';
|
||||
|
||||
@injectable()
|
||||
export class EditorWidgetFactory extends TheiaEditorWidgetFactory {
|
||||
|
||||
@inject(SketchesService)
|
||||
protected readonly sketchesService: SketchesService;
|
||||
|
||||
@@ -23,16 +22,19 @@ export class EditorWidgetFactory extends TheiaEditorWidgetFactory {
|
||||
return this.maybeUpdateCaption(widget);
|
||||
}
|
||||
|
||||
protected async maybeUpdateCaption(widget: EditorWidget): Promise<EditorWidget> {
|
||||
protected async maybeUpdateCaption(
|
||||
widget: EditorWidget
|
||||
): Promise<EditorWidget> {
|
||||
const sketch = await this.sketchesServiceClient.currentSketch();
|
||||
const { uri } = widget.editor;
|
||||
if (sketch && Sketch.isInSketch(uri, sketch)) {
|
||||
const isTemp = await this.sketchesService.isTemp(sketch);
|
||||
if (isTemp) {
|
||||
widget.title.caption = `Unsaved – ${this.labelProvider.getName(uri)}`;
|
||||
widget.title.caption = `Unsaved – ${this.labelProvider.getName(
|
||||
uri
|
||||
)}`;
|
||||
}
|
||||
}
|
||||
return widget;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user