diff --git a/apps/dashboard/src/@/styles/globals.css b/apps/dashboard/src/@/styles/globals.css index d966cd7bccc..84017105617 100644 --- a/apps/dashboard/src/@/styles/globals.css +++ b/apps/dashboard/src/@/styles/globals.css @@ -48,10 +48,10 @@ --background: 0 0% 0%; --card: 0 0% 0%; --popover: 0 0% 0%; - --secondary: 0 0% 10%; - --muted: 0 0% 9%; - --accent: 0 0% 9%; - --inverted: 0 0% 98%; + --secondary: 0 0% 11%; + --muted: 0 0% 11%; + --accent: 0 0% 11%; + --inverted: 0 0% 100%; /* bg - colorful */ --primary: 221 83% 54%; diff --git a/apps/dashboard/src/app/nebula-app/(app)/components/ChatBar.tsx b/apps/dashboard/src/app/nebula-app/(app)/components/ChatBar.tsx index df1a08a181f..3aae79278b3 100644 --- a/apps/dashboard/src/app/nebula-app/(app)/components/ChatBar.tsx +++ b/apps/dashboard/src/app/nebula-app/(app)/components/ChatBar.tsx @@ -15,24 +15,26 @@ export function ChatBar(props: { return (
- setMessage(e.target.value)} - onKeyDown={(e) => { - // ignore if shift key is pressed to allow entering new lines - if (e.shiftKey) { - return; - } - if (e.key === "Enter" && !props.isChatStreaming) { - e.preventDefault(); - setMessage(""); - props.sendMessage(message); - } - }} - className="min-h-[40px] resize-none border-none bg-transparent pt-2 leading-relaxed focus-visible:ring-0 focus-visible:ring-offset-0" - disabled={props.isChatStreaming} - /> +
+ setMessage(e.target.value)} + onKeyDown={(e) => { + // ignore if shift key is pressed to allow entering new lines + if (e.shiftKey) { + return; + } + if (e.key === "Enter" && !props.isChatStreaming) { + e.preventDefault(); + setMessage(""); + props.sendMessage(message); + } + }} + className="min-h-[40px] resize-none border-none bg-transparent pt-2 leading-relaxed focus-visible:ring-0 focus-visible:ring-offset-0" + disabled={props.isChatStreaming} + /> +
{/* Send / Stop */} diff --git a/apps/dashboard/src/app/nebula-app/(app)/components/ChatPageContent.tsx b/apps/dashboard/src/app/nebula-app/(app)/components/ChatPageContent.tsx index 5c2bf88d260..8b530d0ba32 100644 --- a/apps/dashboard/src/app/nebula-app/(app)/components/ChatPageContent.tsx +++ b/apps/dashboard/src/app/nebula-app/(app)/components/ChatPageContent.tsx @@ -398,7 +398,7 @@ export function ChatPageContent(props: { isChatStreaming={isChatStreaming} authToken={props.authToken} sessionId={sessionId} - className="min-w-0 pt-10 pb-32" + className="min-w-0 pt-6 pb-32" twAccount={props.account} client={client} enableAutoScroll={enableAutoScroll} diff --git a/apps/dashboard/src/app/nebula-app/(app)/components/ChatSidebar.tsx b/apps/dashboard/src/app/nebula-app/(app)/components/ChatSidebar.tsx index 3a685132ddc..aea98d73417 100644 --- a/apps/dashboard/src/app/nebula-app/(app)/components/ChatSidebar.tsx +++ b/apps/dashboard/src/app/nebula-app/(app)/components/ChatSidebar.tsx @@ -3,7 +3,11 @@ import { ScrollShadow } from "@/components/ui/ScrollShadow/ScrollShadow"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import type { Account } from "@3rdweb-sdk/react/hooks/useApi"; -import { MessagesSquareIcon, SquareDashedBottomCodeIcon } from "lucide-react"; +import { + MessagesSquareIcon, + SquareDashedBottomCodeIcon, + TextIcon, +} from "lucide-react"; import Link from "next/link"; import type { TruncatedSessionInfo } from "../api/types"; import { useNewChatPageLink } from "../hooks/useNewChatPageLink"; @@ -42,26 +46,17 @@ export function ChatSidebar(props: {
-
- -
- +
- -
+ {sessionsToShow.length > 0 && ( )} +
+ + + +
+ + + + {}} + client={getThirdwebClient()} + authToken="xxxxx" + isChatStreaming={false} + sessionId="xxxxx" + twAccount={accountStub()} + messages={[ + { + text: responseWithCodeMarkdown, + type: "user", + }, + { + text: randomLorem(20), + type: "presence", + }, + ]} + /> +
); diff --git a/apps/dashboard/src/app/nebula-app/(app)/components/Chats.tsx b/apps/dashboard/src/app/nebula-app/(app)/components/Chats.tsx index d326c4d0088..c59616cdcfe 100644 --- a/apps/dashboard/src/app/nebula-app/(app)/components/Chats.tsx +++ b/apps/dashboard/src/app/nebula-app/(app)/components/Chats.tsx @@ -1,4 +1,3 @@ -import { GradientAvatar } from "@/components/blocks/Avatars/GradientAvatar"; import { ScrollShadow } from "@/components/ui/ScrollShadow/ScrollShadow"; import { Spinner } from "@/components/ui/Spinner/Spinner"; import { Alert, AlertTitle } from "@/components/ui/alert"; @@ -13,6 +12,7 @@ import { ThumbsDownIcon, ThumbsUpIcon, } from "lucide-react"; +import { useTheme } from "next-themes"; import { useEffect, useRef, useState } from "react"; import { toast } from "sonner"; import { type ThirdwebClient, prepareTransaction } from "thirdweb"; @@ -20,6 +20,7 @@ import { useSendTransaction } from "thirdweb/react"; import { TransactionButton } from "../../../../components/buttons/TransactionButton"; import { MarkdownRenderer } from "../../../../components/contract-components/published-contract/markdown-renderer"; import { useV5DashboardChain } from "../../../../lib/v5-adapter"; +import { getSDKTheme } from "../../../components/sdk-component-theme"; import { submitFeedback } from "../api/feedback"; import { NebulaIcon } from "../icons/NebulaIcon"; @@ -97,7 +98,7 @@ export function Chats(props: { return (
-
-
- {message.type === "user" ? ( - +
+ - ) : ( +
+
+ ) : ( +
+ {/* Left Icon */} +
)}
- )} -
-
- {message.type === "assistant" ? ( - - ) : message.type === "error" ? ( - - {message.text} - - ) : message.type === "send_transaction" ? ( - - ) : ( - {message.text} - )} +
- {message.type === "assistant" && - !props.isChatStreaming && - props.sessionId && - message.request_id && ( - - )} + {/* Right Message */} +
+ + {message.type === "assistant" ? ( + + ) : message.type === "error" ? ( + + {message.text} + + ) : message.type === "send_transaction" ? ( + + ) : ( + + {message.text} + + )} + + + {message.type === "assistant" && + !props.isChatStreaming && + props.sessionId && + message.request_id && ( + + )} +
-
+ )}
); })} @@ -327,8 +343,13 @@ function SendTransactionButton(props: { twAccount: TWAccount; client: ThirdwebClient; }) { + const { theme } = useTheme(); const { txData } = props; - const sendTransaction = useSendTransaction(); + const sendTransaction = useSendTransaction({ + payModal: { + theme: getSDKTheme(theme === "light" ? "light" : "dark"), + }, + }); const chain = useV5DashboardChain(txData.chainId); return ( diff --git a/apps/dashboard/src/components/contract-components/published-contract/markdown-renderer.tsx b/apps/dashboard/src/components/contract-components/published-contract/markdown-renderer.tsx index 72adc6ccd1c..37d79281398 100644 --- a/apps/dashboard/src/components/contract-components/published-contract/markdown-renderer.tsx +++ b/apps/dashboard/src/components/contract-components/published-contract/markdown-renderer.tsx @@ -22,6 +22,10 @@ export const MarkdownRenderer: React.FC<{ code?: { disableCodeHighlight?: boolean; ignoreFormattingErrors?: boolean; + className?: string; + }; + inlineCode?: { + className?: string; }; p?: { className?: string; @@ -107,6 +111,7 @@ export const MarkdownRenderer: React.FC<{
); @@ -120,12 +125,18 @@ export const MarkdownRenderer: React.FC<{ {...cleanedProps(props)} code={onlyText(props.children).trim()} ignoreFormattingErrors={code?.ignoreFormattingErrors} + className={markdownProps.code?.className} />
); } - return ; + return ( + + ); }, p: (props) => ( @@ -178,7 +189,7 @@ export const MarkdownRenderer: React.FC<{ li: ({ children: c, ...props }) => (
  • p]:m-0", + "mb-2 text-muted-foreground leading-loose [&>p]:m-0", markdownProps.li?.className, )} {...cleanedProps(props)} diff --git a/apps/dashboard/src/components/explore/contract-card/index.tsx b/apps/dashboard/src/components/explore/contract-card/index.tsx index b5ce22f6ea0..a611dc77f43 100644 --- a/apps/dashboard/src/components/explore/contract-card/index.tsx +++ b/apps/dashboard/src/components/explore/contract-card/index.tsx @@ -106,7 +106,7 @@ export async function ContractCard({ return (