From 71c87e84688788180c4eae753e7d782109ef0b63 Mon Sep 17 00:00:00 2001 From: JK-le-dev Date: Sat, 18 Oct 2025 19:15:31 -0500 Subject: [PATCH] style(everything): fuck you --- web-app/index.html | 1 - .../src/components/layouts/chat-layout.jsx | 2 +- .../action-button.css} | 0 .../action-button.jsx} | 14 ++++---- .../src/components/ui/chat/chat-header.jsx | 36 ++----------------- .../src/components/ui/chat/chat-window.jsx | 16 ++------- .../src/components/ui/chat/message-input.jsx | 11 +++--- web-app/src/index.css | 3 +- web-app/src/styles/theme.css | 7 ---- 9 files changed, 19 insertions(+), 71 deletions(-) rename web-app/src/components/ui/{Button/ActionButton.css => button/action-button.css} (100%) rename web-app/src/components/ui/{Button/ActionButton.jsx => button/action-button.jsx} (86%) delete mode 100644 web-app/src/styles/theme.css diff --git a/web-app/index.html b/web-app/index.html index ddadf4a..12f80c9 100644 --- a/web-app/index.html +++ b/web-app/index.html @@ -4,7 +4,6 @@ - codered-astra diff --git a/web-app/src/components/layouts/chat-layout.jsx b/web-app/src/components/layouts/chat-layout.jsx index fbfb5f0..5d64ed8 100644 --- a/web-app/src/components/layouts/chat-layout.jsx +++ b/web-app/src/components/layouts/chat-layout.jsx @@ -25,7 +25,7 @@ export default function ChatLayout() { } return ( -
+
diff --git a/web-app/src/components/ui/Button/ActionButton.css b/web-app/src/components/ui/button/action-button.css similarity index 100% rename from web-app/src/components/ui/Button/ActionButton.css rename to web-app/src/components/ui/button/action-button.css diff --git a/web-app/src/components/ui/Button/ActionButton.jsx b/web-app/src/components/ui/button/action-button.jsx similarity index 86% rename from web-app/src/components/ui/Button/ActionButton.jsx rename to web-app/src/components/ui/button/action-button.jsx index a14b1fe..52573a5 100644 --- a/web-app/src/components/ui/Button/ActionButton.jsx +++ b/web-app/src/components/ui/button/action-button.jsx @@ -1,15 +1,15 @@ -import './ActionButton.css'; +import "./action-button.css"; export default function ActionButton({ onClick, children, - type = 'add', // 'add' or 'delete' + type = "add", // 'add' or 'delete' ...props }) { // Define color and icon based on type const config = { add: { - color: '#0F2862', + color: "#0F2862", svg: ( - + ), }, @@ -47,10 +47,10 @@ export default function ActionButton({ ); diff --git a/web-app/src/components/ui/chat/chat-header.jsx b/web-app/src/components/ui/chat/chat-header.jsx index 9b30b6c..a7d403d 100644 --- a/web-app/src/components/ui/chat/chat-header.jsx +++ b/web-app/src/components/ui/chat/chat-header.jsx @@ -1,39 +1,9 @@ import React from "react"; -import ActionButton from "src/components/ui/Button/ActionButton.jsx"; - -export default function ChatHeader({ title = "AI Assistant" }) { - // Delete chat log (frontend + backend) - const handleDeleteChat = async () => { - if (!window.confirm("Delete all messages?")) return; - await fetch(`/api/chat/${conversationId}`, { method: "DELETE" }); - setMessages([]); - }; - - // Restart chat (new conversation) - const handleNewChat = async () => { - const res = await fetch("/api/chat/new", { method: "POST" }); - const data = await res.json(); - if (data.success) { - setConversationId(data.conversationId); - setMessages([]); - } - }; +export default function ChatHeader({ title = "Title of Chat" }) { return ( -
-
-
- AI -
-
-

{title}

-

- Ask anything — AI is listening -

-
- - -
+
+

{title}

); } diff --git a/web-app/src/components/ui/chat/chat-window.jsx b/web-app/src/components/ui/chat/chat-window.jsx index 7e8af82..9966973 100644 --- a/web-app/src/components/ui/chat/chat-window.jsx +++ b/web-app/src/components/ui/chat/chat-window.jsx @@ -1,11 +1,10 @@ import React, { useRef, useEffect } from "react"; - function MessageBubble({ message }) { const isUser = message.role === "user"; return (
{ - chatRef.current?.scrollTo({ - top: chatRef.current.scrollHeight, - behavior: "smooth", - }); - }, [messages]); - return ( -
+
{messages.map((m, i) => ( ))}
-
+
); } diff --git a/web-app/src/components/ui/chat/message-input.jsx b/web-app/src/components/ui/chat/message-input.jsx index 2ca272e..74efe54 100644 --- a/web-app/src/components/ui/chat/message-input.jsx +++ b/web-app/src/components/ui/chat/message-input.jsx @@ -11,18 +11,15 @@ export default function MessageInput({ onSend }) { } return ( -
-
+ +
setText(e.target.value)} placeholder="Type a message..." - className="flex-1 rounded-md bg-slate-800 border border-slate-700 px-3 py-2 text-white focus:outline-none focus:ring-2 focus:ring-indigo-500" + className="flex-1 rounded-md shadow-2sx" /> -
diff --git a/web-app/src/index.css b/web-app/src/index.css index 9895c36..950dd5e 100644 --- a/web-app/src/index.css +++ b/web-app/src/index.css @@ -1,5 +1,4 @@ -@import "tailwindcss/preflight"; -@import "tailwindcss/utilities"; +@import "tailwindcss"; :root { --color-primary: 15 40 98; diff --git a/web-app/src/styles/theme.css b/web-app/src/styles/theme.css deleted file mode 100644 index 5287314..0000000 --- a/web-app/src/styles/theme.css +++ /dev/null @@ -1,7 +0,0 @@ -@theme { - --color-primary: rgba(15, 40, 98); - --color-secondary: rgba(79, 95, 118); - --color-accent: rgba(158, 54, 58); - --color-paragraph: rgba(255, 255, 255); - --color-background: rgba(9, 31, 54); -}