Skip to content

Commit c36399e

Browse files
committed
Corrected link of 'home'-item in navbar
1 parent 60541e1 commit c36399e

File tree

8 files changed

+34
-21
lines changed

8 files changed

+34
-21
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
4949

5050
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
5151

52-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
52+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

package-lock.json

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"core-js": "^2.5.4",
2828
"hammerjs": "^2.0.8",
2929
"json-server": "^0.14.0",
30+
"ngx-spinner": "^6.1.2",
3031
"rxjs": "^6.0.0",
3132
"rxjs-compat": "^6.2.2",
3233
"zone.js": "^0.8.26"

src/app/core/core.module.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ import { environment } from '@env/environment';
55
import { AuthGuard } from './guards/auth.guard';
66
import { NoAuthGuard } from './guards/no-auth.guard';
77

8+
import { NgxSpinnerModule } from 'ngx-spinner';
9+
810
import { TokenInterceptor } from './interceptors/token.interceptor';
911

1012
import { throwIfAlreadyLoaded } from './guards/module-import.guard';
1113

1214
@NgModule({
1315
imports: [
14-
HttpClientModule
16+
HttpClientModule,
17+
NgxSpinnerModule
1518
],
1619
providers: [
1720
AuthGuard,

src/app/modules/auth/pages/login/login.component.html

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,22 @@
44
</div>
55

66
<form (ngSubmit)="login()" [formGroup]="loginForm">
7-
<div class="form-group">
8-
<label class="d-block">
9-
<input type="text" class="form-control" [placeholder]="'Username'" formControlName="username">
10-
<app-control-messages [control]="f['username']"></app-control-messages>
11-
</label>
12-
<label class="d-block">
13-
<input type="password" class="form-control" [placeholder]="'Password'" formControlName="password">
14-
<app-control-messages [control]="f['password']"></app-control-messages>
15-
</label>
167
<div class="form-group">
17-
<button type="submit" class="btn btn-primary btn-block btn-raised" type="submit">
18-
<span [hidden]="isLoading">Submit</span>
19-
<span [hidden]="!isLoading"><i class="fas fa-asterisk fa-2x fa-spin"></i></span>
20-
</button>
21-
<button type="button" class="btn btn-secondary btn-block btn-raised">Cancel</button>
8+
<label class="d-block">
9+
<input type="text" class="form-control" [placeholder]="'Username'" formControlName="username">
10+
<app-control-messages [control]="f['username']"></app-control-messages>
11+
</label>
12+
<label class="d-block">
13+
<input type="password" class="form-control" [placeholder]="'Password'" formControlName="password">
14+
<app-control-messages [control]="f['password']"></app-control-messages>
15+
</label>
16+
<div class="form-group">
17+
<button type="submit" class="btn btn-primary btn-block btn-raised" type="submit">
18+
<span [hidden]="isLoading">Submit</span>
19+
<span [hidden]="!isLoading"><i class="fas fa-asterisk fa-2x fa-spin"></i></span>
20+
</button>
21+
<button type="button" class="btn btn-secondary btn-block btn-raised">Cancel</button>
22+
</div>
23+
<a [routerLink]="['/auth/register']">Don't have an account? Sign up here!</a>
2224
</div>
23-
24-
<a [routerLink]="['/auth/register']">Don't have an account? Sign up here!</a>
25-
</div>
2625
</form>

src/app/modules/auth/pages/login/login.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ export class LoginComponent implements OnInit {
3939
.pipe(
4040
delay(5000),
4141
tap(user => this.router.navigate(['/dashboard/home'])),
42-
finalize(() => this.isLoading = false)
42+
finalize(() => {
43+
this.isLoading = false;
44+
})
4345
).subscribe();
4446
}
4547

src/app/shared/layout/nav/nav.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export class NavComponent implements OnInit {
1111
version = environment.version;
1212

1313
navItems = [
14-
{ link: '/home', title: 'Home' },
14+
{ link: '/dashboard/home', title: 'Home' },
1515
{ link: '/about', title: 'About' },
1616
{ link: '/contact', title: 'Contact' }
1717
];

src/assets/images/bg-screenshot.PNG

205 KB
Loading

0 commit comments

Comments
 (0)