From 6f83844a3db8d44732f080922b23f3ad90355e9d Mon Sep 17 00:00:00 2001 From: jcenturion-okta Date: Wed, 9 Oct 2024 20:31:23 -0300 Subject: [PATCH 1/2] reviewing ios --- app/chat/[id]/page.tsx | 130 +++++++++++++----------- app/layout.tsx | 9 +- llm/components/conditional-purchase.tsx | 12 +-- 3 files changed, 83 insertions(+), 68 deletions(-) diff --git a/app/chat/[id]/page.tsx b/app/chat/[id]/page.tsx index 941176b..fc7f0b7 100644 --- a/app/chat/[id]/page.tsx +++ b/app/chat/[id]/page.tsx @@ -66,74 +66,82 @@ export default function Chat({ params }: { params: { id: string } }) { return (
-
-
- {conversation.map((message: ClientMessage) => - message.role === "user" ? ( -
-
- {message.display} +
+
+
+ {conversation.map((message: ClientMessage) => + message.role === "user" ? ( +
+
+ {message.display} +
+
+ + + U + +
-
- - - U - + ) : message.role === "assistant" || message.role === "function" ? ( +
+
+ +
+
+ {message.display} +
-
- ) : message.role === "assistant" || message.role === "function" ? ( -
-
+ ) : null + )} + +
+
+ {conversation.length === 0 && ( +
+
+
-
- {message.display} +

+ Welcome to{" "} + + Market0 + +

+

+ Market0 is a demo app that showcases secure auth patterns for GenAI apps +

+
+
+
+ + Get started with these examples +
+
+ {examples.map((example) => ( + + ))}
- ) : null +
)} - -
- {conversation.length === 0 && ( -
-
- -

- Welcome to{" "} - - Market0 - -

-

- Market0 is a demo app that showcases secure auth patterns for GenAI apps -

-
-
-
- - Get started with these examples -
-
- {examples.map((example) => ( - - ))} -
-
-
- )} -
+ +
diff --git a/app/layout.tsx b/app/layout.tsx index 3e9376d..e1c11d8 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -1,4 +1,4 @@ -import type { Metadata } from "next"; +import type { Metadata, Viewport } from "next"; import "./globals.css"; import { Inter } from "next/font/google"; @@ -15,6 +15,13 @@ export const metadata: Metadata = { description: "Market0 is a demo app that showcases secure auth patterns for GenAI apps", }; +export const viewport: Viewport = { + width: "device-width", + initialScale: 1.0, + maximumScale: 1.0, + userScalable: false, +}; + export default async function RootLayout({ children, }: Readonly<{ diff --git a/llm/components/conditional-purchase.tsx b/llm/components/conditional-purchase.tsx index f00a1ae..0154b95 100644 --- a/llm/components/conditional-purchase.tsx +++ b/llm/components/conditional-purchase.tsx @@ -51,18 +51,18 @@ export function ConditionalPurchase({ id, isMFAEnrolled }: { id: string; isMFAEn if (!isEnrolled) { return ( -
-
-

Action Required: Setup Async Authentication

-

+

+
+

Action Required: Setup Async Authentication

+

Please enroll to Auth0 Guardian so we can notify you when the condition is met. This is necessary to secure your future transaction.

-
+
Enroll From d4782b47b4820491b03ede02d49b38312e930c06 Mon Sep 17 00:00:00 2001 From: jcenturion-okta Date: Wed, 9 Oct 2024 21:03:43 -0300 Subject: [PATCH 2/2] fixing viewport --- app/chat/[id]/layout.tsx | 18 +-- app/chat/[id]/page.tsx | 255 ++++++++++++++++++------------------- app/manifest.ts | 21 +++ components/chat/header.tsx | 2 +- 4 files changed, 157 insertions(+), 139 deletions(-) create mode 100644 app/manifest.ts diff --git a/app/chat/[id]/layout.tsx b/app/chat/[id]/layout.tsx index c0a7bd9..64cf278 100644 --- a/app/chat/[id]/layout.tsx +++ b/app/chat/[id]/layout.tsx @@ -24,15 +24,17 @@ async function RootLayout({ children, params }: RootChatParams) { return ( -
- - - -
+
+
+ + + +
- - {children} - + + {children} + +
); } diff --git a/app/chat/[id]/page.tsx b/app/chat/[id]/page.tsx index fc7f0b7..c3e188c 100644 --- a/app/chat/[id]/page.tsx +++ b/app/chat/[id]/page.tsx @@ -64,147 +64,142 @@ export default function Chat({ params }: { params: { id: string } }) { }; return ( -
-
-
-
-
- {conversation.map((message: ClientMessage) => - message.role === "user" ? ( -
-
- {message.display} -
-
- - - U - -
+
+
+
+
+ {conversation.map((message: ClientMessage) => + message.role === "user" ? ( +
+
+ {message.display}
- ) : message.role === "assistant" || message.role === "function" ? ( -
-
- -
-
- {message.display} -
+
+ + + U +
- ) : null - )} - -
-
- {conversation.length === 0 && ( -
-
-
- -
-

- Welcome to{" "} - - Market0 - -

-

- Market0 is a demo app that showcases secure auth patterns for GenAI apps -

-
-
- - Get started with these examples + ) : message.role === "assistant" || message.role === "function" ? ( +
+
+
-
- {examples.map((example) => ( - - ))} +
+ {message.display}
-
+ ) : null )} -
-
-
- - - ( - - - - - - )} - /> - - {!form.formState.disabled && } - - - - -
- {conversation.length > 0 && ( -
- Market0 is a demo app that showcases secure auth patterns for GenAI apps +
+
+ {conversation.length === 0 && ( +
+
+
+ +
+

+ Welcome to{" "} + + Market0 + +

+

+ Market0 is a demo app that showcases secure auth patterns for GenAI apps +

- )} - {conversation.length === 0 && ( -
- - Privacy Policy - - - - Terms of Service - +
+
+ + Get started with these examples +
+
+ {examples.map((example) => ( + + ))} +
- )} +
+ )} +
+ +
+
+
+ + ( + + + + + + )} + /> + + {!form.formState.disabled && } + + + +
+ {conversation.length > 0 && ( +
+ Market0 is a demo app that showcases secure auth patterns for GenAI apps +
+ )} + {conversation.length === 0 && ( +
+ + Privacy Policy + + + + Terms of Service + +
+ )}
diff --git a/app/manifest.ts b/app/manifest.ts new file mode 100644 index 0000000..5eaae43 --- /dev/null +++ b/app/manifest.ts @@ -0,0 +1,21 @@ +import { MetadataRoute } from "next"; + +export default function manifest(): MetadataRoute.Manifest { + return { + name: "Auth0 AI | Market0", + short_name: "Market0", + description: "Market0 is a demo app that showcases secure auth patterns for GenAI apps", + start_url: "/", + display: "standalone", + orientation: "portrait", + background_color: "#fff", + theme_color: "#fff", + icons: [ + { + src: "/favicon.ico", + sizes: "any", + type: "image/x-icon", + }, + ], + }; +} diff --git a/components/chat/header.tsx b/components/chat/header.tsx index ae217cb..641c9c0 100644 --- a/components/chat/header.tsx +++ b/components/chat/header.tsx @@ -10,7 +10,7 @@ export async function Header({ children }: { children?: React.ReactNode }) { const user = session?.user!; return ( -
+