Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mvladic committed Oct 6, 2024
1 parent 469ee60 commit 7b234cf
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
23 changes: 22 additions & 1 deletion packages/project-editor/project/ui/ProjectEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import {
extensionsManagerStore
} from "home/extensions-manager/extensions-manager";
import { LVGLGroupsTab } from "project-editor/lvgl/groups";
import { settingsController } from "home/settings";

////////////////////////////////////////////////////////////////////////////////

Expand Down Expand Up @@ -303,7 +304,24 @@ const Content = observer(
icon = <Icon icon="material:warning" className="warning" />;
numMessages = section.numWarnings;
} else {
icon = <Icon icon="material:check" className="info" />;
icon = (
<Icon
icon="material:check"
className="info"
style={
node.getId() == LayoutModels.OUTPUT_TAB_ID &&
this.context.lastSuccessfulBuildRevision ==
this.context.lastRevision
? {
color: settingsController.isDarkTheme
? "#27FB2C"
: "#00FF21",
fontWeight: "bold"
}
: undefined
}
/>
);
numMessages = 0;
}

Expand Down Expand Up @@ -472,6 +490,9 @@ const Content = observer(
checksSection.numWarnings;
checksSection.loading;

this.context.lastRevisionStable;
this.context.lastSuccessfulBuildRevision;

const sectionOutput = this.context.outputSectionsStore.getSection(
Section.OUTPUT
);
Expand Down
8 changes: 7 additions & 1 deletion packages/project-editor/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ export class ProjectStore {
lastRevision: symbol;
lastRevisionStable: symbol;

lastSuccessfulBuildRevision: symbol | undefined;

filePath: string | undefined;
backgroundCheckEnabled = true;

Expand Down Expand Up @@ -248,6 +250,7 @@ export class ProjectStore {
savedRevision: observable,
lastRevision: observable,
lastRevisionStable: observable,
lastSuccessfulBuildRevision: observable,
isModified: computed,
setModified: action,
updateLastRevisionStable: action,
Expand Down Expand Up @@ -782,7 +785,10 @@ export class ProjectStore {
LayoutModels.OUTPUT_TAB_ID
);
} else {
notification.info("Build done.");
runInAction(() => {
this.lastSuccessfulBuildRevision = this.lastRevisionStable;
});
notification.info("Build successful.", { autoClose: 1000 });
}
return result;
}
Expand Down

0 comments on commit 7b234cf

Please sign in to comment.