Skip to content

Commit

Permalink
Add CODE button to drivers pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
tkem committed Mar 24, 2024
1 parent 179fc61 commit 81e2b7e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/app/drivers/drivers.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
<ion-title>
<span translate>Drivers</span>
</ion-title>
<ion-buttons slot="end">
<ion-button fill="outline" shape="round" (click)="pressCodeButton()">
CODE
</ion-button>
</ion-buttons>
</ion-toolbar>
</ion-header>

Expand Down
10 changes: 9 additions & 1 deletion src/app/drivers/drivers.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@ import { TranslateService } from '@ngx-translate/core';
import { Observable } from 'rxjs';

import { AppSettings, Driver } from '../app-settings';
import { AppService, LoggingService, SpeechService } from '../services';
import { AppService, ControlUnitService, LoggingService, SpeechService } from '../services';

import { ColorComponent } from './color.component';

import { ControlUnitButton } from '../carrera';

@Component({
templateUrl: 'drivers.page.html'
})
Expand All @@ -25,6 +28,7 @@ export class DriversPage implements OnDestroy, OnInit {

constructor(
private app: AppService,
private cu: ControlUnitService,
private logger: LoggingService,
private settings: AppSettings,
private mc: ModalController,
Expand Down Expand Up @@ -94,6 +98,10 @@ export class DriversPage implements OnDestroy, OnInit {
})
}

pressCodeButton() {
this.cu.value.trigger(ControlUnitButton.CODE);
}

onChangeName(event) {
event?.target?.getInputElement().then(e => e.blur());
}
Expand Down

0 comments on commit 81e2b7e

Please sign in to comment.