Skip to content

Commit 6f6530b

Browse files
author
Carlos Cañizares Estévez
committed
SPA: Login Logout (Identity Component)
1 parent e84b6db commit 6f6530b

13 files changed

Lines changed: 154 additions & 18 deletions

File tree

src/Web/WebMVC/wwwroot/css/site.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,6 @@ form .col-md-4 {
757757
background-color: #FFFFFF;
758758
min-width: 160px;
759759
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
760-
/*left: 100px;*/
761760
right: 0px;
762761
}
763762

1.02 KB
Loading
429 Bytes
Loading
221 Bytes
Loading
Lines changed: 54 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,56 @@
1-
$primary-colour: #00A69C;
2-
$primary-accent: #83D01B;
1+
// Colors
2+
$color-brand: #00A69C;
3+
$color-brand-dark: darken($color-brand, 10%);
4+
$color-brand-darker: darken($color-brand, 20%);
5+
$color-brand-bright: lighten($color-brand, 10%);
6+
$color-brand-brighter: lighten($color-brand, 20%);
37

4-
$white-colour: #FFFFFF;
5-
$grey-colour: #E2E2E2;
6-
$text-colour: #757575;
8+
$color-secondary: #83D01B;
9+
$color-secondary-dark: darken($color-secondary, 10%);
10+
$color-secondary-darker: darken($color-secondary, 20%);
11+
$color-secondary-bright: lighten($color-secondary, 10%);
12+
$color-secondary-brighter: lighten($color-secondary, 20%);
713

8-
$grey-box-shadow: 10px 10px 20px #F2F2F2;
9-
$grey-box-border: 1px solid #DDDDDD;
14+
$color-background-dark: #333333;
15+
$color-background-darker: #000000;
16+
$color-background-bright: #EEEEEE;
17+
$color-background-brighter: #FFFFFF;
18+
19+
$color-foreground-dark: #333333;
20+
$color-foreground-darker: #000000;
21+
$color-foreground-bright: #EEEEEE;
22+
$color-foreground-brighter: #FFFFFF;
23+
24+
// Animations
25+
$animation-speed-default: .35s;
26+
$animation-speed-slow: .5s;
27+
$animation-speed-fast: .15s;
28+
29+
// Fonts
30+
$font-weight-light: 200;
31+
$font-weight-semilight: 300;
32+
$font-weight-normal: 400;
33+
$font-weight-semibold: 600;
34+
$font-weight-bold: 700;
35+
36+
$font-size-xs: .5rem; // 8px
37+
$font-size-s: .85rem; // 13.6px
38+
$font-size-m: 1rem; // 16px
39+
$font-size-l: 1.25rem; // 20px
40+
$font-size-xl: 1.5rem; // 24px
41+
42+
// Medias
43+
$media-screen-xxs: 360px;
44+
$media-screen-xs: 640px;
45+
$media-screen-s: 768px;
46+
$media-screen-m: 1024px;
47+
$media-screen-l: 1280px;
48+
$media-screen-xl: 1440px;
49+
$media-screen-xxl: 1680px;
50+
$media-screen-xxxl: 1920px;
51+
52+
// Margins
53+
$margin-center: 10vw;
54+
55+
$medias: xxs, xs, s, m, l, xl, xxl, xxxl;
56+
$mediavalues: $media-screen-xxs, $media-screen-xs, $media-screen-s, $media-screen-m, $media-screen-l, $media-screen-xl, $media-screen-xxl, $media-screen-xxxl;

src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/app.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</div>
1010
<div class="col-sm-2">
1111
<esh-basket-status *ngIf="Authenticated"></esh-basket-status>
12-
<esh-identity *ngIf="!Authenticated"></esh-identity>
12+
<esh-identity></esh-identity>
1313
</div>
1414
</div>
1515
</div>

src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/basket/basket-status/basket-status.component.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@import '../../_variables.scss';
22

33
.esh-basketstatus {
4+
float:right;
45

56
&-image {
67
height: 36px;
@@ -20,5 +21,6 @@
2021
font-size: 12px;
2122
cursor: pointer;
2223
top: 0;
24+
padding-left: 3px;
2325
}
2426
}

src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/basket/basket-status/basket-status.component.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Component, OnInit } from '@angular/core';
2-
3-
import { Subscription } from 'rxjs/Subscription';
2+
import { Subscription } from 'rxjs/Subscription';
43

54
import { BasketService } from '../basket.service';
65
import { BasketWrapperService } from '../../shared/services/basket.wrapper.service';
@@ -19,18 +18,12 @@ export class BasketStatusComponent implements OnInit {
1918
ngOnInit() {
2019
this.subscription = this.basketEvents.addItemToBasket$.subscribe(
2120
item => {
22-
console.log('element received in basket');
23-
console.log(item);
2421
this.service.setBasket(item).subscribe(res => {
25-
console.log(res);
2622
this.service.getBasket().subscribe(basket => {
2723
this.badge = basket.items.length;
28-
console.log('response from basket api');
29-
console.log(basket.items.length);
3024
});
3125
});
3226
});
3327
}
34-
3528
}
3629

src/Web/WebSPA/eShopOnContainers.WebSPA/Client/modules/basket/basket.component.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
&-total-value {
5252
font-size: 20px;
5353
color: #00a69c;
54+
width: 90px;
5455
}
5556

5657
&-total-label {
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
11
<button *ngIf="!authenticated" (click)="login()">Login</button>
2-
<div *ngIf="authenticated">userName: {{userName}}</div>
2+
<div *ngIf="authenticated" class="identity-user">
3+
<div><span>{{userName}}</span></div><div style="float: right;top: 0;right: -15px;position: absolute;"><img src="../../../../images/arrow-down.png" class="identity-downArrow"></div>
4+
<div class="identity-userDropdown">
5+
<a href="http://www.google.es">MY ORDERS<img src="../../../../images/my_orders.png" class="myorders-icon"></a>
6+
<div (click)="logoutClicked($event)">LOG OUT<img src="../../../../images/logout.png" class="logout-icon"></div>
7+
</div>
8+
</div>

0 commit comments

Comments
 (0)