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

add New daily ui #16

Merged
merged 3 commits into from Apr 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -1,12 +1,9 @@
<ion-grid style="width:100%;height:300px;overflow:scroll;">
<ion-row *ngFor="let picRow of pics;" class="ion-justify-content-evenly">
<!-- <ion-virtual-scroll [items]="items" approxItemHeight="220px" height="100%"> -->
<div *ngFor="let pic of picRow">
<ion-thumbnail >
<ion-row *ngFor="let picRow of pics;" class="ion-justify-content-evenly">
<div *ngFor="let pic of picRow">
<ion-thumbnail>
<ion-img [src]="pic.src"></ion-img>
</ion-thumbnail>
</div>
</ion-row>
</ion-grid>


</ion-row>
</ion-grid>
Expand Up @@ -12,6 +12,7 @@ export interface Pic {
styleUrls: ['./daily-detail-photos.component.scss'],
})
export class DailyDetailPhotosComponent implements OnInit {

catPic: Pic = {
// Free-to-use mock image from https://pixabay.com/photos/cat-surprised-eyes-cat-s-eyes-2886062/
src: 'https://cdn.pixabay.com/photo/2017/10/24/20/33/cat-2886062_1280.jpg',
Expand Down
@@ -1,34 +1,76 @@
<ion-list>
<ion-item>
<!-- <ion-label>{{ 'SYMPTOM.fever' | translate }}</ion-label>
<ion-toggle [(ngModel)]="cough"></ion-toggle> -->
<ion-list style="width:100%;height:300px;overflow:scroll;"a>
<div *ngFor="let ToDay of list[0].temperatureList">

<ion-item detail="false">
<ion-label>{{ ToDay.time }}</ion-label>
<ion-label class="ion-text-start">
{{ ToDay.temperature }}
</ion-label>
<div>
<!-- <ion-icon name="caret-forward-outline" *ngIf="!ToDay.isShow" button (click)="ToDay.isShow=!ToDay.isShow"> -->
<ion-icon name="caret-forward-outline" *ngIf="!ToDay.isShow" button (click)="ToDay.isShow=!ToDay.isShow;">
</ion-icon>
</div>
<div>
<ion-icon name="caret-down-outline" *ngIf="ToDay.isShow" button (click)="ToDay.isShow=!ToDay.isShow;">
<!-- 加入選擇器 -->

</ion-icon>
</div>
</ion-item>
<ion-list *ngIf="ToDay.isShow">
<ion-item>
<img *ngIf="ToDay.cough.isShow" src="../../assets/ui/today_icon_a.svg" />
<ion-label *ngIf="ToDay.cough.isShow" class="ion-text-center" style="color: #F9AD35;">{{ToDay.cough.detail}}
</ion-label>
<img *ngIf="!ToDay.cough.isShow" src="../../assets/ui/today_icon_a_d.svg" />
<ion-label *ngIf="!ToDay.cough.isShow" class="ion-text-center" style="color: #D6D6D6;">沒有症狀</ion-label>
</ion-item>
<ion-item>
<img *ngIf="ToDay.fever.isShow" src="../../assets/ui/today_icon_b.svg" />
<ion-label *ngIf="ToDay.fever.isShow" class="ion-text-center" style="color: #F9AD35;">{{ToDay.fever.detail}}
</ion-label>
<img *ngIf="!ToDay.fever.isShow" src="../../assets/ui/today_icon_b_d.svg" />
<ion-label *ngIf="!ToDay.fever.isShow" class="ion-text-center" style="color: #D6D6D6;">沒有症狀</ion-label>
</ion-item>
<ion-item>
<img *ngIf="ToDay.runnyNose.isShow" src="../../assets/ui/today_icon_c.svg" />
<ion-label *ngIf="ToDay.runnyNose.isShow" class="ion-text-center" style="color: #F9AD35;">
{{ToDay.runnyNose.detail}}</ion-label>
<img *ngIf="!ToDay.runnyNose.isShow" src="../../assets/ui/today_icon_c_d.svg" />
<ion-label *ngIf="!ToDay.runnyNose.isShow" class="ion-text-center" style="color: #D6D6D6;">沒有症狀</ion-label>
</ion-item>
<ion-item>
<img *ngIf="ToDay.stuffyNose.isShow" src="../../assets/ui/today_icon_d.svg" />
<ion-label *ngIf="ToDay.stuffyNose.isShow" class="ion-text-center" style="color: #F9AD35;">
{{ToDay.stuffyNose.detail}}</ion-label>
<img *ngIf="!ToDay.stuffyNose.isShow" src="../../assets/ui/today_icon_d_d.svg" />
<ion-label *ngIf="!ToDay.stuffyNose.isShow" class="ion-text-center" style="color: #D6D6D6;">沒有症狀</ion-label>
</ion-item>
</ion-list>
</div>
<!-- <ion-item>
<img *ngIf="data.cough.isShow" src="../../assets/ui/today_icon_a.svg" />
<ion-label *ngIf="data.cough.isShow" class="ion-text-center" style="color: #F9AD35;">{{data.cough.detail}}</ion-label>
<img *ngIf="!data.cough.isShow" src="../../assets/ui/today_icon_a_d.svg" />
<ion-label *ngIf="!data.cough.isShow"class="ion-text-center" style="color: #D6D6D6;">沒有症狀</ion-label>
</ion-item>
<ion-item>
<!-- <ion-label>{{ 'SYMPTOM.fever' | translate }}</ion-label>
<ion-toggle [(ngModel)]="fever"></ion-toggle> -->
<img *ngIf="data.fever.isShow" src="../../assets/ui/today_icon_b.svg" />
<ion-label *ngIf="data.fever.isShow" class="ion-text-center" style="color: #F9AD35;">{{data.fever.detail}}</ion-label>
<img *ngIf="!data.fever.isShow" src="../../assets/ui/today_icon_b_d.svg" />
<ion-label *ngIf="!data.fever.isShow"class="ion-text-center" style="color: #D6D6D6;">沒有症狀</ion-label>
</ion-item>
<ion-item>
<!-- <ion-label>{{ 'SYMPTOM.runnyNose' | translate }}</ion-label>
<ion-toggle [(ngModel)]="runnyNose"></ion-toggle> -->
<img *ngIf="data.runnyNose.isShow" src="../../assets/ui/today_icon_c.svg" />
<ion-label *ngIf="data.runnyNose.isShow" class="ion-text-center" style="color: #F9AD35;">{{data.runnyNose.detail}}</ion-label>
<img *ngIf="!data.runnyNose.isShow" src="../../assets/ui/today_icon_c_d.svg" />
<ion-label *ngIf="!data.runnyNose.isShow"class="ion-text-center" style="color: #D6D6D6;">沒有症狀</ion-label>
</ion-item>
<ion-item>
<!-- <ion-label>{{ 'SYMPTOM.stuffyNose' | translate }}</ion-label>
<ion-toggle [(ngModel)]="stuffyNose"></ion-toggle> -->
<img *ngIf="data.stuffyNose.isShow" src="../../assets/ui/today_icon_d.svg" />
<ion-label *ngIf="data.stuffyNose.isShow" class="ion-text-center" style="color: #F9AD35;">{{data.stuffyNose.detail}}</ion-label>
<img *ngIf="!data.stuffyNose.isShow" src="../../assets/ui/today_icon_d_d.svg" />
<ion-label *ngIf="!data.stuffyNose.isShow"class="ion-text-center" style="color: #D6D6D6;">沒有症狀</ion-label>
</ion-item>
</ion-list>
</ion-item> -->
</ion-list>
Expand Up @@ -6,6 +6,143 @@ import { Component, OnInit } from '@angular/core';
styleUrls: ['./daily-detail-symptoms.component.scss'],
})
export class DailyDetailSymptomsComponent implements OnInit {
isShow = true;

list = [
{
date: "2020/03/28",
day: 1,
isShhow: true,
isSelect: false,
temperatureList: [
{
temperature: 36.5,
time: '09:11',
cough: {
isShow: true,
detail: '5分鐘咳了10次左右'
},
fever: {
isShow: false,
detail: '5分鐘咳了10次左右'

},
runnyNose: {
isShow: false,
detail: '5分鐘咳了10次左右'

},
stuffyNose: {
isShow: true,
detail: '有點嗅覺失靈'

}

}, {
temperature: 25.0,
time: '09:11',
cough: {
isShow: true,
detail: '5分鐘咳了10次左右'
},
fever: {
isShow: false,
detail: '5分鐘咳了10次左右'

},
runnyNose: {
isShow: false,
detail: '5分鐘咳了10次左右'

},
stuffyNose: {
isShow: true,
detail: '有點嗅覺失靈'

}
}
,
{
temperature: 36.5,
time: '09:11',
cough: {
isShow: true,
detail: '5分鐘咳了10次左右'
},
fever: {
isShow: false,
detail: '5分鐘咳了10次左右'

},
runnyNose: {
isShow: false,
detail: '5分鐘咳了10次左右'

},
stuffyNose: {
isShow: true,
detail: '有點嗅覺失靈'

}
}, {
temperature: 25.0,
time: '09:11'
}
]
}, {
date: "2020/03/30",
day: 3,
isShhow: true,
isSelect: false,
temperatureList: [
{
temperature: 36.5,
time: '09:11',
cough: {
isShow: true,
detail: '5分鐘咳了10次左右'
},
fever: {
isShow: false,
detail: '5分鐘咳了10次左右'

},
runnyNose: {
isShow: false,
detail: '5分鐘咳了10次左右'

},
stuffyNose: {
isShow: true,
detail: '有點嗅覺失靈'

}
}, {
temperature: 25.0,
time: '09:11',
cough: {
isShow: true,
detail: '5分鐘咳了10次左右'
},
fever: {
isShow: false,
detail: '5分鐘咳了10次左右'

},
runnyNose: {
isShow: false,
detail: '5分鐘咳了10次左右'

},
stuffyNose: {
isShow: true,
detail: '有點嗅覺失靈'

}
}
]
},
]
data = {
cough: {
isShow: true,
Expand Down
2 changes: 2 additions & 0 deletions src/app/daily/daily-detail/daily-detail.page.html
Expand Up @@ -31,6 +31,8 @@

</div>
<app-daily-detail-symptoms *ngIf="selectedSegment"></app-daily-detail-symptoms>


<app-daily-detail-photos *ngIf="!selectedSegment"></app-daily-detail-photos>
</ion-list>
</ion-card>
Expand Down