mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-10 15:15:34 +00:00
Improved error handling and error page
This commit is contained in:
@@ -7,26 +7,27 @@ angular.module('app')
|
||||
|
||||
switch ($scope.type) {
|
||||
case 404:
|
||||
$rootScope.bodyClass = 'deep-space';
|
||||
$scope.msgPre = 'Page';
|
||||
$scope.msgHighlight = $scope.path;
|
||||
$scope.msgPost = 'Not Found';
|
||||
$rootScope.bodyClass = 'deep-space';
|
||||
break;
|
||||
case 'no-ship':
|
||||
$rootScope.bodyClass = 'docking-bay';
|
||||
$scope.msgPre = 'Ship';
|
||||
$scope.msgHighlight = $p.message;
|
||||
$scope.msgPost = 'does not exist';
|
||||
$rootScope.bodyClass = 'docking-bay';
|
||||
break;
|
||||
case 'build-fail':
|
||||
$rootScope.bodyClass = 'ship-explode'; // TODO: create background imag for this
|
||||
$scope.msgPre = 'Build Failure!';
|
||||
$scope.image = 'ship-explode';
|
||||
$rootScope.bodyClass = 'docking-bay';
|
||||
$scope.details = $p.details;
|
||||
break;
|
||||
default:
|
||||
$rootScope.bodyClass = 'thargoid'; // TODO: create background imag for this
|
||||
$scope.msgPre = "Uh, this is bad..";
|
||||
$scope.image = 'thargoid';
|
||||
$rootScope.bodyClass = null;
|
||||
$scope.errorMessage = $p.message;
|
||||
$scope.details = $p.details;
|
||||
}
|
||||
|
||||
}]);
|
||||
@@ -1,4 +1,4 @@
|
||||
angular.module('app').controller('ShipyardController', ['$rootScope', function ($rootScope) {
|
||||
$rootScope.title = 'Coriolis - Shipyard';
|
||||
$rootScope.title = 'Coriolis';
|
||||
$rootScope.bodyClass = 'docking-bay';
|
||||
}]);
|
||||
Reference in New Issue
Block a user