mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 02:32:18 +00:00
[API Node] Conditional signup render (#3653)
Co-authored-by: github-actions <github-actions@github.com> Co-authored-by: Chenlei Hu <hcl@comfy.org>
This commit is contained in:
@@ -19,7 +19,12 @@
|
|||||||
|
|
||||||
<!-- Form -->
|
<!-- Form -->
|
||||||
<SignInForm v-if="isSignIn" @submit="signInWithEmail" />
|
<SignInForm v-if="isSignIn" @submit="signInWithEmail" />
|
||||||
<SignUpForm v-else @submit="signUpWithEmail" />
|
<template v-else>
|
||||||
|
<Message v-if="userIsInChina" severity="warn" class="mb-4">
|
||||||
|
{{ t('auth.signup.regionRestrictionChina') }}
|
||||||
|
</Message>
|
||||||
|
<SignUpForm v-else @submit="signUpWithEmail" />
|
||||||
|
</template>
|
||||||
|
|
||||||
<!-- Divider -->
|
<!-- Divider -->
|
||||||
<Divider align="center" layout="horizontal" class="my-8">
|
<Divider align="center" layout="horizontal" class="my-8">
|
||||||
@@ -84,11 +89,13 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import Button from 'primevue/button'
|
import Button from 'primevue/button'
|
||||||
import Divider from 'primevue/divider'
|
import Divider from 'primevue/divider'
|
||||||
import { ref } from 'vue'
|
import Message from 'primevue/message'
|
||||||
|
import { onMounted, ref } from 'vue'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
|
|
||||||
import { SignInData, SignUpData } from '@/schemas/signInSchema'
|
import { SignInData, SignUpData } from '@/schemas/signInSchema'
|
||||||
import { useFirebaseAuthService } from '@/services/firebaseAuthService'
|
import { useFirebaseAuthService } from '@/services/firebaseAuthService'
|
||||||
|
import { isInChina } from '@/utils/networkUtil'
|
||||||
|
|
||||||
import SignInForm from './signin/SignInForm.vue'
|
import SignInForm from './signin/SignInForm.vue'
|
||||||
import SignUpForm from './signin/SignUpForm.vue'
|
import SignUpForm from './signin/SignUpForm.vue'
|
||||||
@@ -127,4 +134,9 @@ const signUpWithEmail = async (values: SignUpData) => {
|
|||||||
onSuccess()
|
onSuccess()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const userIsInChina = ref(false)
|
||||||
|
onMounted(async () => {
|
||||||
|
userIsInChina.value = await isInChina()
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1125,7 +1125,8 @@
|
|||||||
"signUpButton": "Sign up",
|
"signUpButton": "Sign up",
|
||||||
"signIn": "Sign in",
|
"signIn": "Sign in",
|
||||||
"signUpWithGoogle": "Sign up with Google",
|
"signUpWithGoogle": "Sign up with Google",
|
||||||
"signUpWithGithub": "Sign up with Github"
|
"signUpWithGithub": "Sign up with Github",
|
||||||
|
"regionRestrictionChina": "In accordance with local regulatory requirements, our services are currently unavailable to users located in mainland China."
|
||||||
},
|
},
|
||||||
"signOut": {
|
"signOut": {
|
||||||
"signOut": "Log Out",
|
"signOut": "Log Out",
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
"emailPlaceholder": "Ingresa tu correo electrónico",
|
"emailPlaceholder": "Ingresa tu correo electrónico",
|
||||||
"passwordLabel": "Contraseña",
|
"passwordLabel": "Contraseña",
|
||||||
"passwordPlaceholder": "Ingresa una nueva contraseña",
|
"passwordPlaceholder": "Ingresa una nueva contraseña",
|
||||||
|
"regionRestrictionChina": "De acuerdo con los requisitos regulatorios locales, nuestros servicios no están disponibles actualmente para usuarios ubicados en China continental.",
|
||||||
"signIn": "Iniciar sesión",
|
"signIn": "Iniciar sesión",
|
||||||
"signUpButton": "Registrarse",
|
"signUpButton": "Registrarse",
|
||||||
"signUpWithGithub": "Registrarse con Github",
|
"signUpWithGithub": "Registrarse con Github",
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
"emailPlaceholder": "Entrez votre email",
|
"emailPlaceholder": "Entrez votre email",
|
||||||
"passwordLabel": "Mot de passe",
|
"passwordLabel": "Mot de passe",
|
||||||
"passwordPlaceholder": "Entrez un nouveau mot de passe",
|
"passwordPlaceholder": "Entrez un nouveau mot de passe",
|
||||||
|
"regionRestrictionChina": "Conformément aux exigences réglementaires locales, nos services ne sont actuellement pas disponibles pour les utilisateurs situés en Chine continentale.",
|
||||||
"signIn": "Se connecter",
|
"signIn": "Se connecter",
|
||||||
"signUpButton": "S'inscrire",
|
"signUpButton": "S'inscrire",
|
||||||
"signUpWithGithub": "S'inscrire avec Github",
|
"signUpWithGithub": "S'inscrire avec Github",
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
"emailPlaceholder": "メールアドレスを入力してください",
|
"emailPlaceholder": "メールアドレスを入力してください",
|
||||||
"passwordLabel": "パスワード",
|
"passwordLabel": "パスワード",
|
||||||
"passwordPlaceholder": "新しいパスワードを入力してください",
|
"passwordPlaceholder": "新しいパスワードを入力してください",
|
||||||
|
"regionRestrictionChina": "現地の規制要件に従い、当社のサービスは現在中国本土のユーザーにはご利用いただけません。",
|
||||||
"signIn": "サインイン",
|
"signIn": "サインイン",
|
||||||
"signUpButton": "サインアップ",
|
"signUpButton": "サインアップ",
|
||||||
"signUpWithGithub": "Githubでサインアップ",
|
"signUpWithGithub": "Githubでサインアップ",
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
"emailPlaceholder": "이메일을 입력하세요",
|
"emailPlaceholder": "이메일을 입력하세요",
|
||||||
"passwordLabel": "비밀번호",
|
"passwordLabel": "비밀번호",
|
||||||
"passwordPlaceholder": "새 비밀번호를 입력하세요",
|
"passwordPlaceholder": "새 비밀번호를 입력하세요",
|
||||||
|
"regionRestrictionChina": "현지 규제 요건에 따라, 본 서비스는 현재 중국 본토에 위치한 사용자에게 제공되지 않습니다.",
|
||||||
"signIn": "로그인",
|
"signIn": "로그인",
|
||||||
"signUpButton": "가입하기",
|
"signUpButton": "가입하기",
|
||||||
"signUpWithGithub": "Github로 가입하기",
|
"signUpWithGithub": "Github로 가입하기",
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
"emailPlaceholder": "Введите вашу электронную почту",
|
"emailPlaceholder": "Введите вашу электронную почту",
|
||||||
"passwordLabel": "Пароль",
|
"passwordLabel": "Пароль",
|
||||||
"passwordPlaceholder": "Введите новый пароль",
|
"passwordPlaceholder": "Введите новый пароль",
|
||||||
|
"regionRestrictionChina": "В соответствии с местными нормативными требованиями наши услуги в настоящее время недоступны для пользователей, находящихся в материковом Китае.",
|
||||||
"signIn": "Войти",
|
"signIn": "Войти",
|
||||||
"signUpButton": "Зарегистрироваться",
|
"signUpButton": "Зарегистрироваться",
|
||||||
"signUpWithGithub": "Зарегистрироваться через Github",
|
"signUpWithGithub": "Зарегистрироваться через Github",
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
"emailPlaceholder": "输入您的电子邮件",
|
"emailPlaceholder": "输入您的电子邮件",
|
||||||
"passwordLabel": "密码",
|
"passwordLabel": "密码",
|
||||||
"passwordPlaceholder": "输入新密码",
|
"passwordPlaceholder": "输入新密码",
|
||||||
|
"regionRestrictionChina": "根据当地法规要求,我们目前无法为中国大陆地区的用户提供服务。",
|
||||||
"signIn": "登录",
|
"signIn": "登录",
|
||||||
"signUpButton": "注册",
|
"signUpButton": "注册",
|
||||||
"signUpWithGithub": "使用Github注册",
|
"signUpWithGithub": "使用Github注册",
|
||||||
|
|||||||
Reference in New Issue
Block a user