From d7a4f2ed7fec3640aea68c5280548470d6c53108 Mon Sep 17 00:00:00 2001 From: Emmanuel ROHEE Date: Tue, 19 Aug 2014 09:37:10 +0200 Subject: [PATCH] Fill user page with avatar, display name and matrix id --- webclient/app.css | 8 ++++++++ webclient/user/user-controller.js | 19 ++++++++++++++++--- webclient/user/user.html | 22 ++++++++++++++++++++-- 3 files changed, 44 insertions(+), 5 deletions(-) diff --git a/webclient/app.css b/webclient/app.css index 471c52ea7..e2b6538aa 100644 --- a/webclient/app.css +++ b/webclient/app.css @@ -259,6 +259,14 @@ h1 { max-height: 100%; } +/*** User profile page ***/ +#user-ids { + padding-left: 1em; +} + +#user-displayname { + font-size: 16pt; +} /******************************/ #header { diff --git a/webclient/user/user-controller.js b/webclient/user/user-controller.js index 4b7aa62d4..620230561 100644 --- a/webclient/user/user-controller.js +++ b/webclient/user/user-controller.js @@ -17,9 +17,22 @@ limitations under the License. 'use strict'; angular.module('UserController', ['matrixService']) -.controller('UserController', ['$scope', '$routeParams', - function($scope, $routeParams) { +.controller('UserController', ['$scope', '$routeParams', 'matrixService', + function($scope, $routeParams, matrixService) { $scope.user = { - id: $routeParams.user_matrix_id + id: $routeParams.user_matrix_id, + displayname: "", + avatar_url: undefined }; + + matrixService.getDisplayName($scope.user.id).then( + function(response) { + $scope.user.displayname = response.data.displayname; + } + ); + matrixService.getProfilePictureUrl($scope.user.id).then( + function(response) { + $scope.user.avatar_url = response.data.avatar_url; + } + ); }]); \ No newline at end of file diff --git a/webclient/user/user.html b/webclient/user/user.html index f548e05a7..47db09d1e 100644 --- a/webclient/user/user.html +++ b/webclient/user/user.html @@ -3,8 +3,26 @@
-
{{ user.id }}
- +
+
+ + + + + +
+
+ +
+
+
+
{{ user.displayname }}
+
{{ user.id }}
+
+
+
+
+ {{ feedback }}