mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-10 15:15:34 +00:00
More comprehensive changes, UI tweaking
This commit is contained in:
@@ -1,29 +1,32 @@
|
||||
angular.module('app')
|
||||
.controller('ErrorController', ['$rootScope','$scope','$stateParams', '$location', function ($rootScope, $scope, $p, $location) {
|
||||
.controller('ErrorController', ['$window','$rootScope','$scope','$stateParams', '$location', function ($window, $rootScope, $scope, $p, $location) {
|
||||
$rootScope.title = 'Error';
|
||||
$scope.path = $location.path();
|
||||
$scope.type = $p.type || 'unknown';
|
||||
$scope.browser = $window.navigator.appVersion;
|
||||
|
||||
switch ($scope.type) {
|
||||
case 404:
|
||||
$scope.msgPre = 'Page';
|
||||
$scope.msgHighlight = $scope.path;
|
||||
$scope.msgPost = 'Not Found';
|
||||
$scope.image = 'deep-space';
|
||||
$rootScope.bodyClass = 'deep-space';
|
||||
break;
|
||||
case 'no-ship':
|
||||
$scope.msgPre = 'Ship';
|
||||
$scope.msgHighlight = $p.message;
|
||||
$scope.msgPost = 'does not exist';
|
||||
$scope.image = 'thargoid';
|
||||
$rootScope.bodyClass = 'docking-bay';
|
||||
break;
|
||||
case 'build-fail':
|
||||
$scope.msgPre = 'Build Failure!';
|
||||
$scope.image = 'ship-explode';
|
||||
$rootScope.bodyClass = 'docking-bay';
|
||||
break;
|
||||
default:
|
||||
$scope.msgPre = "Uh, this is bad..";
|
||||
$scope.image = 'thargoid';
|
||||
$rootScope.bodyClass = null;
|
||||
}
|
||||
|
||||
}]);
|
||||
Reference in New Issue
Block a user