Fixed handle other errors while signning in.

This commit is contained in:
kunw 2016-11-25 17:47:32 +08:00
parent 098f1905bf
commit 3d0bf35ef1
3 changed files with 5 additions and 1 deletions

View File

@ -69,9 +69,11 @@
function signedInFailed(data, status) { function signedInFailed(data, status) {
vm.signInTIP = false; vm.signInTIP = false;
if(status === 401) {
vm.hasError = true; vm.hasError = true;
if(status === 401) {
vm.errorMessage = 'username_or_password_is_incorrect'; vm.errorMessage = 'username_or_password_is_incorrect';
}else {
vm.errorMessage = 'failed_to_sign_in';
} }
console.log('Failed to sign in:' + data + ', status:' + status); console.log('Failed to sign in:' + data + ', status:' + status);
} }

View File

@ -269,6 +269,7 @@ var locale_messages = {
'failed_to_update_destination': 'Failed to update destination.', 'failed_to_update_destination': 'Failed to update destination.',
'failed_to_toggle_publicity_insuffient_permissions': 'Failed to toggle project publicity, insuffient permissions.', 'failed_to_toggle_publicity_insuffient_permissions': 'Failed to toggle project publicity, insuffient permissions.',
'failed_to_toggle_publicity': 'Failed to toggle project publicity.', 'failed_to_toggle_publicity': 'Failed to toggle project publicity.',
'failed_to_sign_in': 'Failed to sign in.',
'project_does_not_exist': 'Project does not exist.', 'project_does_not_exist': 'Project does not exist.',
'project_admin': 'Project Admin', 'project_admin': 'Project Admin',
'developer': 'Developer', 'developer': 'Developer',

View File

@ -269,6 +269,7 @@ var locale_messages = {
'failed_to_update_destination': '修改目标失败。', 'failed_to_update_destination': '修改目标失败。',
'failed_to_toggle_publicity_insuffient_permissions': '切换项目公开性失败,权限不足。', 'failed_to_toggle_publicity_insuffient_permissions': '切换项目公开性失败,权限不足。',
'failed_to_toggle_publicity': '切换项目公开性失败。', 'failed_to_toggle_publicity': '切换项目公开性失败。',
'failed_to_sign_in': '登录失败。',
'project_does_not_exist': '项目不存在。', 'project_does_not_exist': '项目不存在。',
'project_admin': '项目管理员', 'project_admin': '项目管理员',
'developer': '开发人员', 'developer': '开发人员',