From d35db99c6f35c04d617c46d531f194bd042ba458 Mon Sep 17 00:00:00 2001 From: sabaimran Date: Wed, 11 Dec 2024 16:54:06 -0800 Subject: [PATCH] Initial version of a carousel working for sign in with steps for email sign up - Google sign in is pending with the gsi client code. Will see if I can get that working - Check in relevant image assets --- src/interface/web/app/common/layoutHelper.tsx | 9 +- .../components/loginPrompt/GoogleSignIn.tsx | 20 ++ .../components/loginPrompt/loginPrompt.tsx | 221 +++++++++++++++--- src/interface/web/public/automate_tip.png | Bin 0 -> 54633 bytes src/interface/web/public/documents_tip.png | Bin 0 -> 56210 bytes src/interface/web/public/personalize_tip.png | Bin 0 -> 55440 bytes 6 files changed, 209 insertions(+), 41 deletions(-) create mode 100644 src/interface/web/app/components/loginPrompt/GoogleSignIn.tsx create mode 100644 src/interface/web/public/automate_tip.png create mode 100644 src/interface/web/public/documents_tip.png create mode 100644 src/interface/web/public/personalize_tip.png diff --git a/src/interface/web/app/common/layoutHelper.tsx b/src/interface/web/app/common/layoutHelper.tsx index 11b1043d..5c34e641 100644 --- a/src/interface/web/app/common/layoutHelper.tsx +++ b/src/interface/web/app/common/layoutHelper.tsx @@ -4,11 +4,12 @@ export function ContentSecurityPolicy() { httpEquiv="Content-Security-Policy" content="default-src 'self' https://assets.khoj.dev; media-src * blob:; - script-src 'self' https://assets.khoj.dev https://app.chatwoot.com 'unsafe-inline' 'unsafe-eval'; - connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110; - style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com; - img-src 'self' data: blob: https://*.khoj.dev https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; + script-src 'self' https://assets.khoj.dev https://app.chatwoot.com https://accounts.google.com 'unsafe-inline' 'unsafe-eval'; + connect-src 'self' blob: https://ipapi.co/json ws://localhost:42110 https://accounts.google.com; + style-src 'self' https://assets.khoj.dev 'unsafe-inline' https://fonts.googleapis.com https://accounts.google.com; + img-src 'self' data: blob: https://*.khoj.dev https://accounts.google.com https://*.googleusercontent.com https://*.google.com/ https://*.gstatic.com; font-src 'self' https://assets.khoj.dev https://fonts.gstatic.com; + frame-src 'self' https://accounts.google.com; child-src 'self' https://app.chatwoot.com; object-src 'none';" > diff --git a/src/interface/web/app/components/loginPrompt/GoogleSignIn.tsx b/src/interface/web/app/components/loginPrompt/GoogleSignIn.tsx new file mode 100644 index 00000000..82909d8e --- /dev/null +++ b/src/interface/web/app/components/loginPrompt/GoogleSignIn.tsx @@ -0,0 +1,20 @@ +// GoogleSignIn.tsx +"use client"; + +import Script from "next/script"; + +interface GoogleSignInProps { + onLoad?: () => void; +} + +export function GoogleSignIn({ onLoad }: GoogleSignInProps) { + return ( +