diff --git a/src/component/LoginPage/googleLogin.vue b/src/component/LoginPage/googleLogin.vue
index 09843dc2..d44a14a6 100644
--- a/src/component/LoginPage/googleLogin.vue
+++ b/src/component/LoginPage/googleLogin.vue
@@ -6,7 +6,7 @@

-
{{ $props.text }}
+
{{ displayText }}
@@ -21,7 +21,7 @@
props: {
text: {
type: String,
- default: 'Sign in with Google'
+ default: ''
}
},
setup(props, { emit }) {
@@ -108,6 +108,9 @@
const toGmailLogin = ()=>{
message.info(t('account.canNotUtilize'))
}
+ const displayText = computed(() => {
+ return props.text || t('Login.LoginWithGoogle')
+ })
onBeforeUnmount(()=>{
var existingScript = document.querySelector(`script[src="${data.scriptSrc}"]`);
if(existingScript){
@@ -120,6 +123,7 @@
})
return {
toGmailLogin,
+ displayText,
}
},
})
diff --git a/src/component/LoginPage/weiXinLogin.vue b/src/component/LoginPage/weiXinLogin.vue
index 915b22b9..f4d72bf8 100644
--- a/src/component/LoginPage/weiXinLogin.vue
+++ b/src/component/LoginPage/weiXinLogin.vue
@@ -2,7 +2,7 @@

-
{{ $props.text }}
+
{{ displayText }}
@@ -18,6 +18,7 @@ import {
toRefs,
} from "vue";
import weiXinModel from "./weiXinModel.vue";
+import { useI18n } from 'vue-i18n'
export default defineComponent({
name: "login",
components: {
@@ -26,20 +27,25 @@ export default defineComponent({
props: {
text: {
type: String,
- default: "Sign in with Wechat",
+ default: ''
},
},
- setup() {
+ setup(props) {
let weiXinDom = reactive({
weiXinModel: null,
});
+ const { t } = useI18n()
const openWeiXinModel = () => {
weiXinDom.weiXinModel.init();
};
+ const displayText = computed(() => {
+ return props.text || t('Login.LoginWithWechat')
+ })
onMounted(() => {});
return {
...toRefs(weiXinDom),
openWeiXinModel,
+ displayText,
};
},
});
diff --git a/src/lang/cn.ts b/src/lang/cn.ts
index ef6ba7be..30c4ea3a 100644
--- a/src/lang/cn.ts
+++ b/src/lang/cn.ts
@@ -1543,11 +1543,13 @@ export default {
LoginMethod: '使用以下方式登录:',
Individual: '个人账号',
Academic: '学术账号',
- LogoOnToAiDA: '登录到AiDA 3.1',
+ LogonToAiDA: '登录到AiDA 3.1',
Infomation: '请填写以下信息',
Device: '请使用iPad或电脑登录',
AgreePolicies: '请勾选条款、隐私政策和费用',
- PasswordConditions: '您必须满足所有密码条件才能注册'
+ PasswordConditions: '您必须满足所有密码条件才能注册',
+ LoginWithGoogle: '使用谷歌账号登录',
+ LoginWithWechat: '使用微信登录',
},
LoginPersonal: {
Email: '邮箱',
diff --git a/src/lang/en.ts b/src/lang/en.ts
index ad54edf4..d9c065c3 100644
--- a/src/lang/en.ts
+++ b/src/lang/en.ts
@@ -1591,7 +1591,9 @@ export default {
Infomation: 'Please fill your information below',
Device: 'If you need to design, please log in using an iPad or computer.',
AgreePolicies: 'Please agree to all terms, privacy policy, and fees.',
- PasswordConditions: 'You must satisfy ALL password conditions to register.'
+ PasswordConditions: 'You must satisfy ALL password conditions to register.',
+ LoginWithGoogle: 'Sign in with Google',
+ LoginWithWechat: 'Sign in with Wechat',
},
LoginPersonal: {
Email: 'Email',
diff --git a/src/views/HomeMain.vue b/src/views/HomeMain.vue
index 444ff49b..7957a3a9 100644
--- a/src/views/HomeMain.vue
+++ b/src/views/HomeMain.vue
@@ -432,6 +432,7 @@
ref="home"
@setNewProject="() => (leftShow = true)"
@setTask="setTask"
+ :key="userDetail.language"
>