Skip to content

Commit

Permalink
#811 / #837 - Adding more @ifs :)
Browse files Browse the repository at this point in the history
  • Loading branch information
graphefruit committed Nov 23, 2024
1 parent afc5b16 commit 2f282e8
Showing 1 changed file with 69 additions and 66 deletions.
135 changes: 69 additions & 66 deletions src/components/brew-information/brew-information.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<div style="margin-left:10px;margin-right:10px;" *ngIf="layout === 'brew'" #brewInformationContainer>
@if(layout === 'brew') {
<div style="margin-left:10px;margin-right:10px;" #brewInformationContainer>

@if (brew.flow_profile) {
<swiper-container #swiper pager="true" [pagination]="{ draggable: true, clickable: true }">
Expand All @@ -22,76 +23,78 @@
}
<div style='height:10px;'></div>
</div>
<ion-card class='long-card dashboard-layout' [class.best-brew]="brew.best_brew" [class.favourite-brew]="brew.favourite" tappable (click)='showBrew()' (long-press)='longPressEditBrew($event)'
*ngIf="layout === 'dashboard'">
<ion-card-content class='no-ion-padding no-ion-margin' #card>
<ion-grid class='ion-no-padding'>
<ion-row>
<ion-col size='3' size-xs='4'>
} @else {
<ion-card class='long-card dashboard-layout' [class.best-brew]="brew.best_brew" [class.favourite-brew]="brew.favourite" tappable (click)='showBrew()' (long-press)='longPressEditBrew($event)'>
<ion-card-content class='no-ion-padding no-ion-margin' #card>
<ion-grid class='ion-no-padding'>
<ion-row>
<ion-col size='3' size-xs='4'>

<div class='dashboard-time-center'>
<div class='font-size-18'>
{{ brew.config.unix_timestamp | formatDate:["DD"] }}.<br />
<span class='font-size-14'>
<div class='dashboard-time-center'>
<div class='font-size-18'>
{{ brew.config.unix_timestamp | formatDate:["DD"] }}.<br />
<span class='font-size-14'>
{{ brew.config.unix_timestamp | formatDate:["MMMM"] }}
<br />{{ brew.config.unix_timestamp | formatDate:["YYYY"] }}
<br />{{ brew.config.unix_timestamp | formatDate:["YYYY"] }}
</span>
</div>

</div>
<div class='vr'></div>
</ion-col>
<ion-col size='9' size-xs='8' style='padding-left:16px;'>
<div style='padding-top:8px;padding-right:8px;padding-bottom:8px;'>
<ion-grid class='ion-no-padding'>
<ion-row>
<ion-col class='margin-header' size='10'>
<ion-list lines='none' style='width:100%;'>
<ion-item>
<ion-col class='ion-text-bold' size='12'>
<ion-icon *ngIf='brew.best_brew' name='trophy'
style='top: 3px;position: relative;margin-right:5px;'></ion-icon>
<ion-icon *ngIf='brew.favourite' name='heart'
style='top: 3px;position: relative;margin-right:5px;'></ion-icon>
<ion-icon *ngIf='brew?.flow_profile' name='analytics-outline'
style='top: 3px;position: relative;margin-right:5px;'></ion-icon>
<ion-icon style='top: 3px;position: relative;margin-right:5px;' name='snow-outline'
*ngIf='(bean | beanFunctionPipe: BEAN_FUNCTION_PIPE_ENUM.IS_FROZEN)'></ion-icon>
<ng-container *ngIf='(bean | beanFunctionPipe: BEAN_FUNCTION_PIPE_ENUM.IS_UNFROZEN)'>(<ion-icon style='top: 3px;position: relative;' name='snow-outline'></ion-icon>)
</ng-container>
{{ bean?.name }}
</ion-col>
</ion-item>
<ion-item>
<ion-col size='12'>
{{ preparation?.name }}
</ion-col>
</ion-item>
<ion-item>
<ion-col size='12'>
{{ mill?.name }}
</ion-col>
</ion-item>
</ion-list>
</ion-col>
<ion-col size='2'>
<ion-button *ngIf='(brew | brewFunctionPipe: BREW_FUNCTION_PIPE_ENUM.IS_ARCHIVED)===false' (click)='showBrewActions($event)'
class='button-top-absolute' color='accent'
fill='clear' tappable>
<ion-icon name='beanconqueror-dots' slot='icon-only'></ion-icon>
</ion-button>
<ion-button *ngIf='(brew | brewFunctionPipe: BREW_FUNCTION_PIPE_ENUM.IS_ARCHIVED) === true' class='button-top-absolute' color='accent' fill='clear'>
<ion-icon name='archive' slot='icon-only'></ion-icon>
</ion-button>
</ion-col>
</ion-row>
</ion-grid>
</div>
</ion-col>
</ion-row>
</ion-grid>
</ion-card-content>
</ion-card>
}

</div>
<div class='vr'></div>
</ion-col>
<ion-col size='9' size-xs='8' style='padding-left:16px;'>
<div style='padding-top:8px;padding-right:8px;padding-bottom:8px;'>
<ion-grid class='ion-no-padding'>
<ion-row>
<ion-col class='margin-header' size='10'>
<ion-list lines='none' style='width:100%;'>
<ion-item>
<ion-col class='ion-text-bold' size='12'>
<ion-icon *ngIf='brew.best_brew' name='trophy'
style='top: 3px;position: relative;margin-right:5px;'></ion-icon>
<ion-icon *ngIf='brew.favourite' name='heart'
style='top: 3px;position: relative;margin-right:5px;'></ion-icon>
<ion-icon *ngIf='brew?.flow_profile' name='analytics-outline'
style='top: 3px;position: relative;margin-right:5px;'></ion-icon>
<ion-icon style='top: 3px;position: relative;margin-right:5px;' name='snow-outline'
*ngIf='(bean | beanFunctionPipe: BEAN_FUNCTION_PIPE_ENUM.IS_FROZEN)'></ion-icon>
<ng-container *ngIf='(bean | beanFunctionPipe: BEAN_FUNCTION_PIPE_ENUM.IS_UNFROZEN)'>(<ion-icon style='top: 3px;position: relative;' name='snow-outline'></ion-icon>)
</ng-container>
{{ bean?.name }}
</ion-col>
</ion-item>
<ion-item>
<ion-col size='12'>
{{ preparation?.name }}
</ion-col>
</ion-item>
<ion-item>
<ion-col size='12'>
{{ mill?.name }}
</ion-col>
</ion-item>
</ion-list>
</ion-col>
<ion-col size='2'>
<ion-button *ngIf='(brew | brewFunctionPipe: BREW_FUNCTION_PIPE_ENUM.IS_ARCHIVED)===false' (click)='showBrewActions($event)'
class='button-top-absolute' color='accent'
fill='clear' tappable>
<ion-icon name='beanconqueror-dots' slot='icon-only'></ion-icon>
</ion-button>
<ion-button *ngIf='(brew | brewFunctionPipe: BREW_FUNCTION_PIPE_ENUM.IS_ARCHIVED) === true' class='button-top-absolute' color='accent' fill='clear'>
<ion-icon name='archive' slot='icon-only'></ion-icon>
</ion-button>
</ion-col>
</ion-row>
</ion-grid>
</div>
</ion-col>
</ion-row>
</ion-grid>
</ion-card-content>
</ion-card>
<ng-template #brewCardTemplate>
<ion-card class='long-card brew-layout' [class.best-brew]="brew.best_brew" [class.favourite-brew]="brew.favourite" tappable (click)='showBrew()' (long-press)='longPressEditBrew($event)'>
<ion-card-content #card class='no-ion-col-vertical-padding ion-padding-top' [ngClass]="brew.flow_profile?'add-bottom-spacing':''">
Expand Down

0 comments on commit 2f282e8

Please sign in to comment.