Skip to content

Commit 7b234cf

Browse files
committed
1 parent 469ee60 commit 7b234cf

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

packages/project-editor/project/ui/ProjectEditor.tsx

+22-1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ import {
4747
extensionsManagerStore
4848
} from "home/extensions-manager/extensions-manager";
4949
import { LVGLGroupsTab } from "project-editor/lvgl/groups";
50+
import { settingsController } from "home/settings";
5051

5152
////////////////////////////////////////////////////////////////////////////////
5253

@@ -303,7 +304,24 @@ const Content = observer(
303304
icon = <Icon icon="material:warning" className="warning" />;
304305
numMessages = section.numWarnings;
305306
} else {
306-
icon = <Icon icon="material:check" className="info" />;
307+
icon = (
308+
<Icon
309+
icon="material:check"
310+
className="info"
311+
style={
312+
node.getId() == LayoutModels.OUTPUT_TAB_ID &&
313+
this.context.lastSuccessfulBuildRevision ==
314+
this.context.lastRevision
315+
? {
316+
color: settingsController.isDarkTheme
317+
? "#27FB2C"
318+
: "#00FF21",
319+
fontWeight: "bold"
320+
}
321+
: undefined
322+
}
323+
/>
324+
);
307325
numMessages = 0;
308326
}
309327

@@ -472,6 +490,9 @@ const Content = observer(
472490
checksSection.numWarnings;
473491
checksSection.loading;
474492

493+
this.context.lastRevisionStable;
494+
this.context.lastSuccessfulBuildRevision;
495+
475496
const sectionOutput = this.context.outputSectionsStore.getSection(
476497
Section.OUTPUT
477498
);

packages/project-editor/store/index.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,8 @@ export class ProjectStore {
174174
lastRevision: symbol;
175175
lastRevisionStable: symbol;
176176

177+
lastSuccessfulBuildRevision: symbol | undefined;
178+
177179
filePath: string | undefined;
178180
backgroundCheckEnabled = true;
179181

@@ -248,6 +250,7 @@ export class ProjectStore {
248250
savedRevision: observable,
249251
lastRevision: observable,
250252
lastRevisionStable: observable,
253+
lastSuccessfulBuildRevision: observable,
251254
isModified: computed,
252255
setModified: action,
253256
updateLastRevisionStable: action,
@@ -782,7 +785,10 @@ export class ProjectStore {
782785
LayoutModels.OUTPUT_TAB_ID
783786
);
784787
} else {
785-
notification.info("Build done.");
788+
runInAction(() => {
789+
this.lastSuccessfulBuildRevision = this.lastRevisionStable;
790+
});
791+
notification.info("Build successful.", { autoClose: 1000 });
786792
}
787793
return result;
788794
}

0 commit comments

Comments
 (0)