-
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.
Merge pull request #86 from ThingooKNI/ui-refactor
Refactor existing UI elements and update styling
- Loading branch information
Showing
31 changed files
with
415 additions
and
226 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
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,4 @@ | ||
<div class="mat-app-background"> | ||
<app-header></app-header> | ||
<div class="wrapper content-wrapper"> | ||
<router-outlet></router-outlet> | ||
</div> | ||
<router-outlet></router-outlet> | ||
</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
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 +1,7 @@ | ||
<p>dashboard works!</p> | ||
<app-section-header | ||
iconName="dashboard" | ||
sectionTitle="Dashboard" | ||
></app-section-header> | ||
<div class="content-wrapper padded-content"> | ||
<h1>Nothing here yet!</h1> | ||
</div> |
79 changes: 36 additions & 43 deletions
79
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,45 +1,38 @@ | ||
<div class="device-details-page-wrapper"> | ||
<mat-card class="device-details__section"> | ||
<div class="device-basic-info"> | ||
<div class="device-basic-info__first"> | ||
<div class="icon__wrapper"> | ||
<div class="icon"></div> | ||
</div> | ||
<div class="text__wrapper header-flex-column"> | ||
<h2>{{ device.displayName }}</h2> | ||
<p> | ||
{{ device.entities.length }} | ||
<span class="gray-color">ENTITIES</span> | ||
</p> | ||
</div> | ||
</div> | ||
<div class="device-basic-info__second header-flex-column"> | ||
<div> | ||
<span class="gray-color">KEY</span> | ||
{{ device.key }} | ||
</div> | ||
|
||
<div> | ||
<span class="gray-color">MAC</span> | ||
{{ device.macAddress }} | ||
</div> | ||
</div> | ||
</div> | ||
</mat-card> | ||
<mat-card class="device-entities device-details__section"> | ||
<h1 class="entities-title">Entities:</h1> | ||
<div class="entity-list"> | ||
<mat-card | ||
class="entity-item mat-elevation-z2" | ||
*ngFor="let entity of device.entities" | ||
> | ||
<div class="icon"></div> | ||
<h4> | ||
{{ entity.displayName }} | ||
</h4> | ||
<h3>92 dB</h3> | ||
<h5>13 minutes ago</h5> | ||
</mat-card> | ||
<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> | ||
</mat-card> | ||
</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> | ||
</div> | ||
</div> |
130 changes: 41 additions & 89 deletions
130
src/app/pages/device-details/device-details.component.scss
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,100 +1,52 @@ | ||
.device-details-page-wrapper { | ||
width: 100vw; | ||
max-width: 1000px; | ||
|
||
mat-card.device-details__section { | ||
padding: calc(16px + 1.5vw) calc(16px + 1.5vw); | ||
} | ||
} | ||
|
||
.entity-list { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
justify-content: flex-start; | ||
flex-wrap: wrap; | ||
gap: 20px; | ||
} | ||
|
||
.gray-color { | ||
color: lightgray; | ||
} | ||
|
||
.device-entities { | ||
margin-top: 12px; | ||
} | ||
|
||
.device-basic-info { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
flex-wrap: wrap; | ||
|
||
.header-flex-column { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
} | ||
|
||
p { | ||
margin: 0px; | ||
} | ||
|
||
&__first { | ||
display: grid; | ||
grid-template-columns: 65px calc(100% - 65px); | ||
margin-right: 4vw; | ||
|
||
.text__wrapper { | ||
margin-left: 5px; | ||
@import "~src/variables.scss"; | ||
|
||
.device-details { | ||
&__header { | ||
.section { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
gap: 10px; | ||
} | ||
|
||
h2 { | ||
margin-bottom: 0px; | ||
font-size: 28px; | ||
.basic-info { | ||
.device-name { | ||
font-size: 26px; | ||
font-weight: 300; | ||
} | ||
|
||
.device-entities { | ||
font-size: 18px; | ||
font-weight: 500; | ||
color: darken($color: $thingoo-text, $amount: 20%); | ||
|
||
.entities-text { | ||
margin-left: 3px; | ||
color: darken($color: $thingoo-text, $amount: 40%); | ||
} | ||
} | ||
} | ||
} | ||
|
||
&__second { | ||
span { | ||
font-size: 18px; | ||
font-weight: 500; | ||
width: 45px; | ||
display: inline-block; | ||
.spacer { | ||
width: 6vw; | ||
} | ||
p { | ||
font-size: 18px; | ||
|
||
.details-info { | ||
gap: 8px; | ||
} | ||
} | ||
} | ||
|
||
.entity-item { | ||
display: flex; | ||
justify-content: center; | ||
flex-direction: column; | ||
align-items: center; | ||
width: 120px; | ||
|
||
&::before { | ||
content: " "; | ||
background-color: rgba($color: #fff, $alpha: 0.07); | ||
position: absolute; | ||
width: 100%; | ||
height: 100%; | ||
border-radius: 4px; | ||
} | ||
&__entities { | ||
.entities-header { | ||
color: darken($color: $thingoo-text, $amount: 10%); | ||
font-weight: 400; | ||
margin-bottom: $section-padding; | ||
} | ||
|
||
h4 { | ||
margin: 8px 0; | ||
} | ||
h3 { | ||
margin-bottom: 8px; | ||
.entities-list { | ||
display: flex; | ||
flex-wrap: wrap; | ||
gap: $elements-grid-gap; | ||
} | ||
} | ||
} | ||
|
||
.icon { | ||
width: 60px; | ||
height: 60px; | ||
border-radius: 50%; | ||
background-color: lightgray; | ||
} |
9 changes: 0 additions & 9 deletions
9
src/app/pages/device-list/device-card/device-card.component.html
This file was deleted.
Oops, something went wrong.
44 changes: 0 additions & 44 deletions
44
src/app/pages/device-list/device-card/device-card.component.scss
This file was deleted.
Oops, something went wrong.
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,18 +1,15 @@ | ||
@import "~src/variables.scss"; | ||
|
||
.device-list { | ||
&-page-wrapper { | ||
width: 100vw; | ||
max-width: 1000px; | ||
&__content { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
flex-wrap: wrap; | ||
gap: $elements-grid-gap; | ||
} | ||
|
||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
justify-content: flex-start; | ||
flex-wrap: wrap; | ||
width: 100%; | ||
gap: 20px; | ||
} | ||
|
||
.no-devices { | ||
text-align: center; | ||
&__text { | ||
color: darken($color: $thingoo-text, $amount: 10%); | ||
} | ||
} |
Oops, something went wrong.