Use /home everywhere

paul/schema_breaking_changes
Emmanuel ROHEE 2014-08-22 18:08:03 +02:00
parent 4c7df52360
commit de0706493a
6 changed files with 12 additions and 12 deletions

View File

@ -19,7 +19,7 @@ var matrixWebClient = angular.module('matrixWebClient', [
'MatrixWebClientController',
'LoginController',
'RoomController',
'RoomsController',
'HomeController',
'SettingsController',
'UserController',
'matrixService',
@ -45,9 +45,9 @@ matrixWebClient.config(['$routeProvider', '$provide', '$httpProvider',
templateUrl: 'room/room.html',
controller: 'RoomController'
}).
when('/rooms', {
templateUrl: 'rooms/rooms.html',
controller: 'RoomsController'
when('/home', {
templateUrl: 'home/home.html',
controller: 'HomeController'
}).
when('/settings', {
templateUrl: 'settings/settings.html',
@ -58,7 +58,7 @@ matrixWebClient.config(['$routeProvider', '$provide', '$httpProvider',
controller: 'UserController'
}).
otherwise({
redirectTo: '/rooms'
redirectTo: '/home'
});
$provide.factory('AccessTokenInterceptor', ['$q', '$rootScope',

View File

@ -16,8 +16,8 @@ limitations under the License.
'use strict';
angular.module('RoomsController', ['matrixService', 'mFileInput', 'mFileUpload', 'eventHandlerService'])
.controller('RoomsController', ['$scope', '$location', 'matrixService', 'mFileUpload', 'eventHandlerService', 'eventStreamService',
angular.module('HomeController', ['matrixService', 'mFileInput', 'mFileUpload', 'eventHandlerService'])
.controller('HomeController', ['$scope', '$location', 'matrixService', 'mFileUpload', 'eventHandlerService', 'eventStreamService',
function($scope, $location, matrixService, mFileUpload, eventHandlerService, eventStreamService) {
$scope.config = matrixService.config();

View File

@ -1,4 +1,4 @@
<div ng-controller="RoomsController" class="rooms">
<div ng-controller="HomeController">
<div id="page">
<div id="wrapper">

View File

@ -15,10 +15,10 @@
<script src="app-controller.js"></script>
<script src="app-directive.js"></script>
<script src="app-filter.js"></script>
<script src="home/home-controller.js"></script>
<script src="login/login-controller.js"></script>
<script src="room/room-controller.js"></script>
<script src="room/room-directive.js"></script>
<script src="rooms/rooms-controller.js"></script>
<script src="settings/settings-controller.js"></script>
<script src="user/user-controller.js"></script>
<script src="components/matrix/matrix-service.js"></script>

View File

@ -53,7 +53,7 @@ angular.module('LoginController', ['matrixService'])
matrixService.saveConfig();
eventStreamService.resume();
// Go to the user's rooms list page
$location.url("rooms");
$location.url("home");
},
function(error) {
if (error.data) {
@ -84,7 +84,7 @@ angular.module('LoginController', ['matrixService'])
});
matrixService.saveConfig();
eventStreamService.resume();
$location.url("rooms");
$location.url("home");
}
else {
$scope.feedback = "Failed to login: " + JSON.stringify(response.data);

View File

@ -364,7 +364,7 @@ angular.module('RoomController', ['ngSanitize', 'mUtilities'])
matrixService.leave($scope.room_id).then(
function(response) {
console.log("Left room ");
$location.url("rooms");
$location.url("home");
},
function(error) {
$scope.feedback = "Failed to leave room: " + error.data.error;