diff --git a/frontend/src/i18n.ts b/frontend/src/i18n.ts index 489ee9b4..d6a8210b 100644 --- a/frontend/src/i18n.ts +++ b/frontend/src/i18n.ts @@ -1434,7 +1434,8 @@ const messages = { currentPassword: 'Current Password', newPassword: 'New Password', confirmPassword: 'Confirm Password', - changePassword: 'Change Password' + changePassword: 'Change Password', + changePasswordContactAdmin: 'Please contact the administrator to change your password.' }, feedback: { title: 'Feedback', @@ -2907,7 +2908,8 @@ const messages = { currentPassword: '当前密码', newPassword: '新密码', confirmPassword: '确认密码', - changePassword: '修改密码' + changePassword: '修改密码', + changePasswordContactAdmin: '请联系管理员修改' }, feedback: { title: '意见反馈', @@ -4239,7 +4241,8 @@ const messages = { currentPassword: '當前密碼', newPassword: '新密碼', confirmPassword: '確認密碼', - changePassword: '修改密碼' + changePassword: '修改密碼', + changePasswordContactAdmin: '請聯繫管理員修改' }, feedback: { title: '意見反饋', @@ -5488,7 +5491,8 @@ const messages = { currentPassword: 'รหัสผ่านปัจจุบัน', newPassword: 'รหัสผ่านใหม่', confirmPassword: 'ยืนยันรหัสผ่าน', - changePassword: 'เปลี่ยนรหัสผ่าน' + changePassword: 'เปลี่ยนรหัสผ่าน', + changePasswordContactAdmin: 'กรุณาติดต่อผู้ดูแลระบบเพื่อเปลี่ยนรหัสผ่าน' }, feedback: { title: 'ข้อเสนอแนะ', diff --git a/frontend/src/views/WorkspaceView.vue b/frontend/src/views/WorkspaceView.vue index 7a160b40..9b6a4e11 100644 --- a/frontend/src/views/WorkspaceView.vue +++ b/frontend/src/views/WorkspaceView.vue @@ -746,6 +746,16 @@ const isProfileLoading = ref(false); const isProfileSaving = ref(false); const isProfileEditing = ref(false); const showPasswordModal = ref(false); +// TODO(casdoor): set true when Casdoor change-password is ready +const CHANGE_PASSWORD_ENABLED = false; + +const handleChangePasswordClick = () => { + if (!CHANGE_PASSWORD_ENABLED) { + msg.warning(t('profile.changePasswordContactAdmin')); + return; + } + showPasswordModal.value = true; +}; const profileUser = ref({ id: 0, username: '', @@ -1446,11 +1456,12 @@ onBeforeUnmount(() => { - +
-
+