refactor profile creation
This commit is contained in:
parent
1e418ef060
commit
691139f2b1
7 changed files with 70 additions and 94 deletions
|
|
@ -75,17 +75,6 @@ angular
|
|||
// link: http://stackoverflow.com/questions/15606751/angular-changes-urls-to-unsafe-in-extension-page?lq=1
|
||||
$compileProvider.imgSrcSanitizationWhitelist(/^\s*((https?|ftp|file|blob|chrome-extension):|data:image\/)/);
|
||||
|
||||
$stateProvider
|
||||
.state('splash', {
|
||||
url: '/splash',
|
||||
needProfile: false,
|
||||
views: {
|
||||
'main': {
|
||||
templateUrl: 'views/splash.html',
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$stateProvider
|
||||
.state('translators', {
|
||||
url: '/translators',
|
||||
|
|
@ -521,9 +510,6 @@ angular
|
|||
if (err) {
|
||||
if (err.message && err.message.match('NOPROFILE')) {
|
||||
$log.debug('No profile... redirecting');
|
||||
$state.transitionTo('splash');
|
||||
} else if (err.message && err.message.match('NONAGREEDDISCLAIMER')) {
|
||||
$log.debug('Display disclaimer... redirecting');
|
||||
$state.transitionTo('disclaimer');
|
||||
} else {
|
||||
throw new Error(err); // TODO
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue