From c74b204d8941ad48df819b6778b46c19d9c01cdc Mon Sep 17 00:00:00 2001 From: Tony Giorgio Date: Mon, 27 Jan 2025 16:05:25 -0600 Subject: [PATCH 1/6] Remove invite code on signup --- .../src/routes/auth.$provider.callback.tsx | 6 +- frontend/src/routes/signup.tsx | 103 ++---------------- 2 files changed, 10 insertions(+), 99 deletions(-) diff --git a/frontend/src/routes/auth.$provider.callback.tsx b/frontend/src/routes/auth.$provider.callback.tsx index 432bdfb2..65c8e68c 100644 --- a/frontend/src/routes/auth.$provider.callback.tsx +++ b/frontend/src/routes/auth.$provider.callback.tsx @@ -40,18 +40,16 @@ function OAuthCallback() { const urlParams = new URLSearchParams(window.location.search); const code = urlParams.get("code"); const state = urlParams.get("state"); - const inviteCode = window.localStorage.getItem(`${provider}_invite_code`) || ""; if (code && state) { try { if (provider === "github") { - await handleGitHubCallback(code, state, inviteCode); + await handleGitHubCallback(code, state, ""); } else if (provider === "google") { - await handleGoogleCallback(code, state, inviteCode); + await handleGoogleCallback(code, state, ""); } else { throw new Error("Unsupported provider"); } - window.localStorage.removeItem(`${provider}_invite_code`); // Clean up // If successful, redirect to home page after a short delay setTimeout(() => navigate({ to: "/" }), 2000); } catch (error) { diff --git a/frontend/src/routes/signup.tsx b/frontend/src/routes/signup.tsx index bbaf1b49..9a639b6d 100644 --- a/frontend/src/routes/signup.tsx +++ b/frontend/src/routes/signup.tsx @@ -44,10 +44,9 @@ function SignupPage() { const formData = new FormData(e.currentTarget); const email = formData.get("email") as string; const password = formData.get("password") as string; - const inviteCode = formData.get("inviteCode") as string; try { - await os.signUp(email, password, inviteCode, "ANON"); + await os.signUp(email, password, "", "ANON"); setTimeout(() => { navigate({ to: next || "/" }); window.scrollTo(0, 0); @@ -66,41 +65,21 @@ function SignupPage() { const handleGitHubSignup = async () => { try { - const inviteCode = (document.getElementById("inviteCode") as HTMLInputElement)?.value; - if (!inviteCode) { - setError("Invite code is required"); - return; - } - const { auth_url } = await os.initiateGitHubAuth(inviteCode); - window.localStorage.setItem("github_invite_code", inviteCode); + const { auth_url } = await os.initiateGitHubAuth(""); window.location.href = auth_url; } catch (error) { console.error("Failed to initiate GitHub signup:", error); - if (error instanceof Error && error.message.includes("Invalid invite code")) { - setError("Invalid invite code. Please check and try again."); - } else { - setError("Failed to initiate GitHub signup. Please try again."); - } + setError("Failed to initiate GitHub signup. Please try again."); } }; const handleGoogleSignup = async () => { try { - const inviteCode = (document.getElementById("inviteCode") as HTMLInputElement)?.value; - if (!inviteCode) { - setError("Invite code is required"); - return; - } - const { auth_url } = await os.initiateGoogleAuth(inviteCode); - window.localStorage.setItem("google_invite_code", inviteCode); + const { auth_url } = await os.initiateGoogleAuth(""); window.location.href = auth_url; } catch (error) { console.error("Failed to initiate Google signup:", error); - if (error instanceof Error && error.message.includes("Invalid invite code")) { - setError("Invalid invite code. Please check and try again."); - } else { - setError("Failed to initiate Google signup. Please try again."); - } + setError("Failed to initiate Google signup. Please try again."); } }; @@ -111,11 +90,11 @@ function SignupPage() { Sign up with Email - - @@ -129,71 +108,9 @@ function SignupPage() { ); } - if (signUpMethod === "github") { - return ( -
{ - e.preventDefault(); - handleGitHubSignup(); - }} - > - - {error && } -
- - -
- - -
-
- ); - } - - if (signUpMethod === "google") { - return ( -
{ - e.preventDefault(); - handleGoogleSignup(); - }} - > - - {error && } -
- - -
- - -
-
- ); - } - return (
- + {error && }
@@ -217,10 +134,6 @@ function SignupPage() { autoComplete="new-password" />
-
- - -
- - )} -
- Already have an invite code?{" "} - - Sign up - -
- - - - - ); -} From 8106954e968738df8636e63fe4a54db9b2159a05 Mon Sep 17 00:00:00 2001 From: Tony Giorgio Date: Mon, 27 Jan 2025 16:23:22 -0600 Subject: [PATCH 3/6] Rephrase marketing text --- frontend/src/components/Marketing.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/Marketing.tsx b/frontend/src/components/Marketing.tsx index 6e2a4f6c..d3f5d4cc 100644 --- a/frontend/src/components/Marketing.tsx +++ b/frontend/src/components/Marketing.tsx @@ -84,7 +84,8 @@ export function Marketing() { mask test

AI Cloud

- Your chats are sent encrypted to a GPU and are impossible to intercept. + Your chats are encrypted and sent to a GPU, providing a highly secure transmission + that's resistant to interception.

From 9a946e2a75658e3245ef50121299e1f114e40aca Mon Sep 17 00:00:00 2001 From: Tony Giorgio Date: Mon, 27 Jan 2025 16:32:48 -0600 Subject: [PATCH 4/6] Contact us button --- frontend/src/components/AccountMenu.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/AccountMenu.tsx b/frontend/src/components/AccountMenu.tsx index 0563f20e..cd9a1a47 100644 --- a/frontend/src/components/AccountMenu.tsx +++ b/frontend/src/components/AccountMenu.tsx @@ -1,4 +1,4 @@ -import { LogOut, Trash, User, CreditCard, ArrowUpCircle } from "lucide-react"; +import { LogOut, Trash, User, CreditCard, ArrowUpCircle, Mail } from "lucide-react"; import { Button } from "@/components/ui/button"; import { @@ -144,6 +144,12 @@ export function AccountMenu() { {isPortalLoading ? "Loading..." : "Manage Subscription"} )} + + + + Contact Us + + From e0cd117942dced82671c6502a6a627461d44b76f Mon Sep 17 00:00:00 2001 From: Tony Giorgio Date: Mon, 27 Jan 2025 16:42:53 -0600 Subject: [PATCH 5/6] Chats left this week --- frontend/src/components/BillingStatus.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/BillingStatus.tsx b/frontend/src/components/BillingStatus.tsx index b20cc12a..29720c14 100644 --- a/frontend/src/components/BillingStatus.tsx +++ b/frontend/src/components/BillingStatus.tsx @@ -37,7 +37,7 @@ export function BillingStatus() { if (billingStatus.chats_remaining === null || billingStatus.chats_remaining <= 0) { return "You've run out of chats, upgrade to keep chatting!"; } - return "Free Plan"; + return `Free Plan — ${billingStatus.chats_remaining} Chat${billingStatus.chats_remaining === 1 ? "" : "s"} Left This Week`; } if (!billingStatus.can_chat) { if (isPro) { From 5a412124ac7ac7eaf28ab62cb59c42c37dd6f9ef Mon Sep 17 00:00:00 2001 From: Tony Giorgio Date: Mon, 27 Jan 2025 16:56:55 -0600 Subject: [PATCH 6/6] New PCRs --- frontend/src/app.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/app.tsx b/frontend/src/app.tsx index ac6e0395..92a5674c 100644 --- a/frontend/src/app.tsx +++ b/frontend/src/app.tsx @@ -53,13 +53,15 @@ export default function App() { "ed9109c16f30a470cf0ea2251816789b4ffa510c990118323ce94a2364b9bf05bdb8777959cbac86f5cabc4852e0da71", "4f2bcdf16c38842e1a45defd944d24ea58bb5bcb76491843223022acfe9eb6f1ff79b2cb9a6b2a9219daf9c7bf40fa37", "b8ee4b511ef2c9c6ab3e5c0840c5df2218fbb4d9df88254ece7af9462677e55aa5a03838f3ae432d86ca1cb6f992eee7", - "33ffe5cae0f72cfe904bde8019ad98efa0ce5db2800f37c5d4149461023d1f70ea77e4f58ae1327ff46ed6a34045d6e2" + "33ffe5cae0f72cfe904bde8019ad98efa0ce5db2800f37c5d4149461023d1f70ea77e4f58ae1327ff46ed6a34045d6e2", + "a1398fa2946b6ed4b96a1a992ee668aef3661329690f87d44cad5b646ce33e3b16a55674b1d6d54d115a5520801b97d6" ], pcr0DevValues: [ "799600ba64a29e360b1651f4ced6c9ca5323094a45294551327b996062c3f21e6fef651e7e3d97ec8d25be87b9935b4f", "2fd9d4f716fd28336d96bc1a20b18a727c2d18f292577ba99323acfc8fb08959428a123b7acff478994c4f961247a0c7", "4292db2a90ce5ea6f6e2766e0238a328c81dc060a1f3175bced2e94a10e0490d3ff9125d774dafdff969ac661778e757", - "f58409ae1bc8600c887fef5cc4055149c88c94b41c2b3e268826af7b43a1cdbacffdb2c96bf5972120c6460ab83fe89e" + "f58409ae1bc8600c887fef5cc4055149c88c94b41c2b3e268826af7b43a1cdbacffdb2c96bf5972120c6460ab83fe89e", + "6fcdb8086806a96c421c08eaf67cebf164aa898798b6f91b072c884773bc6ed64fe8f5af644fe35411195167b0e4a5f1" ] }} >