Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit e37b705

Browse files
committed
address comments on UI nits
1 parent 177463b commit e37b705

File tree

4 files changed

+67
-10
lines changed

4 files changed

+67
-10
lines changed

apps/nextra/components/chat-widget/chat-dialog.tsx

Lines changed: 57 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export function ChatDialog({
8787
</Dialog.Trigger>
8888
)}
8989
<Dialog.Portal>
90-
<Dialog.Overlay className="fixed inset-0 z-[99999] bg-black/80 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out" />
90+
<Dialog.Overlay className="fixed inset-0 z-[100] bg-gray-400/80 dark:bg-black/80 data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out" />
9191
<Dialog.Content
9292
className={cn(
9393
"fixed z-[100000] flex flex-col overflow-hidden rounded-xl bg-[#0F0F0F] shadow-xl",
@@ -112,8 +112,12 @@ export function ChatDialog({
112112
<div className="flex items-center gap-4">
113113
<div className="flex items-center gap-2">
114114
<Dialog.Title className="flex items-center gap-2 text-lg font-medium text-white">
115-
<Image src={aptosLogo} alt="Aptos AI" className="h-5 w-5" />
116-
Ask AI
115+
<Image
116+
src={aptosLogo}
117+
alt="Aptos AI"
118+
className="h-5 w-5 invert dark:invert"
119+
/>
120+
AskAptos
117121
</Dialog.Title>
118122
{showSidebar && (
119123
<button
@@ -188,11 +192,38 @@ export function ChatDialog({
188192
{hasMoreMessages && (
189193
<button
190194
onClick={onLoadMore}
191-
className="mx-auto rounded-lg bg-gray-800 px-4 py-2 text-sm text-gray-300 hover:bg-gray-700"
195+
className="mx-auto rounded-lg bg-gray-800 px-4 py-2 text-sm text-white hover:bg-gray-700"
192196
>
193197
Load more messages
194198
</button>
195199
)}
200+
{messages.length === 0 && (
201+
<div className="flex flex-col items-center justify-center gap-4 py-8 text-center">
202+
<div className="rounded-full bg-gray-800 p-4">
203+
<Image
204+
src={aptosLogo}
205+
alt="Aptos AI"
206+
className="h-8 w-8 invert dark:invert"
207+
/>
208+
</div>
209+
<div className="max-w-sm space-y-2">
210+
<h3 className="text-lg font-medium text-white">
211+
Ask me anything about Aptos!
212+
</h3>
213+
<p className="text-sm text-white">
214+
I'm here to help you with Move development,
215+
blockchain concepts, tools, and more.
216+
</p>
217+
<div className="mt-4 rounded-lg bg-[#1F1F1F] p-3">
218+
<p className="text-sm text-white/70">
219+
💡 Pro tip: Toggle "Fast mode" in the sidebar
220+
for quicker responses. Note that fast responses
221+
might be less detailed.
222+
</p>
223+
</div>
224+
</div>
225+
</div>
226+
)}
196227
{messages.map((message, index) => (
197228
<ChatMessage
198229
key={message.id}
@@ -235,6 +266,28 @@ export function ChatDialog({
235266
className="h-full py-3"
236267
/>
237268
</div>
269+
270+
{/* Disclaimer */}
271+
<div className="text-center px-4 pb-4 text-xs text-white/70 bg-[#0F0F0F]">
272+
By messaging AskAptos, you agree to our{" "}
273+
<a
274+
href="https://aptoslabs.com/terms"
275+
target="_blank"
276+
rel="noopener noreferrer"
277+
className="text-blue-400 hover:text-blue-300"
278+
>
279+
Terms
280+
</a>{" "}
281+
and have read our{" "}
282+
<a
283+
href="https://aptoslabs.com/privacy"
284+
target="_blank"
285+
rel="noopener noreferrer"
286+
className="text-blue-400 hover:text-blue-300"
287+
>
288+
Privacy Policy
289+
</a>
290+
</div>
238291
</div>
239292
</div>
240293
</Dialog.Content>

apps/nextra/components/chat-widget/chat-input.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const ChatInput = React.forwardRef<HTMLTextAreaElement, ChatInputProps>(
5858
rows={1}
5959
className={cn(
6060
"w-full resize-none rounded-lg bg-[#1F1F1F] px-4 py-3",
61-
"text-sm text-white placeholder-gray-500",
61+
"text-sm text-white placeholder-white/60",
6262
"focus:outline-none focus:ring-1 focus:ring-gray-500",
6363
)}
6464
style={{

apps/nextra/components/chat-widget/chat-message.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ export function ChatMessage({
3737
</div>
3838
) : (
3939
<div className="flex h-8 w-8 shrink-0 select-none items-center justify-center rounded-full bg-white">
40-
<Image src={aptosLogo} alt="Aptos AI" className="h-5 w-5" />
40+
<Image
41+
src={aptosLogo}
42+
alt="Aptos AI"
43+
className="h-5 w-5 invert dark:invert"
44+
/>
4145
</div>
4246
)}
4347

apps/nextra/components/chat-widget/chat-sidebar.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export function ChatSidebar({
182182
<div className="space-y-2">
183183
{!isCollapsed && groupedChats.today.length > 0 && (
184184
<div className="px-4 py-2">
185-
<h2 className="text-xs font-medium uppercase text-gray-400">
185+
<h2 className="text-xs font-semibold uppercase text-white">
186186
Today
187187
</h2>
188188
</div>
@@ -202,7 +202,7 @@ export function ChatSidebar({
202202

203203
{!isCollapsed && groupedChats.previous.length > 0 && (
204204
<div className="px-4 py-2">
205-
<h2 className="text-xs font-medium uppercase text-gray-400">
205+
<h2 className="text-xs font-semibold uppercase text-white">
206206
Previous 30 Days
207207
</h2>
208208
</div>
@@ -229,7 +229,7 @@ export function ChatSidebar({
229229
<div className="border-t border-[#1F1F1F] p-4">
230230
{!isCollapsed && (
231231
<div className="rounded-lg bg-[#1F1F1F] p-3">
232-
<label className="flex items-center gap-2 text-sm text-gray-400">
232+
<label className="flex items-center gap-2 text-sm text-white">
233233
<input
234234
type="checkbox"
235235
checked={fastMode}
@@ -238,7 +238,7 @@ export function ChatSidebar({
238238
/>
239239
Fast mode
240240
</label>
241-
<p className="mt-1 text-xs text-gray-500">
241+
<p className="mt-1 text-xs text-white/70">
242242
Might provide less accurate answers
243243
</p>
244244
</div>

0 commit comments

Comments
 (0)