mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-23 17:17:46 +01:00
Fixed handle other errors while signning in.
This commit is contained in:
parent
098f1905bf
commit
3d0bf35ef1
@ -69,9 +69,11 @@
|
|||||||
|
|
||||||
function signedInFailed(data, status) {
|
function signedInFailed(data, status) {
|
||||||
vm.signInTIP = false;
|
vm.signInTIP = false;
|
||||||
|
vm.hasError = true;
|
||||||
if(status === 401) {
|
if(status === 401) {
|
||||||
vm.hasError = true;
|
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
@ -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',
|
||||||
|
@ -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': '开发人员',
|
||||||
|
Loading…
Reference in New Issue
Block a user