-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7fcafa7
commit 5910e19
Showing
22 changed files
with
199 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
<app-section-header iconName="dashboard" sectionTitle="Dashboard"></app-section-header> | ||
<app-section-header | ||
iconName="dashboard" | ||
sectionTitle="Dashboard" | ||
></app-section-header> | ||
<div class="content-wrapper padded-content"> | ||
<h1>Nothing here yet!</h1> | ||
<h1>Nothing here yet!</h1> | ||
</div> |
45 changes: 30 additions & 15 deletions
45
src/app/pages/device-details/device-details.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,38 @@ | ||
<app-section-header iconName="sensors" [isExpanded]="true" class="device-details__header"> | ||
<div class="section basic-info"> | ||
<span class="device-name"> | ||
{{ device.displayName }} | ||
</span> | ||
<div class="device-entities"> | ||
{{ device.entities.length }} | ||
<span class="entities-text">ENTITIES</span> | ||
</div> | ||
</div> | ||
<div class="section spacer"></div> | ||
<div class="section details-info"> | ||
<app-value-row name="key" [value]="device.key" [nameWidth]=50></app-value-row> | ||
<app-value-row name="mac" [value]="device.macAddress" [nameWidth]=50></app-value-row> | ||
<app-section-header | ||
iconName="sensors" | ||
[isExpanded]="true" | ||
class="device-details__header" | ||
> | ||
<div class="section basic-info"> | ||
<span class="device-name"> | ||
{{ device.displayName }} | ||
</span> | ||
<div class="device-entities"> | ||
{{ device.entities.length }} | ||
<span class="entities-text">ENTITIES</span> | ||
</div> | ||
</div> | ||
<div class="section spacer"></div> | ||
<div class="section details-info"> | ||
<app-value-row | ||
name="key" | ||
[value]="device.key" | ||
[nameWidth]="50" | ||
></app-value-row> | ||
<app-value-row | ||
name="mac" | ||
[value]="device.macAddress" | ||
[nameWidth]="50" | ||
></app-value-row> | ||
</div> | ||
</app-section-header> | ||
|
||
<div class="device-details__entities content-wrapper padded-content"> | ||
<h1 class="entities-header">Entities:</h1> | ||
<div class="entities-list"> | ||
<app-entity-card *ngFor="let entity of device.entities" [entity]="entity"></app-entity-card> | ||
<app-entity-card | ||
*ngFor="let entity of device.entities" | ||
[entity]="entity" | ||
></app-entity-card> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
<app-section-header iconName="account_circle" sectionTitle="Profile"> | ||
<div class="user-profile"> | ||
<app-value-row [nameWidth]="75" name="nick" [value]="authService.userProfile.preferred_username"></app-value-row> | ||
<app-value-row [nameWidth]="75" name="email" [value]="authService.userProfile.email"></app-value-row> | ||
<app-value-row | ||
[nameWidth]="75" | ||
name="nick" | ||
[value]="authService.userProfile.preferred_username" | ||
></app-value-row> | ||
<app-value-row | ||
[nameWidth]="75" | ||
name="email" | ||
[value]="authService.userProfile.email" | ||
></app-value-row> | ||
</div> | ||
</app-section-header> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
.user-profile { | ||
margin-left: 8vw; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 5px; | ||
margin-left: 8vw; | ||
display: flex; | ||
flex-direction: column; | ||
gap: 5px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
<mat-card class="device-card" [routerLink]="device.id.toString()"> | ||
<mat-card-content class="device-card__content"> | ||
<app-device-icon class="device-card__icon" iconName="sensors" [size]=70></app-device-icon> | ||
<mat-card-title class="device-card__title">{{ device.displayName }}</mat-card-title> | ||
<mat-card-subtitle class="device-card__subtitle">entities: {{ device.entities.length }}</mat-card-subtitle> | ||
</mat-card-content> | ||
<mat-card-content class="device-card__content"> | ||
<app-device-icon | ||
class="device-card__icon" | ||
iconName="sensors" | ||
[size]="70" | ||
></app-device-icon> | ||
<mat-card-title class="device-card__title">{{ | ||
device.displayName | ||
}}</mat-card-title> | ||
<mat-card-subtitle class="device-card__subtitle" | ||
>entities: {{ device.entities.length }}</mat-card-subtitle | ||
> | ||
</mat-card-content> | ||
</mat-card> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
@import '~@angular/material/theming'; | ||
@import "~@angular/material/theming"; | ||
@import "~src/variables.scss"; | ||
@import "~src/mixins.scss"; | ||
|
||
.device-card { | ||
padding: 30px; | ||
padding: 30px; | ||
|
||
@include mat-card-hover; | ||
@include mat-card-hover; | ||
|
||
&__content { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
} | ||
&__content { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
} | ||
|
||
&__title { | ||
margin-top: 30px !important; | ||
} | ||
&__title { | ||
margin-top: 30px !important; | ||
} | ||
|
||
&__subtitle { | ||
color: darken($color: $thingoo-text, $amount: 30%); | ||
font-size: 13px; | ||
} | ||
&__subtitle { | ||
color: darken($color: $thingoo-text, $amount: 30%); | ||
font-size: 13px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
<div class="device-icon"> | ||
<div class="device-icon__container" [ngStyle]="{'height.px':[size], 'width.px':[size]}"> | ||
<span class="material-icons" [ngStyle]="{'fontSize.px':[size * 0.55]}"> | ||
{{ iconName }} | ||
</span> | ||
</div> | ||
<div | ||
class="device-icon__container" | ||
[ngStyle]="{ 'height.px': [size], 'width.px': [size] }" | ||
> | ||
<span class="material-icons" [ngStyle]="{ 'fontSize.px': [size * 0.55] }"> | ||
{{ iconName }} | ||
</span> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
.device-icon { | ||
&__container { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
&__container { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
|
||
border-radius: 50%; | ||
background-color: transparentize($color: white, $amount: 0.8) | ||
} | ||
border-radius: 50%; | ||
background-color: transparentize($color: white, $amount: 0.8); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
<mat-card class="entity-card"> | ||
<mat-card-content class="entity-card__content"> | ||
<app-device-icon class="entity-card__icon" iconName="keyboard_voice" [size]=70></app-device-icon> | ||
<mat-card-subtitle class="entity-card__name">{{ entity.displayName }}</mat-card-subtitle> | ||
<mat-card-title class="entity-card__value">24 dB</mat-card-title> | ||
<div class="entity-card__timestamp"> | ||
42 minutes ago | ||
</div> | ||
</mat-card-content> | ||
<mat-card-content class="entity-card__content"> | ||
<app-device-icon | ||
class="entity-card__icon" | ||
iconName="keyboard_voice" | ||
[size]="70" | ||
></app-device-icon> | ||
<mat-card-subtitle class="entity-card__name">{{ | ||
entity.displayName | ||
}}</mat-card-subtitle> | ||
<mat-card-title class="entity-card__value">24 dB</mat-card-title> | ||
<div class="entity-card__timestamp">42 minutes ago</div> | ||
</mat-card-content> | ||
</mat-card> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
@import '~@angular/material/theming'; | ||
@import "~@angular/material/theming"; | ||
@import "~src/variables.scss"; | ||
@import "~src/mixins.scss"; | ||
|
||
.entity-card { | ||
padding: 20px 35px; | ||
padding: 20px 35px; | ||
|
||
@include mat-card-hover; | ||
@include mat-card-hover; | ||
|
||
&__content { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
} | ||
&__content { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
} | ||
|
||
&__name { | ||
margin-top: 12px !important; | ||
margin-bottom: 30px; | ||
font-size: 16px; | ||
} | ||
&__name { | ||
margin-top: 12px !important; | ||
margin-bottom: 30px; | ||
font-size: 16px; | ||
} | ||
|
||
&__value { | ||
font-size: 24px; | ||
} | ||
&__value { | ||
font-size: 24px; | ||
} | ||
|
||
&__timestamp { | ||
color: darken($color: $thingoo-text, $amount: 30%); | ||
font-size: 13px; | ||
} | ||
&__timestamp { | ||
color: darken($color: $thingoo-text, $amount: 30%); | ||
font-size: 13px; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 9 additions & 8 deletions
17
src/app/shared/section-header/section-header.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
<div class="section-header" [class.expanded]="isExpanded"> | ||
<div class="section-header__content content-wrapper"> | ||
<app-device-icon [iconName]="iconName" [size]=80></app-device-icon> | ||
<div class="section-title" *ngIf="sectionTitle"> | ||
<div class="title-text">{{ sectionTitle }}</div> | ||
<div class="subtitle-text" *ngIf="sectionSubtitle">{{ sectionSubtitle }}</div> | ||
</div> | ||
<ng-content></ng-content> | ||
<div class="section-header__content content-wrapper"> | ||
<app-device-icon [iconName]="iconName" [size]="80"></app-device-icon> | ||
<div class="section-title" *ngIf="sectionTitle"> | ||
<div class="title-text">{{ sectionTitle }}</div> | ||
<div class="subtitle-text" *ngIf="sectionSubtitle"> | ||
{{ sectionSubtitle }} | ||
</div> | ||
</div> | ||
<ng-content></ng-content> | ||
</div> | ||
</div> | ||
|
Oops, something went wrong.