refactor profile creation

This commit is contained in:
Matias Alejo Garcia 2015-11-17 13:36:31 -03:00
commit 691139f2b1
7 changed files with 70 additions and 94 deletions

View file

@ -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