aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/menu
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-12-04 10:34:40 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-12-04 10:34:40 +0100
commit2295ce6c4e7ba805cc100ff961527bebc2cd89e5 (patch)
treefce0a24074ac119aad730ef5c73c680500ff9578 /client/src/app/menu
parent202f6b6c9dcc9b0aec4b0c1b15e455c22a7952a7 (diff)
downloadPeerTube-2295ce6c4e7ba805cc100ff961527bebc2cd89e5.tar.gz
PeerTube-2295ce6c4e7ba805cc100ff961527bebc2cd89e5.tar.zst
PeerTube-2295ce6c4e7ba805cc100ff961527bebc2cd89e5.zip
Add account avatar
Diffstat (limited to 'client/src/app/menu')
-rw-r--r--client/src/app/menu/menu.component.html2
-rw-r--r--client/src/app/menu/menu.component.scss8
-rw-r--r--client/src/app/menu/menu.component.ts4
3 files changed, 13 insertions, 1 deletions
diff --git a/client/src/app/menu/menu.component.html b/client/src/app/menu/menu.component.html
index 0ed8ec518..7a80fa4de 100644
--- a/client/src/app/menu/menu.component.html
+++ b/client/src/app/menu/menu.component.html
@@ -1,5 +1,7 @@
1<menu> 1<menu>
2 <div *ngIf="isLoggedIn" class="logged-in-block"> 2 <div *ngIf="isLoggedIn" class="logged-in-block">
3 <img [src]="getUserAvatarPath()" alt="Avatar" />
4
3 <div class="logged-in-info"> 5 <div class="logged-in-info">
4 <a routerLink="/account/settings" class="logged-in-username">{{ user.username }}</a> 6 <a routerLink="/account/settings" class="logged-in-username">{{ user.username }}</a>
5 <div class="logged-in-email">{{ user.email }}</div> 7 <div class="logged-in-email">{{ user.email }}</div>
diff --git a/client/src/app/menu/menu.component.scss b/client/src/app/menu/menu.component.scss
index 9d67ca66c..5d6fd61c6 100644
--- a/client/src/app/menu/menu.component.scss
+++ b/client/src/app/menu/menu.component.scss
@@ -21,9 +21,15 @@ menu {
21 justify-content: center; 21 justify-content: center;
22 margin-bottom: 35px; 22 margin-bottom: 35px;
23 23
24 img {
25 margin-left: 20px;
26 margin-right: 10px;
27
28 @include avatar(34px);
29 }
30
24 .logged-in-info { 31 .logged-in-info {
25 flex-grow: 1; 32 flex-grow: 1;
26 margin-left: 40px;
27 33
28 .logged-in-username { 34 .logged-in-username {
29 font-size: 16px; 35 font-size: 16px;
diff --git a/client/src/app/menu/menu.component.ts b/client/src/app/menu/menu.component.ts
index 4c35bb3a5..8b8b714a8 100644
--- a/client/src/app/menu/menu.component.ts
+++ b/client/src/app/menu/menu.component.ts
@@ -51,6 +51,10 @@ export class MenuComponent implements OnInit {
51 ) 51 )
52 } 52 }
53 53
54 getUserAvatarPath () {
55 return this.user.getAvatarPath()
56 }
57
54 isRegistrationAllowed () { 58 isRegistrationAllowed () {
55 return this.serverService.getConfig().signup.allowed 59 return this.serverService.getConfig().signup.allowed
56 } 60 }