mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-04 10:04:50 -04:00
nasty big monolithic commit of a whole bunch of UI/UX improvements:
- add a simple CSS template across the app for navigation & cosmetics - split login into login & register, and totally reskin it - restructure room CSS to play nicely with it - implement basis 1:1 chat from user pages - disable autofocus on iOS to improve UX
This commit is contained in:
parent
b040bd6157
commit
1bc036a12d
15 changed files with 363 additions and 317 deletions
|
@ -25,14 +25,42 @@ angular.module('UserController', ['matrixService'])
|
|||
avatar_url: undefined
|
||||
};
|
||||
|
||||
$scope.user_id = matrixService.config().user_id;
|
||||
|
||||
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;
|
||||
}
|
||||
);
|
||||
|
||||
$scope.messageUser = function() {
|
||||
|
||||
// FIXME: create a new room every time, for now
|
||||
|
||||
matrixService.create(null, 'private').then(
|
||||
function(response) {
|
||||
// This room has been created. Refresh the rooms list
|
||||
var room_id = response.data.room_id;
|
||||
console.log("Created room with id: "+ room_id);
|
||||
|
||||
matrixService.invite(room_id, $scope.user.id).then(
|
||||
function() {
|
||||
$scope.feedback = "Invite sent successfully";
|
||||
$scope.$parent.goToPage("/room/" + room_id);
|
||||
},
|
||||
function(reason) {
|
||||
$scope.feedback = "Failure: " + JSON.stringify(reason);
|
||||
});
|
||||
},
|
||||
function(error) {
|
||||
$scope.feedback = "Failure: " + JSON.stringify(error.data);
|
||||
});
|
||||
};
|
||||
|
||||
}]);
|
Loading…
Add table
Add a link
Reference in a new issue