mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-20 03:54:09 -04:00
Fill user page with avatar, display name and matrix id
This commit is contained in:
parent
38f5c1c378
commit
d7a4f2ed7f
3 changed files with 44 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
);
|
||||
}]);
|
Loading…
Add table
Add a link
Reference in a new issue