This repository has been archived by the owner on Aug 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47 from leaphy-robotics/flitz-and-nano-support
enhancement: add Flitz and nano support
- Loading branch information
Showing
12 changed files
with
834 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/app/modules/core/dialogs/robot-select/robot-select.dialog.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<div class="container"> | ||
<img class="leaphyLogo" src="./assets/leaphy-logo-color.svg" /> | ||
<div class="robots"> | ||
<button mat-stroked-button *ngFor="let robot of data.boardTypes; index as i" (click)="onRobotSelected(robot)"> | ||
<div class="robot"> | ||
<div style="width: 100%;"> | ||
<img src="./assets/{{data.icons[i]}}" width="50" height="50"> | ||
</div> | ||
<div class="robot-name"> | ||
{{robot}} | ||
</div> | ||
</div> | ||
</button> | ||
</div> | ||
</div> |
49 changes: 49 additions & 0 deletions
49
src/app/modules/core/dialogs/robot-select/robot-select.dialog.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
.container { | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
flex-direction: column; | ||
|
||
.leaphyLogo { | ||
width: 100%; | ||
max-width: 180px; | ||
height: auto; | ||
display: block; | ||
margin: 1em auto; | ||
padding-bottom: 10px; | ||
} | ||
|
||
.robots{ | ||
display: flex; | ||
flex-direction: column; | ||
width: 200px; | ||
height: fit-content; | ||
|
||
button { | ||
margin-bottom: 15px; | ||
} | ||
} | ||
.robot { | ||
//display: flex; | ||
align-items: center; | ||
margin-top: 10px; | ||
margin-bottom: 10px; | ||
height: fit-content; | ||
|
||
.robot-name{ | ||
width: 100%; | ||
align-content: center; | ||
flex: 1 | ||
} | ||
} | ||
} | ||
|
||
[mat-stroked-button], | ||
[mat-flat-button] { | ||
color: var(--leaphy-color-primary); | ||
border-color: var(--leaphy-color-secundary); | ||
font-size: 16px; | ||
font-weight: normal; | ||
border-radius: 20px; | ||
|
||
} |
25 changes: 25 additions & 0 deletions
25
src/app/modules/core/dialogs/robot-select/robot-select.dialog.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; | ||
|
||
import { SelectRobotTypeDialog } from './robot-select.dialog'; | ||
|
||
describe('LanguageSelectComponent', () => { | ||
let component: SelectRobotTypeDialog; | ||
let fixture: ComponentFixture<SelectRobotTypeDialog>; | ||
|
||
beforeEach(waitForAsync(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ SelectRobotTypeDialog ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(SelectRobotTypeDialog); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
23 changes: 23 additions & 0 deletions
23
src/app/modules/core/dialogs/robot-select/robot-select.dialog.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { Component } from '@angular/core'; | ||
import { MatDialogRef } from '@angular/material/dialog'; | ||
import { AppState } from 'src/app/state/app.state'; | ||
import {MAT_DIALOG_DATA} from '@angular/material/dialog'; | ||
import { Inject } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-robot-select', | ||
templateUrl: './robot-select.dialog.html', | ||
styleUrls: ['./robot-select.dialog.scss'] | ||
}) | ||
export class SelectRobotTypeDialog { | ||
constructor( | ||
@Inject(MAT_DIALOG_DATA) public data: any, | ||
public dialogRef: MatDialogRef<SelectRobotTypeDialog>, | ||
public appState: AppState, | ||
|
||
) { } | ||
|
||
public onRobotSelected(robotType: String) { | ||
this.dialogRef.close(robotType); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.