More comprehensive changes, UI tweaking

This commit is contained in:
Colin McLeod
2015-05-03 13:23:30 -07:00
parent 71405e6cb7
commit 022836bde1
29 changed files with 339 additions and 374 deletions

View File

@@ -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;
}
}]);