diff --git a/artifacts/sandbox-ai/src/App.tsx b/artifacts/sandbox-ai/src/App.tsx index a75ffb9..a68e114 100644 --- a/artifacts/sandbox-ai/src/App.tsx +++ b/artifacts/sandbox-ai/src/App.tsx @@ -277,7 +277,9 @@ function PublicOnlyRouter() { - + + + @@ -287,10 +289,10 @@ function PublicOnlyRouter() { - + - + diff --git a/artifacts/sandbox-ai/src/pages/auth-portal.tsx b/artifacts/sandbox-ai/src/pages/auth-portal.tsx index 29f3f09..edba467 100644 --- a/artifacts/sandbox-ai/src/pages/auth-portal.tsx +++ b/artifacts/sandbox-ai/src/pages/auth-portal.tsx @@ -1,16 +1,26 @@ import { Link } from "wouter"; +import { isAuthEnabled } from "@/config/auth-mode"; export default function AuthPortal() { + const signInHref = isAuthEnabled ? "/sign-in" : "/health-config"; + const signUpHref = isAuthEnabled ? "/sign-up" : "/health-config"; + return (

Đăng nhập / Đăng ký

- Quy trình OAuth (Google/GitHub) được xử lý qua Clerk. Bấm nút bên dưới để vào trang xác thực chính thức. + {isAuthEnabled + ? "Quy trình OAuth (Google/GitHub) được xử lý qua Clerk. Bấm nút bên dưới để vào trang xác thực chính thức." + : "Auth đang chạy ở chế độ public nên đăng nhập/đăng ký tạm thời không khả dụng. Mở Health Config để xem biến môi trường cần thiết."}

- Tiếp tục với Google / GitHub - Tạo tài khoản mới + + {isAuthEnabled ? "Tiếp tục với Google / GitHub" : "Mở Health Config"} + + + {isAuthEnabled ? "Tạo tài khoản mới" : "Xem cấu hình auth"} +
diff --git a/artifacts/sandbox-ai/src/pages/termux-lab.tsx b/artifacts/sandbox-ai/src/pages/termux-lab.tsx index 425287e..54d1c37 100644 --- a/artifacts/sandbox-ai/src/pages/termux-lab.tsx +++ b/artifacts/sandbox-ai/src/pages/termux-lab.tsx @@ -10,7 +10,7 @@ export default function TermuxLab() { {logs.map((l, i) =>
{l}
)}
- setCmd(e.target.value)} className="flex-1 bg-white/10 text-white px-3 py-2 rounded" /> + setCmd(e.target.value)} className="flex-1 bg-white/10 text-white px-3 py-2 rounded" />