From 1e1ed5ca45b5369154ee1f8f4a20a8ebe3894414 Mon Sep 17 00:00:00 2001 From: Zach Gollwitzer Date: Fri, 2 May 2025 11:36:32 -0400 Subject: [PATCH] Light / dark assistant icon --- app/assets/images/ai-dark.svg | 71 ++++++++ app/assets/images/ai.svg | 156 ++++++++---------- .../_assistant_message.html.erb | 2 +- app/views/chats/_ai_avatar.html.erb | 7 +- app/views/chats/_ai_consent.html.erb | 2 +- app/views/chats/_ai_greeting.html.erb | 2 +- app/views/chats/_thinking_indicator.html.erb | 2 +- app/views/onboardings/trial.html.erb | 6 +- 8 files changed, 153 insertions(+), 95 deletions(-) create mode 100644 app/assets/images/ai-dark.svg diff --git a/app/assets/images/ai-dark.svg b/app/assets/images/ai-dark.svg new file mode 100644 index 00000000..bdcbfea6 --- /dev/null +++ b/app/assets/images/ai-dark.svg @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/assets/images/ai.svg b/app/assets/images/ai.svg index ee2c6462..94f17808 100644 --- a/app/assets/images/ai.svg +++ b/app/assets/images/ai.svg @@ -1,85 +1,71 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/views/assistant_messages/_assistant_message.html.erb b/app/views/assistant_messages/_assistant_message.html.erb index ced5d254..59356a78 100644 --- a/app/views/assistant_messages/_assistant_message.html.erb +++ b/app/views/assistant_messages/_assistant_message.html.erb @@ -15,7 +15,7 @@ <%= render "assistant_messages/tool_calls", message: assistant_message %> <% end %> -
+
<%= render "chats/ai_avatar" %>
<%= markdown(assistant_message.content) %>
diff --git a/app/views/chats/_ai_avatar.html.erb b/app/views/chats/_ai_avatar.html.erb index baa5a6f6..0df752e2 100644 --- a/app/views/chats/_ai_avatar.html.erb +++ b/app/views/chats/_ai_avatar.html.erb @@ -1,4 +1,7 @@ -
+<%# locals: (theme: "light") %> + +
<%# Never use svg as an image tag, it appears blurry in Safari %> - <%= inline_svg_tag "ai.svg", alt: "AI", class: "w-full h-full" %> + <%= inline_svg_tag "ai-dark.svg", alt: "AI", class: "w-full h-full hidden theme-dark:block" %> + <%= inline_svg_tag "ai.svg", alt: "AI", class: "w-full h-full theme-dark:hidden" %>
diff --git a/app/views/chats/_ai_consent.html.erb b/app/views/chats/_ai_consent.html.erb index 960aa6b3..f3a97c3e 100644 --- a/app/views/chats/_ai_consent.html.erb +++ b/app/views/chats/_ai_consent.html.erb @@ -1,5 +1,5 @@
-
+
<%= render "chats/ai_avatar" %>
diff --git a/app/views/chats/_ai_greeting.html.erb b/app/views/chats/_ai_greeting.html.erb index 30243fbf..954a0f72 100644 --- a/app/views/chats/_ai_greeting.html.erb +++ b/app/views/chats/_ai_greeting.html.erb @@ -1,4 +1,4 @@ -
+
<%= render "chats/ai_avatar" %>
diff --git a/app/views/chats/_thinking_indicator.html.erb b/app/views/chats/_thinking_indicator.html.erb index efd779b7..e1ba8921 100644 --- a/app/views/chats/_thinking_indicator.html.erb +++ b/app/views/chats/_thinking_indicator.html.erb @@ -1,6 +1,6 @@ <%# locals: (chat:, message: "Thinking ...") -%> -
+
<%= render "chats/ai_avatar" %>

<%= message %>

diff --git a/app/views/onboardings/trial.html.erb b/app/views/onboardings/trial.html.erb index 4a7e1ab5..0454da3e 100644 --- a/app/views/onboardings/trial.html.erb +++ b/app/views/onboardings/trial.html.erb @@ -90,10 +90,8 @@

Comprehensive transaction tracking experience

-
-
- <%= render "chats/ai_avatar" %> -
+
+ <%= render "chats/ai_avatar" %>

Unlimited access and chats with Maybe AI