Commit bdbea3cdec08c33d2b61d5fc048b870dd3452e70
1 parent
e1903c92
Exists in
master
and in
26 other branches
Fixed user since html in login block
Showing
3 changed files
with
8 additions
and
2 deletions
Show diff stats
src/app/layout/blocks/login-block/login-block.component.ts
@@ -41,6 +41,7 @@ export class LoginBlockComponent { | @@ -41,6 +41,7 @@ export class LoginBlockComponent { | ||
41 | 41 | ||
42 | this.$scope.$on(AUTH_EVENTS.loginSuccess, () => { | 42 | this.$scope.$on(AUTH_EVENTS.loginSuccess, () => { |
43 | this.currentUser = this.session.currentUser(); | 43 | this.currentUser = this.session.currentUser(); |
44 | + console.debug("User: ", this.currentUser); | ||
44 | }); | 45 | }); |
45 | 46 | ||
46 | this.$scope.$on(AUTH_EVENTS.logoutSuccess, () => { | 47 | this.$scope.$on(AUTH_EVENTS.logoutSuccess, () => { |
1 |
|
src/app/layout/blocks/login-block/login-block.html
1 | <div class="logged-user-info" ng-show="ctrl.currentUser"> | 1 | <div class="logged-user-info" ng-show="ctrl.currentUser"> |
2 | <h4>Logged in as {{ctrl.currentUser.person.identifier}}</h4> | 2 | <h4>Logged in as {{ctrl.currentUser.person.identifier}}</h4> |
3 | <ul> | 3 | <ul> |
4 | - <li>User since {{ctrl.currentUser.created_at.month}}/{{ctrl.currentUser.created_at.year}}</li> | 4 | + <li>User since |
1 |
|
||
5 | + <span class="time"> | ||
6 | + <span am-time-ago="ctrl.currentUser.person.created_at | dateFormat"></span> | ||
7 | + </span> | ||
8 | + </li> | ||
5 | <li><a ui-sref="main.profile.info({profile: ctrl.currentUser.person.identifier})">Profile Homepage</a></li> | 9 | <li><a ui-sref="main.profile.info({profile: ctrl.currentUser.person.identifier})">Profile Homepage</a></li> |
6 | </ul> | 10 | </ul> |
7 | <div class="user-actions"> | 11 | <div class="user-actions"> |
src/lib/ng-noosfero-api/interfaces/person.ts
@@ -6,6 +6,7 @@ namespace noosfero { | @@ -6,6 +6,7 @@ namespace noosfero { | ||
6 | * A representation of a Person in Noosfero. | 6 | * A representation of a Person in Noosfero. |
7 | */ | 7 | */ |
8 | export interface Person extends Profile { | 8 | export interface Person extends Profile { |
9 | - | 9 | + created_at: string; |
1 |
|
||
10 | + identifier: string; | ||
10 | } | 11 | } |
11 | } | 12 | } |
12 | \ No newline at end of file | 13 | \ No newline at end of file |