Skip to content

Commit

Permalink
#801 - Make it possible to hide value cards on maximized screen
Browse files Browse the repository at this point in the history
  • Loading branch information
graphefruit committed Sep 30, 2024
1 parent 01a67bd commit 68531ff
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/brew/brew-flow/brew-flow.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@



<div *ngIf="isDetail===false" id="informationContainer">
<div *ngIf="isDetail===false" id="informationContainer" [hidden]="settings.maximize_hide_value_cards_on_maximize_screen">
<ion-grid class="ion-text-center ion-no-padding brew-information-panel">
<ion-row style="padding-bottom:5px;">
<ion-col *ngIf="smartScaleConnected() || ( brewComponent?.brewBrewingPreparationDeviceEl?.preparationDeviceConnected() && brewComponent?.brewBrewingPreparationDeviceEl?.getPreparationDeviceType() === PREPARATION_DEVICE_TYPE_ENUM.METICULOUS)"
Expand Down
8 changes: 8 additions & 0 deletions src/app/settings/settings.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,14 @@ <h2>{{"SMART_SCALE_MAXIMIZE_ON_START_TIMER" | translate}}</h2>
</div>
</ion-checkbox>
</ion-item>
<ion-item>
<ion-checkbox label-placement='start' (ngModelChange)="saveSettings();"
[(ngModel)]="settings.maximize_hide_value_cards_on_maximize_screen">
<div class='ion-label' style="white-space: normal;">
<h2>{{"HIDE_VALUE_CARDS_ON_MAXIMIZED_SCREEN" | translate}}</h2>
</div>
</ion-checkbox>
</ion-item>
<ion-item [lines]="settings.bluetooth_scale_listening_threshold_active?'none':'full'">
<ion-checkbox label-placement='start' (ngModelChange)="saveSettings();"
[(ngModel)]="settings.bluetooth_scale_listening_threshold_active">
Expand Down
3 changes: 2 additions & 1 deletion src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1401,5 +1401,6 @@
"DISCONNECT_PRESSURE": "Disconnect pressure",
"DISCONNECT_TEMPERATURE": "Disconnect temperature",
"DISCONNECT_REFRACTOMETER": "Disconnect refractometer",
"NO_DEVICES_FOUND_PLEASE_TRY_AGAIN": "We didn't find any supported bluetooth devices, please try again"
"NO_DEVICES_FOUND_PLEASE_TRY_AGAIN": "We didn't find any supported bluetooth devices, please try again",
"HIDE_VALUE_CARDS_ON_MAXIMIZED_SCREEN": "Hide value cards on maximized screen"
}
4 changes: 4 additions & 0 deletions src/classes/settings/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ export class Settings implements ISettings {
public bluetooth_scale_ignore_weight_button_active: boolean;
public bluetooth_scale_first_drip_threshold: number;

public maximize_hide_value_cards_on_maximize_screen: boolean;

public pressure_id: string;
public pressure_type: PressureType;
public pressure_log: boolean;
Expand Down Expand Up @@ -449,6 +451,8 @@ export class Settings implements ISettings {
this.bluetooth_scale_ignore_weight_button_active = false;
this.bluetooth_scale_first_drip_threshold = 0.1;

this.maximize_hide_value_cards_on_maximize_screen = false;

this.scale_log = false;

this.pressure_id = '';
Expand Down
2 changes: 2 additions & 0 deletions src/interfaces/settings/iSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ export interface ISettings {
bluetooth_scale_ignore_weight_button_active: boolean;
bluetooth_scale_first_drip_threshold: number;

maximize_hide_value_cards_on_maximize_screen: boolean;

pressure_id: string;
pressure_type: PressureType;
pressure_log: boolean;
Expand Down

0 comments on commit 68531ff

Please sign in to comment.