Hide register social auth buttons (#357)
This commit is contained in:
parent
5dda2e3358
commit
b6324a20ae
@ -25,6 +25,7 @@ export default function RegisterContent() {
|
||||
const githubAuthUrl = process.env.NEXT_PUBLIC_GITHUB_AUTH_URL || '/api/auth/github'
|
||||
const wechatAuthUrl = process.env.NEXT_PUBLIC_WECHAT_AUTH_URL || '/api/auth/wechat'
|
||||
const registerUrl = process.env.NEXT_PUBLIC_REGISTER_URL || '/api/auth/register'
|
||||
const isSocialAuthVisible = false
|
||||
|
||||
const normalize = useCallback(
|
||||
(value: string) =>
|
||||
@ -299,27 +300,31 @@ export default function RegisterContent() {
|
||||
</button>
|
||||
</form>
|
||||
<div className="space-y-4">
|
||||
<div className="flex items-center gap-4 text-xs uppercase tracking-[0.2em] text-gray-400">
|
||||
<span className="h-px flex-1 bg-gray-200" aria-hidden />
|
||||
{t.social.title}
|
||||
<span className="h-px flex-1 bg-gray-200" aria-hidden />
|
||||
</div>
|
||||
<div className="grid gap-3 sm:grid-cols-2">
|
||||
<a
|
||||
href={githubAuthUrl}
|
||||
className="flex w-full items-center justify-center gap-3 rounded-xl border border-gray-200 px-4 py-2.5 text-sm font-medium text-gray-800 transition hover:border-gray-300 hover:bg-gray-50"
|
||||
>
|
||||
<Github className="h-5 w-5" aria-hidden />
|
||||
{t.social.github}
|
||||
</a>
|
||||
<a
|
||||
href={wechatAuthUrl}
|
||||
className="flex w-full items-center justify-center gap-3 rounded-xl border border-gray-200 px-4 py-2.5 text-sm font-medium text-gray-800 transition hover:border-gray-300 hover:bg-gray-50"
|
||||
>
|
||||
<WeChatIcon className="h-5 w-5" aria-hidden />
|
||||
{t.social.wechat}
|
||||
</a>
|
||||
</div>
|
||||
{isSocialAuthVisible && (
|
||||
<>
|
||||
<div className="flex items-center gap-4 text-xs uppercase tracking-[0.2em] text-gray-400">
|
||||
<span className="h-px flex-1 bg-gray-200" aria-hidden />
|
||||
{t.social.title}
|
||||
<span className="h-px flex-1 bg-gray-200" aria-hidden />
|
||||
</div>
|
||||
<div className="grid gap-3 sm:grid-cols-2">
|
||||
<a
|
||||
href={githubAuthUrl}
|
||||
className="flex w-full items-center justify-center gap-3 rounded-xl border border-gray-200 px-4 py-2.5 text-sm font-medium text-gray-800 transition hover:border-gray-300 hover:bg-gray-50"
|
||||
>
|
||||
<Github className="h-5 w-5" aria-hidden />
|
||||
{t.social.github}
|
||||
</a>
|
||||
<a
|
||||
href={wechatAuthUrl}
|
||||
className="flex w-full items-center justify-center gap-3 rounded-xl border border-gray-200 px-4 py-2.5 text-sm font-medium text-gray-800 transition hover:border-gray-300 hover:bg-gray-50"
|
||||
>
|
||||
<WeChatIcon className="h-5 w-5" aria-hidden />
|
||||
{t.social.wechat}
|
||||
</a>
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
<p className="text-sm text-gray-600">
|
||||
{t.loginPrompt.text}{' '}
|
||||
<Link href="/login" className="font-semibold text-purple-600 hover:text-purple-500">
|
||||
|
||||
@ -387,7 +387,7 @@ export const translations: Record<'en' | 'zh', Translation> = {
|
||||
register: {
|
||||
badge: 'Create account',
|
||||
title: 'Join CloudNative Suite',
|
||||
subtitle: 'Secure, unified workspace for your cloud native journey.',
|
||||
subtitle: 'Embrace open source solutions and build a unified cloud native workspace.',
|
||||
highlights: [
|
||||
{
|
||||
title: 'Unified identity',
|
||||
@ -402,7 +402,7 @@ export const translations: Record<'en' | 'zh', Translation> = {
|
||||
description: 'Granular audit logs and notifications keep your team aligned.',
|
||||
},
|
||||
],
|
||||
bottomNote: 'No credit card required. Premium capabilities are available with a 14-day trial.',
|
||||
bottomNote: 'Select only the capabilities you need—pay as you go.',
|
||||
uuidNote:
|
||||
'Every account receives a globally unique UUID. After registration, sign in to the user center to view and copy it for future integrations.',
|
||||
form: {
|
||||
@ -642,7 +642,7 @@ export const translations: Record<'en' | 'zh', Translation> = {
|
||||
register: {
|
||||
badge: '立即注册',
|
||||
title: '加入 CloudNative Suite',
|
||||
subtitle: '打造安全统一的云原生工作空间。',
|
||||
subtitle: '拥抱开源与解决方案,打造统一的云原生工作空间。',
|
||||
highlights: [
|
||||
{
|
||||
title: '统一身份',
|
||||
@ -657,7 +657,7 @@ export const translations: Record<'en' | 'zh', Translation> = {
|
||||
description: '精细化审计日志与通知,帮助团队保持同步。',
|
||||
},
|
||||
],
|
||||
bottomNote: '无需信用卡,免费体验版可试用高级功能 14 天。',
|
||||
bottomNote: '注册用户按需选择需要的功能,Pay AS GO。',
|
||||
uuidNote: '注册完成后,系统会为你分配一个全局唯一的 UUID,可在用户中心查看并复制,用于后续服务对接。',
|
||||
form: {
|
||||
title: '创建账号',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user