Skip to content

Commit 03fc163

Browse files
author
Allan Asp Christensen
authored
Merge pull request #18 from OS2iot/feature/styling-device-profile
Feature/styling device profile
2 parents b5d1a02 + 569e34d commit 03fc163

File tree

37 files changed

+478
-650
lines changed

37 files changed

+478
-650
lines changed

angular.json

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@
2828
"src/assets"
2929
],
3030
"styles": [
31-
"src/styles.scss"
31+
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
32+
"src/styles.scss",
33+
"src/assets/scss/setup/_material-theme.scss"
3234
],
3335
"scripts": [
3436
"node_modules/popper.js/dist/umd/popper.min.js",
@@ -37,12 +39,10 @@
3739
},
3840
"configurations": {
3941
"production": {
40-
"fileReplacements": [
41-
{
42-
"replace": "src/environments/environment.ts",
43-
"with": "src/environments/environment.prod.ts"
44-
}
45-
],
42+
"fileReplacements": [{
43+
"replace": "src/environments/environment.ts",
44+
"with": "src/environments/environment.prod.ts"
45+
}],
4646
"optimization": true,
4747
"outputHashing": "all",
4848
"sourceMap": false,
@@ -51,8 +51,7 @@
5151
"extractLicenses": true,
5252
"vendorChunk": false,
5353
"buildOptimizer": true,
54-
"budgets": [
55-
{
54+
"budgets": [{
5655
"type": "initial",
5756
"maximumWarning": "2mb",
5857
"maximumError": "5mb"
@@ -132,4 +131,4 @@
132131
"cli": {
133132
"analytics": "5e34252a-5088-421b-bb34-6ef89cd9f167"
134133
}
135-
}
134+
}

src/app/admin/organisation/organisation-edit/organisation-edit.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
</div>
1616

1717
<div class="form-group mt-5">
18-
<button (click)="routeBack()" class="btn btn-light"
18+
<button (click)="routeBack()" class="btn btn-secondary"
1919
type="button">{{ 'ORGANISATION.FORM.CANCEL' | translate}}</button>
20-
<button class="btn btn-dark ml-2" type="submit">{{ 'ORGANISATION.FORM.SAVE' | translate}}</button>
20+
<button class="btn btn-primary ml-2" type="submit">{{ 'ORGANISATION.FORM.SAVE' | translate}}</button>
2121
</div>
2222
</form>

src/app/admin/permission/permission-edit/permission-edit.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</div>
4141
</div>
4242
<!-- <div class="form-group mt-3 col-12">
43-
<mat-form-field>
43+
<mat-form-field appearance="outline">
4444
<mat-label class="form-label" for="name">{{'PERMISSION.EDIT.USERS' | translate}}</mat-label>
4545
<mat-select id="userIds" name="userIds" class="custom-select" multiple [(ngModel)]="permission.userIds"
4646
[placeholder]="'PERMISSION.EDIT.USERS-PLACEHOLDER' | translate" multiple>
@@ -83,7 +83,7 @@
8383
<!-- TODO: Select application -->
8484

8585
<div class="form-group mt-5">
86-
<button (click)="routeBack()" class="btn btn-light" type="button">{{ 'GEN.CANCEL' | translate}}</button>
87-
<button class="btn btn-dark ml-2" type="submit">{{ 'PERMISSION.SAVE' | translate}}</button>
86+
<button (click)="routeBack()" class="btn btn-secondary" type="button">{{ 'GEN.CANCEL' | translate}}</button>
87+
<button class="btn btn-primary ml-2" type="submit">{{ 'PERMISSION.SAVE' | translate}}</button>
8888
</div>
8989
</form>

src/app/admin/users/user-edit/user-edit.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
</div>
4747
<div class="form-group mt-5 clearfix">
4848
<div class="col-12 d-flex justify-content-end">
49-
<button (click)="routeBack()" class="btn btn-light" type="button">{{ 'GEN.CANCEL' | translate}}</button>
49+
<button (click)="routeBack()" class="btn btn-secondary" type="button">{{ 'GEN.CANCEL' | translate}}</button>
5050
<button class="btn btn-primary ml-2" type="submit">{{ 'USERS.FORM.SAVE' | translate}}</button>
5151
</div>
5252
</div>

src/app/app-routing.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { NgModule } from '@angular/core';
22
import { Routes, RouterModule, PreloadAllModules } from '@angular/router';
3-
import { MineLoraGatewaysComponent } from './views/administration-gateway/mine-lora-gateways/mine-lora-gateways.component';
3+
import { MineLoraGatewaysComponent } from './views/administration-gateway/lora-gateways/lora-gateways.component';
44
import { ListLoraGatewayComponent } from './views/administration-gateway/list-lora-gateway/list-lora-gateway.component';
55
import { EditGatewayComponent } from './views/administration-gateway/edit-gateway/edit-gateway.component';
66
import { GatewayComponent } from './views/administration-gateway/gateway/gateway.component';
@@ -14,7 +14,7 @@ const routes: Routes = [
1414
{ path: 'dashboard', component: DashboardComponent },
1515
{ path: 'my-applications', loadChildren: () => import('./my-applications/my-applications.module').then(m => m.MyApplicationsModule) },
1616
{
17-
path: 'mine-lora-gateways', component: MineLoraGatewaysComponent,
17+
path: 'lora-gateways', component: MineLoraGatewaysComponent,
1818
children: [
1919
{ path: '', component: ListLoraGatewayComponent },
2020
{ path: 'edit-gateway/:id', component: EditGatewayComponent },

src/app/auth/auth.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
<div *ngIf="isLoading">
1111
<app-loading-spinner></app-loading-spinner>
1212
</div>
13-
<form class="p-5 jumbotron" style="" #authForm="ngForm" (ngSubmit)="onSubmit(authForm)" *ngIf="!isLoading">
14-
<div class="form-group col-6">
13+
<form class="p-5 jumbotron" #authForm="ngForm" (ngSubmit)="onSubmit(authForm)" *ngIf="!isLoading">
14+
<div class="form-group col-8">
1515
<label for="email">{{'AUTH.EMAIL' | translate}}</label>
1616
<input type="username" id="username" class="form-control" ngModel name="username" required email
1717
[ngClass]="{'is-invalid' : formFailedSubmit && errorFields.includes('username'), 'is-valid' : formFailedSubmit && !errorFields.includes('username')}">
1818
</div>
19-
<div class="form-group col-6">
19+
<div class="form-group col-8">
2020
<label for="password">{{'AUTH.PASSWORD' | translate}}</label>
2121
<input type="password" id="password" class="form-control" ngModel name="password" required minlength="6"
2222
[ngClass]="{'is-invalid' : formFailedSubmit && errorFields.includes('password'), 'is-valid' : formFailedSubmit && !errorFields.includes('password')}">

src/app/navbar/navbar.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@
3737
<li class="nav-item py-2">
3838
<a routerLink="/my-applications" routerLinkActive="active" class="nav-link pl-5 position-relative rounded"
3939
id="myApplications">
40-
{{ 'NAV.MY-APPLICATIONS' | translate }}
40+
{{ 'NAV.APPLICATIONS' | translate }}
4141
</a>
4242
</li>
4343
<li class="nav-item py-2">
44-
<a routerLink="/mine-lora-gateways" routerLinkActive="active"
45-
class="nav-link pl-5 position-relative rounded" id="myLoraGateway">
46-
{{ 'NAV.MY-LORA-GATEWAYS' | translate }}
44+
<a routerLink="/lora-gateways" routerLinkActive="active" class="nav-link pl-5 position-relative rounded"
45+
id="myLoraGateway">
46+
{{ 'NAV.LORA-GATEWAYS' | translate }}
4747
</a>
4848
</li>
4949
<li class="nav-item py-2">
Lines changed: 27 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,35 @@
11
<app-form-header [backButton]="backButton" [title]="title"></app-form-header>
22
<form (ngSubmit)="onSubmit()" class="os2-form p-3 mt-4">
3-
<div *ngIf="errorMessages" class="error-messages p-3">
4-
<ul class="mb-0">
5-
<li *ngFor="let error of errorMessages">
6-
{{error}}
7-
</li>
8-
</ul>
9-
</div>
3+
<div *ngIf="errorMessages" class="error-messages p-3">
4+
<ul class="mb-0">
5+
<li *ngFor="let error of errorMessages">
6+
{{error}}
7+
</li>
8+
</ul>
9+
</div>
1010

11-
<div class="row mb-5">
12-
<div class="form-group mt-3 col-12">
13-
<label class="form-label" for="name">{{'QUESTION.GIVE-PAYLOADDECODER-NAME' | translate}}</label>*
14-
<input type="text"
15-
class="form-control"
16-
id="name"
17-
name="name"
18-
[placeholder]="'QUESTION.GIVE-PAYLOADDECODER-NAME-PLACEHOLDER' | translate"
19-
maxlength="50"
20-
required
21-
[(ngModel)]="payloadDecoder.name"
22-
[ngClass]="{'is-invalid' : formFailedSubmit && errorFields.includes('name'), 'is-valid' : formFailedSubmit && !errorFields.includes('name')}">
23-
</div>
11+
<div class="row mb-5">
12+
<div class="form-group mt-3 col-12">
13+
<label class="form-label" for="name">{{'QUESTION.GIVE-PAYLOADDECODER-NAME' | translate}}</label>*
14+
<input type="text" class="form-control" id="name" name="name"
15+
[placeholder]="'QUESTION.GIVE-PAYLOADDECODER-NAME-PLACEHOLDER' | translate" maxlength="50" required
16+
[(ngModel)]="payloadDecoder.name"
17+
[ngClass]="{'is-invalid' : formFailedSubmit && errorFields.includes('name'), 'is-valid' : formFailedSubmit && !errorFields.includes('name')}">
2418
</div>
19+
</div>
2520

26-
<div class="row mb-5">
27-
<div class="form-group mt-3 col-12">
28-
<label class="form-label" for="decodingFunction">{{'QUESTION.GIVE-PAYLOADDECODER-DECODINGFUNCTION' | translate}}</label>*
29-
<textarea
30-
id="decodingFunction"
31-
name="decodingFunction"
32-
[rows]="20"
33-
class="form-control"
34-
[(ngModel)]="payloadDecoder.decodingFunction"
35-
[ngClass]="{'is-invalid' : formFailedSubmit && errorFields.includes('decodingFunction'), 'is-valid' : formFailedSubmit && !errorFields.includes('decodingFunction')}"></textarea>
36-
</div>
21+
<div class="row mb-5">
22+
<div class="form-group mt-3 col-12">
23+
<label class="form-label"
24+
for="decodingFunction">{{'QUESTION.GIVE-PAYLOADDECODER-DECODINGFUNCTION' | translate}}</label>*
25+
<textarea id="decodingFunction" name="decodingFunction" [rows]="20" class="form-control"
26+
[(ngModel)]="payloadDecoder.decodingFunction"
27+
[ngClass]="{'is-invalid' : formFailedSubmit && errorFields.includes('decodingFunction'), 'is-valid' : formFailedSubmit && !errorFields.includes('decodingFunction')}"></textarea>
3728
</div>
29+
</div>
3830

39-
<div class="form-group mt-5">
40-
<button (click)="routeBack()" class="btn btn-light" type="button">{{ 'GEN.CANCEL' | translate}}</button>
41-
<button class="btn btn-dark ml-2" type="submit">{{ 'PAYLOAD-DECODER.SAVE' | translate}}</button>
42-
</div>
31+
<div class="form-group mt-5">
32+
<button (click)="routeBack()" class="btn btn-secondary" type="button">{{ 'GEN.CANCEL' | translate}}</button>
33+
<button class="btn btn-primary ml-2" type="submit">{{ 'PAYLOAD-DECODER.SAVE' | translate}}</button>
34+
</div>
4335
</form>

0 commit comments

Comments
 (0)