Skip to content
This repository has been archived by the owner on Aug 6, 2024. It is now read-only.

Commit

Permalink
chore: prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
koen1711 committed Apr 23, 2024
1 parent 5aae4c0 commit d209f53
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/app/domain/robots.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,6 @@ export const genericRobotType = new BaseUno(
{},
);


export const arduinoMegaRobotTypeGeneric = new RobotType(
"l_mega",
{ protocol: Avrdude, microcontroller: "atmega2560" },
Expand Down
5 changes: 4 additions & 1 deletion src/app/modules/components/header/header.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
@if (
isDriverIssuesUrl() && this.appState.selectedRobotType$ | async
) {
@if ((appState.codeEditor$ | async) === CodeEditorType.CPP && (appState.canChangeCodeEditor$ | async) === false) {
@if (
(appState.codeEditor$ | async) === CodeEditorType.CPP &&
(appState.canChangeCodeEditor$ | async) === false
) {
<!-- Add a drop down to select an robot -->
<mat-form-field class="robot-select-dropdown">
<mat-select
Expand Down
3 changes: 2 additions & 1 deletion src/app/modules/components/header/header.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ import { RobotType } from "../../../domain/robot.type";
styleUrls: ["./header.component.scss"],
})
export class HeaderComponent {
selectedRobot: string = this.appState.selectedRobotType?.name || genericRobots[0].name;
selectedRobot: string =
this.appState.selectedRobotType?.name || genericRobots[0].name;

constructor(
public appState: AppState,
Expand Down
10 changes: 9 additions & 1 deletion src/app/state/app.state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,15 @@ export class AppState {

this.canChangeCodeEditor$ = this.selectedRobotType$
.pipe(filter((robotType) => !!robotType))
.pipe(map((robotType) => !(genericRobots.includes(robotType) || robotType === genericRobotType)));
.pipe(
map(
(robotType) =>
!(
genericRobots.includes(robotType) ||
robotType === genericRobotType
),
),
);
}

private selectedRobotTypeSubject$ = new BehaviorSubject<RobotType>(null);
Expand Down

0 comments on commit d209f53

Please sign in to comment.