Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make labels consistent #38

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/app/appsettings/appsettings.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</ion-label>
</ion-item-divider>
<ion-item routerLink="/appsettings/notifications">
<ion-label>Local Push-Notifications</ion-label>
<ion-label>Local push notifications</ion-label>
<ion-badge slot="end" color="success" *ngIf="appSettings.notificationsEnabled">enabled</ion-badge>
<ion-badge slot="end" color="light" *ngIf="!appSettings.notificationsEnabled">disabled</ion-badge>
</ion-item>
Expand All @@ -53,7 +53,7 @@
</ion-label>
</ion-item-divider>
<ion-item routerLink="/appsettings/odometer">
<ion-label>Use Odometer</ion-label>
<ion-label>Use odometer</ion-label>
<ion-badge slot="end" color="success" *ngIf="appSettings.useOdometer">enabled</ion-badge>
<ion-badge slot="end" color="light" *ngIf="!appSettings.useOdometer">disabled</ion-badge>
</ion-item>
Expand All @@ -65,7 +65,7 @@
</ion-label>
</ion-item-divider>
<ion-item>
<ion-label>App-Version</ion-label>
<ion-label>App version</ion-label>
<ion-label>{{version}}</ion-label>
</ion-item>
<ion-item>
Expand Down
11 changes: 3 additions & 8 deletions src/app/appsettings/notifications/notifications.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,8 @@
</ion-card>
</ion-item-group>
<ion-item-group *ngIf="appSettings.notificationsEnabled">
<ion-item-divider>
<ion-label>
Notification types
</ion-label>
</ion-item-divider>
<ion-item>
<ion-label position="stacked">Battery Warnings</ion-label>
<ion-label position="stacked">Battery warnings</ion-label>
<ion-toggle slot="end" name="batteryNotificationEnabled" [(ngModel)]="appSettings.batteryNotificationEnabled"
(ngModelChange)="appSettings.toggleValue('batteryNotificationEnabled', $event)"></ion-toggle>
<ion-grid>
Expand Down Expand Up @@ -64,7 +59,7 @@
</ion-item>

<ion-item>
<ion-label position="stacked">Current Warnings</ion-label>
<ion-label position="stacked">Current warnings</ion-label>
<ion-toggle slot="end" name="currentNotificationEnabled" [(ngModel)]="appSettings.currentNotificationEnabled"
(ngModelChange)="appSettings.toggleValue('currentNotificationEnabled', $event)"></ion-toggle>
<ion-grid *ngIf="appSettings.currentNotificationEnabled">
Expand Down Expand Up @@ -103,7 +98,7 @@
</ion-grid>
</ion-item>
<ion-item>
<ion-label position="stacked">DutyCycle Warnings</ion-label>
<ion-label position="stacked">Duty cycle warnings</ion-label>
<ion-toggle slot="end" name="dutycycleNotificationEnabled" [(ngModel)]="appSettings.dutycycleNotificationEnabled"
(ngModelChange)="appSettings.toggleValue('dutycycleNotificationEnabled', $event)"></ion-toggle>
<ion-grid *ngIf="appSettings.dutycycleNotificationEnabled">
Expand Down
2 changes: 1 addition & 1 deletion src/app/appsettings/odometer/odometer.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<ion-content>
<ion-list>
<ion-item>
<ion-label>Enable Odometer</ion-label>
<ion-label>Enable odometer</ion-label>
<ion-toggle slot="end" name="notificationsEnabled" [(ngModel)]="appSettings.useOdometer" disabled="true"
(ngModelChange)="appSettings.toggleValue('useOdometer', $event)"></ion-toggle>
</ion-item>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<ion-row>
<ion-col>
<div id="dutyGaugeDiv" align="center">
<span style="font-size:14px;opacity:0.6">DutyCycle</span>
<span style="font-size:14px;opacity:0.6">Duty Cycle</span>
<highcharts-chart
*ngIf="isHighcharts"
[Highcharts]="dutyGaugeChart"
Expand Down
10 changes: 5 additions & 5 deletions src/app/device/device.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@
</ion-row>
<ion-row *ngIf="bleService.isRescueDevice">
<ion-col>
<p>HW-Version: {{hardwareVersion}}</p>
<p>Hardware version: {{hardwareVersion}}</p>
</ion-col>
<ion-col>
<p>FW-Version: {{softwareVersion}}</p>
<p>Firmware version: {{softwareVersion}}</p>
</ion-col>
</ion-row>
<ion-row *ngIf="bleService.isRescueDevice">
<ion-col>
<p>Looptime: {{rescueData.loopTime}}</p>
</ion-col>
<ion-col>
<p>Max. Looptime: {{rescueData.maxLoopTime}}</p>
<p>Max looptime: {{rescueData.maxLoopTime}}</p>
</ion-col>
</ion-row>
</ion-grid>
Expand Down Expand Up @@ -82,10 +82,10 @@
</ion-col>
<ion-col size="5">
<div *ngIf="appSettings.metricSystemEnabled">
Abs.: {{(rescueData.tachometerAbs / 438 / 1000) | number: '1.1-1'}} km<br/>
Lifetime: {{(rescueData.tachometerAbs / 438 / 1000) | number: '1.1-1'}} km<br/>
</div>
<div *ngIf="!appSettings.metricSystemEnabled">
Abs.: {{(rescueData.tachometerAbs / 438 / 1000) | number: '1.1-1'}} mi<br/>
Lifetime: {{(rescueData.tachometerAbs / 438 / 1000) | number: '1.1-1'}} mi<br/>
</div>
</ion-col>
</ion-row>
Expand Down
34 changes: 3 additions & 31 deletions src/app/settings/battery/battery.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,6 @@
<ion-label>Select Battery Presets</ion-label>
</ion-chip>
</ion-item>
<ion-item>
<ion-label position="stacked">Number of pixel</ion-label>
<ion-input class="ion-text-right" type="number" value="5" slot="end"
[(ngModel)]="rescueConf.numberPixelBatMon"></ion-input>
</ion-item>
<ion-item>
<ion-label class="ion-text-wrap">LED Maximum Brightness [{{rescueConf.lightbarMaxBrightness}}]
<ion-range min="0" max="255" step="1" [(ngModel)]="rescueConf.lightbarMaxBrightness" pin snaps color="secondary"
(ionKnobMoveEnd)="changeLightbarMaxBrightness($event)">
<ion-icon slot="start" size="small" color="secondary" name="sunny"></ion-icon>
<ion-icon slot="end" color="secondary" name="sunny"></ion-icon>
</ion-range>
</ion-label>
</ion-item>
<ion-item>
<ion-label class="ion-text-wrap">Turn off at ERPM [{{rescueConf.lightbarTurnOffErpm}}]
<ion-range min="0" max="5000" step="500" [(ngModel)]="rescueConf.lightbarTurnOffErpm" pin snaps color="secondary"
(ionKnobMoveEnd)="changeLightbarTurnOffErpm($event)">
<ion-icon slot="start" size="small" color="secondary" name="speedometer-outline"></ion-icon>
<ion-icon slot="end" color="secondary" name="speedometer-outline"></ion-icon>
</ion-range>
</ion-label>
</ion-item>
<ion-item-divider>
<ion-label>
Battery Voltage settings
</ion-label>
</ion-item-divider>
<ion-item>
<ion-label position="stacked">Battery drift</ion-label>
<ion-input class="ion-text-right" type="number" inputmode="decimal"
Expand All @@ -41,23 +13,23 @@
step="0.1" slot="end"></ion-input>
</ion-item>
<ion-item>
<ion-label position="stacked">Min. Voltage (V)</ion-label>
<ion-label position="stacked">Min voltage (V)</ion-label>
<ion-input class="ion-text-right" type="number" inputmode="decimal"
min="{{batteryPresets.minVoltage - 1}}" max="{{batteryPresets.maxVoltage}}"
[(ngModel)]="rescueConf.minBatteryVoltage"
(ionChange)="checkValues()"
step="0.1" slot="end"></ion-input>
</ion-item>
<ion-item>
<ion-label position="stacked">Low Bat. Warning (V)</ion-label>
<ion-label position="stacked">Low battery warning (V)</ion-label>
<ion-input class="ion-text-right" type="number" inputmode="decimal"
min="{{batteryPresets.minVoltage}}" max="{{batteryPresets.maxVoltage}}"
[(ngModel)]="rescueConf.lowBatteryVoltage"
(ionChange)="checkValues()"
step="0.1" slot="end"></ion-input>
</ion-item>
<ion-item>
<ion-label position="stacked">Max. Voltage (V)</ion-label>
<ion-label position="stacked">Max voltage (V)</ion-label>
<ion-input class="ion-text-right" type="number" inputmode="decimal"
min="{{batteryPresets.minVoltage}}" max="{{batteryPresets.maxVoltage + 1}}"
[(ngModel)]="rescueConf.maxBatteryVoltage"
Expand Down
16 changes: 3 additions & 13 deletions src/app/settings/canbus/canbus.component.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
<ion-item>
<ion-text>
<p>Please configure your VESC-ID appropriately to match the ID in VESC.</p>
</ion-text>
</ion-item>
<ion-item>
<ion-label position="stacked">VESC-ID</ion-label>
<ion-label position="stacked">VESC ID</ion-label>
<ion-input class="ion-text-right" type="number" value="25" [(ngModel)]="rescueConf.vescId" slot="end"></ion-input>
</ion-item>
<ion-item-divider>
<ion-label>
Time settings
</ion-label>
</ion-item-divider>
<ion-item>
<ion-label position="stacked" class="ion-text-wrap">Realtime-Data Interval [{{rescueConf.realtimeDataInterval}} ms]
<ion-label position="stacked" class="ion-text-wrap">Realtime data interval [{{rescueConf.realtimeDataInterval}} ms]
<ion-range min="200" max="1000" step="50" value="{{rescueConf.realtimeDataInterval}}"
(ionChange)="changeRealtimeDataInterval($event)" pin snaps color="secondary">
<ion-icon slot="start" size="small" color="secondary" name="timer-outline"></ion-icon>
Expand All @@ -22,7 +12,7 @@
</ion-label>
</ion-item>
<ion-item>
<ion-label position="stacked" class="ion-text-wrap">Balance-Data Interval [{{rescueConf.balanceDataInterval}} ms]
<ion-label position="stacked" class="ion-text-wrap">Balance data interval [{{rescueConf.balanceDataInterval}} ms]
<ion-range min="200" max="1000" step="50" value="{{rescueConf.balanceDataInterval}}"
(ionChange)="changeBalanceDataInterval($event)" pin snaps color="secondary">
<ion-icon slot="start" size="small" color="secondary" name="timer-outline"></ion-icon>
Expand Down
84 changes: 59 additions & 25 deletions src/app/settings/lights/lights.component.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<ion-item>
<ion-label position="stacked">Number of pixel</ion-label>
<ion-label position="stacked">Number of pixels</ion-label>
<ion-input class="ion-text-right" type="number" value="32" [(ngModel)]="rescueConf.numberPixelLight"></ion-input>
</ion-item>
<ion-item>
Expand All @@ -9,13 +9,8 @@
<ion-label>Change Type</ion-label>
</ion-chip>
</ion-item>
<ion-item-divider>
<ion-label>
Light pattern
</ion-label>
</ion-item-divider>
<ion-item>
<ion-label position="stacked">Start Light Pattern</ion-label>
<ion-label position="stacked">Startup light pattern</ion-label>
<ion-select [(ngModel)]="rescueConf.startLightIndex" interface="action-sheet">
<ion-select-option value="1">Chasing</ion-select-option>
<ion-select-option value="2">Cylone</ion-select-option>
Expand All @@ -24,22 +19,30 @@
</ion-select>
</ion-item>
<ion-item>
<ion-label position="stacked">Idle Light Pattern</ion-label>
<ion-label position="stacked">Idle light pattern</ion-label>
<ion-select [(ngModel)]="rescueConf.idleLightIndex" interface="action-sheet">
<ion-select-option value="1">Chasing</ion-select-option>
<ion-select-option value="2">Cylone</ion-select-option>
<ion-select-option value="3">Rainbow</ion-select-option>
<ion-select-option value="4">Pulsating</ion-select-option>
<ion-select-option value="5">Battery-Indicator</ion-select-option>
<ion-select-option value="5">Battery indicator</ion-select-option>
</ion-select>
</ion-item>
<ion-item>
<ion-label position="stacked" class="ion-text-wrap">LED idle timeout [{{ (rescueConf.idleLightTimeout > 0 ? rescueConf.idleLightTimeout + 'ms' : 'infinite') }}]
<ion-range min="0" max="60000" step="500" [(ngModel)]="rescueConf.idleLightTimeout" pin snaps color="secondary">
<ion-icon slot="start" size="small" color="secondary" name="timer-outline"></ion-icon>
<ion-icon slot="end" color="secondary" name="timer-outline"></ion-icon>
</ion-range>
</ion-label>
</ion-item>
<ion-item-divider>
<ion-label>
Light settings
Color and Brightness
</ion-label>
</ion-item-divider>
<ion-item>
<ion-label class="ion-text-wrap">Front color</ion-label>
<ion-label position="stacked" class="ion-text-wrap">Front color</ion-label>
{{lightColorPrimary}}
<ion-note slot="end">
<ngx-colors ngx-colors-trigger
Expand All @@ -51,7 +54,7 @@
</ion-note>
</ion-item>
<ion-item>
<ion-label class="ion-text-wrap">Back color</ion-label>
<ion-label position="stacked" class="ion-text-wrap">Back color</ion-label>
{{lightColorSecondary}}
<ion-note slot="end">
<ngx-colors ngx-colors-trigger
Expand All @@ -63,41 +66,72 @@
</ion-note>
</ion-item>
<ion-item>
<ion-label class="ion-text-wrap">LED Maximum Brightness [{{rescueConf.lightMaxBrightness}}]
<ion-label position="stacked" class="ion-text-wrap">LED max brightness [{{rescueConf.lightMaxBrightness}}]
<ion-range min="0" max="255" step="1" [(ngModel)]="rescueConf.lightMaxBrightness" pin snaps color="secondary">
<ion-icon slot="start" size="small" color="secondary" name="sunny"></ion-icon>
<ion-icon slot="end" color="secondary" name="sunny"></ion-icon>
</ion-range>
</ion-label>
</ion-item>
<ion-item>
<ion-label class="ion-text-wrap">LED Fading Duration [{{rescueConf.lightFadingDuration}} ms]
<ion-label position="stacked"class="ion-text-wrap">LED fading duration [{{rescueConf.lightFadingDuration}} ms]
<ion-range min="0" max="500" step="1" [(ngModel)]="rescueConf.lightFadingDuration" pin snaps color="secondary">
<ion-icon slot="start" size="small" color="secondary" name="timer-outline"></ion-icon>
<ion-icon slot="end" color="secondary" name="timer-outline"></ion-icon>
</ion-range>
</ion-label>
</ion-item>
<ion-item>
<ion-label class="ion-text-wrap">LED Idle Timeout [{{ (rescueConf.idleLightTimeout > 0 ? rescueConf.idleLightTimeout + 'ms' : 'infinite') }}]
<ion-range min="0" max="60000" step="500" [(ngModel)]="rescueConf.idleLightTimeout" pin snaps color="secondary">
<ion-icon slot="start" size="small" color="secondary" name="timer-outline"></ion-icon>
<ion-icon slot="end" color="secondary" name="timer-outline"></ion-icon>
</ion-range>
</ion-label>
</ion-item>
<ion-item-divider>
<ion-label>
Brake light
Brake Light
</ion-label>
</ion-item-divider>
<ion-item>
<ion-label position="stacked">Enable Brake Light</ion-label>
<ion-label position="stacked">Enable brake light</ion-label>
<ion-toggle slot="end" name="brakeLightsEnabled" [(ngModel)]="rescueConf.brakeLightEnabled"></ion-toggle>
</ion-item>
<ion-item *ngIf="rescueConf.brakeLightEnabled">
<ion-label class="ion-text-wrap">Brake Light Amp Min [{{rescueConf.brakeLightMinAmp}} A]
<ion-label position="stacked" class="ion-text-wrap">Min brake light amps [{{rescueConf.brakeLightMinAmp}} A]
<ion-range min="1" max="10" step="1" [(ngModel)]="rescueConf.brakeLightMinAmp" pin snaps color="secondary">
</ion-range>
</ion-label>
</ion-item>
<ion-item-divider>
<ion-grid>
<ion-row>
<ion-label>
Light Bar
</ion-label>
</ion-row>
<ion-row>
<ion-text>
<sub>
The light bar displays the current battery monitor status (settings below)
</sub>
</ion-text>
</ion-row>
</ion-grid>
</ion-item-divider>
<ion-item>
<ion-label position="stacked">Number of pixels</ion-label>
<ion-input class="ion-text-right" type="number" value="5" min="0" slot="end"
[(ngModel)]="rescueConf.numberPixelBatMon"></ion-input>
</ion-item>
<ion-item *ngIf="rescueConf.numberPixelBatMon !== 0">
<ion-label position="stacked" class="ion-text-wrap">Maximum LED brightness [{{rescueConf.lightbarMaxBrightness}}]
<ion-range min="0" max="255" step="1" [(ngModel)]="rescueConf.lightbarMaxBrightness" pin snaps color="secondary"
(ionKnobMoveEnd)="changeLightbarMaxBrightness($event)">
<ion-icon slot="start" size="small" color="secondary" name="sunny"></ion-icon>
<ion-icon slot="end" color="secondary" name="sunny"></ion-icon>
</ion-range>
</ion-label>
</ion-item>
<ion-item *ngIf="rescueConf.numberPixelBatMon !== 0">
<ion-label position="stacked" class="ion-text-wrap">Turn off at ERPM [{{rescueConf.lightbarTurnOffErpm}}]
<ion-range min="0" max="5000" step="500" [(ngModel)]="rescueConf.lightbarTurnOffErpm" pin snaps color="secondary"
(ionKnobMoveEnd)="changeLightbarTurnOffErpm($event)">
<ion-icon slot="start" size="small" color="secondary" name="speedometer-outline"></ion-icon>
<ion-icon slot="end" color="secondary" name="speedometer-outline"></ion-icon>
</ion-range>
</ion-label>
</ion-item>
3 changes: 3 additions & 0 deletions src/app/settings/lights/lights.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';
import {LedTypeComponent} from '../led-type/led-type.component';
import {PopoverController} from '@ionic/angular';
import { RescueConf } from 'src/app/models/RescueConf';
import {NGXLogger} from 'ngx-logger';

@Component({
Expand All @@ -17,6 +18,8 @@ export class LightsComponent implements OnInit {
colorPickerFormat = 'hex';
lightColorPrimary = '';
lightColorSecondary = '';
@Input() rescueConf: RescueConf;


constructor(
private popoverController: PopoverController,
Expand Down
Loading