Spaces:
Sleeping
Sleeping
Girish Jeswani commited on
Commit ·
36deb6e
1
Parent(s): 186ced9
add initial ui
Browse files- phd-advisor-frontend/.gitignore +23 -0
- phd-advisor-frontend/README.md +70 -0
- phd-advisor-frontend/package-lock.json +0 -0
- phd-advisor-frontend/package.json +40 -0
- phd-advisor-frontend/public/favicon.ico +3 -0
- phd-advisor-frontend/public/index.html +43 -0
- phd-advisor-frontend/public/logo192.png +3 -0
- phd-advisor-frontend/public/logo512.png +3 -0
- phd-advisor-frontend/public/manifest.json +25 -0
- phd-advisor-frontend/public/robots.txt +3 -0
- phd-advisor-frontend/src/App.js +28 -0
- phd-advisor-frontend/src/App.test.js +8 -0
- phd-advisor-frontend/src/components/AdvisorCard.js +26 -0
- phd-advisor-frontend/src/components/ChatInput.js +46 -0
- phd-advisor-frontend/src/components/MessageBubble.js +61 -0
- phd-advisor-frontend/src/components/ThinkingIndicator.js +54 -0
- phd-advisor-frontend/src/data/advisors.js +28 -0
- phd-advisor-frontend/src/index.css +13 -0
- phd-advisor-frontend/src/index.js +17 -0
- phd-advisor-frontend/src/pages/ChatPage.js +165 -0
- phd-advisor-frontend/src/pages/HomePage.js +89 -0
- phd-advisor-frontend/src/reportWebVitals.js +13 -0
- phd-advisor-frontend/src/setupTests.js +5 -0
- phd-advisor-frontend/src/styles/components.css +585 -0
phd-advisor-frontend/.gitignore
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
| 2 |
+
|
| 3 |
+
# dependencies
|
| 4 |
+
/node_modules
|
| 5 |
+
/.pnp
|
| 6 |
+
.pnp.js
|
| 7 |
+
|
| 8 |
+
# testing
|
| 9 |
+
/coverage
|
| 10 |
+
|
| 11 |
+
# production
|
| 12 |
+
/build
|
| 13 |
+
|
| 14 |
+
# misc
|
| 15 |
+
.DS_Store
|
| 16 |
+
.env.local
|
| 17 |
+
.env.development.local
|
| 18 |
+
.env.test.local
|
| 19 |
+
.env.production.local
|
| 20 |
+
|
| 21 |
+
npm-debug.log*
|
| 22 |
+
yarn-debug.log*
|
| 23 |
+
yarn-error.log*
|
phd-advisor-frontend/README.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Getting Started with Create React App
|
| 2 |
+
|
| 3 |
+
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
| 4 |
+
|
| 5 |
+
## Available Scripts
|
| 6 |
+
|
| 7 |
+
In the project directory, you can run:
|
| 8 |
+
|
| 9 |
+
### `npm start`
|
| 10 |
+
|
| 11 |
+
Runs the app in the development mode.\
|
| 12 |
+
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
|
| 13 |
+
|
| 14 |
+
The page will reload when you make changes.\
|
| 15 |
+
You may also see any lint errors in the console.
|
| 16 |
+
|
| 17 |
+
### `npm test`
|
| 18 |
+
|
| 19 |
+
Launches the test runner in the interactive watch mode.\
|
| 20 |
+
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
|
| 21 |
+
|
| 22 |
+
### `npm run build`
|
| 23 |
+
|
| 24 |
+
Builds the app for production to the `build` folder.\
|
| 25 |
+
It correctly bundles React in production mode and optimizes the build for the best performance.
|
| 26 |
+
|
| 27 |
+
The build is minified and the filenames include the hashes.\
|
| 28 |
+
Your app is ready to be deployed!
|
| 29 |
+
|
| 30 |
+
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
|
| 31 |
+
|
| 32 |
+
### `npm run eject`
|
| 33 |
+
|
| 34 |
+
**Note: this is a one-way operation. Once you `eject`, you can't go back!**
|
| 35 |
+
|
| 36 |
+
If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
|
| 37 |
+
|
| 38 |
+
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
|
| 39 |
+
|
| 40 |
+
You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
|
| 41 |
+
|
| 42 |
+
## Learn More
|
| 43 |
+
|
| 44 |
+
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
|
| 45 |
+
|
| 46 |
+
To learn React, check out the [React documentation](https://reactjs.org/).
|
| 47 |
+
|
| 48 |
+
### Code Splitting
|
| 49 |
+
|
| 50 |
+
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
|
| 51 |
+
|
| 52 |
+
### Analyzing the Bundle Size
|
| 53 |
+
|
| 54 |
+
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
|
| 55 |
+
|
| 56 |
+
### Making a Progressive Web App
|
| 57 |
+
|
| 58 |
+
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
|
| 59 |
+
|
| 60 |
+
### Advanced Configuration
|
| 61 |
+
|
| 62 |
+
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
|
| 63 |
+
|
| 64 |
+
### Deployment
|
| 65 |
+
|
| 66 |
+
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
|
| 67 |
+
|
| 68 |
+
### `npm run build` fails to minify
|
| 69 |
+
|
| 70 |
+
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
|
phd-advisor-frontend/package-lock.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
phd-advisor-frontend/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "phd-advisor-frontend",
|
| 3 |
+
"version": "0.1.0",
|
| 4 |
+
"private": true,
|
| 5 |
+
"dependencies": {
|
| 6 |
+
"@testing-library/dom": "^10.4.0",
|
| 7 |
+
"@testing-library/jest-dom": "^6.6.3",
|
| 8 |
+
"@testing-library/react": "^16.3.0",
|
| 9 |
+
"@testing-library/user-event": "^13.5.0",
|
| 10 |
+
"lucide-react": "^0.513.0",
|
| 11 |
+
"react": "^19.1.0",
|
| 12 |
+
"react-dom": "^19.1.0",
|
| 13 |
+
"react-scripts": "5.0.1",
|
| 14 |
+
"web-vitals": "^2.1.4"
|
| 15 |
+
},
|
| 16 |
+
"scripts": {
|
| 17 |
+
"start": "react-scripts start",
|
| 18 |
+
"build": "react-scripts build",
|
| 19 |
+
"test": "react-scripts test",
|
| 20 |
+
"eject": "react-scripts eject"
|
| 21 |
+
},
|
| 22 |
+
"eslintConfig": {
|
| 23 |
+
"extends": [
|
| 24 |
+
"react-app",
|
| 25 |
+
"react-app/jest"
|
| 26 |
+
]
|
| 27 |
+
},
|
| 28 |
+
"browserslist": {
|
| 29 |
+
"production": [
|
| 30 |
+
">0.2%",
|
| 31 |
+
"not dead",
|
| 32 |
+
"not op_mini all"
|
| 33 |
+
],
|
| 34 |
+
"development": [
|
| 35 |
+
"last 1 chrome version",
|
| 36 |
+
"last 1 firefox version",
|
| 37 |
+
"last 1 safari version"
|
| 38 |
+
]
|
| 39 |
+
}
|
| 40 |
+
}
|
phd-advisor-frontend/public/favicon.ico
ADDED
|
|
Git LFS Details
|
phd-advisor-frontend/public/index.html
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="utf-8" />
|
| 5 |
+
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
|
| 6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
| 7 |
+
<meta name="theme-color" content="#000000" />
|
| 8 |
+
<meta
|
| 9 |
+
name="description"
|
| 10 |
+
content="Web site created using create-react-app"
|
| 11 |
+
/>
|
| 12 |
+
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
|
| 13 |
+
<!--
|
| 14 |
+
manifest.json provides metadata used when your web app is installed on a
|
| 15 |
+
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
| 16 |
+
-->
|
| 17 |
+
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
|
| 18 |
+
<!--
|
| 19 |
+
Notice the use of %PUBLIC_URL% in the tags above.
|
| 20 |
+
It will be replaced with the URL of the `public` folder during the build.
|
| 21 |
+
Only files inside the `public` folder can be referenced from the HTML.
|
| 22 |
+
|
| 23 |
+
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
|
| 24 |
+
work correctly both with client-side routing and a non-root public URL.
|
| 25 |
+
Learn how to configure a non-root public URL by running `npm run build`.
|
| 26 |
+
-->
|
| 27 |
+
<title>React App</title>
|
| 28 |
+
</head>
|
| 29 |
+
<body>
|
| 30 |
+
<noscript>You need to enable JavaScript to run this app.</noscript>
|
| 31 |
+
<div id="root"></div>
|
| 32 |
+
<!--
|
| 33 |
+
This HTML file is a template.
|
| 34 |
+
If you open it directly in the browser, you will see an empty page.
|
| 35 |
+
|
| 36 |
+
You can add webfonts, meta tags, or analytics to this file.
|
| 37 |
+
The build step will place the bundled scripts into the <body> tag.
|
| 38 |
+
|
| 39 |
+
To begin the development, run `npm start` or `yarn start`.
|
| 40 |
+
To create a production bundle, use `npm run build` or `yarn build`.
|
| 41 |
+
-->
|
| 42 |
+
</body>
|
| 43 |
+
</html>
|
phd-advisor-frontend/public/logo192.png
ADDED
|
Git LFS Details
|
phd-advisor-frontend/public/logo512.png
ADDED
|
Git LFS Details
|
phd-advisor-frontend/public/manifest.json
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"short_name": "React App",
|
| 3 |
+
"name": "Create React App Sample",
|
| 4 |
+
"icons": [
|
| 5 |
+
{
|
| 6 |
+
"src": "favicon.ico",
|
| 7 |
+
"sizes": "64x64 32x32 24x24 16x16",
|
| 8 |
+
"type": "image/x-icon"
|
| 9 |
+
},
|
| 10 |
+
{
|
| 11 |
+
"src": "logo192.png",
|
| 12 |
+
"type": "image/png",
|
| 13 |
+
"sizes": "192x192"
|
| 14 |
+
},
|
| 15 |
+
{
|
| 16 |
+
"src": "logo512.png",
|
| 17 |
+
"type": "image/png",
|
| 18 |
+
"sizes": "512x512"
|
| 19 |
+
}
|
| 20 |
+
],
|
| 21 |
+
"start_url": ".",
|
| 22 |
+
"display": "standalone",
|
| 23 |
+
"theme_color": "#000000",
|
| 24 |
+
"background_color": "#ffffff"
|
| 25 |
+
}
|
phd-advisor-frontend/public/robots.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# https://www.robotstxt.org/robotstxt.html
|
| 2 |
+
User-agent: *
|
| 3 |
+
Disallow:
|
phd-advisor-frontend/src/App.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import React, { useState } from 'react';
|
| 2 |
+
import HomePage from './pages/HomePage';
|
| 3 |
+
import ChatPage from './pages/ChatPage';
|
| 4 |
+
import './styles/components.css';
|
| 5 |
+
|
| 6 |
+
function App() {
|
| 7 |
+
const [currentView, setCurrentView] = useState('home');
|
| 8 |
+
|
| 9 |
+
const navigateToChat = () => {
|
| 10 |
+
setCurrentView('chat');
|
| 11 |
+
};
|
| 12 |
+
|
| 13 |
+
const navigateToHome = () => {
|
| 14 |
+
setCurrentView('home');
|
| 15 |
+
};
|
| 16 |
+
|
| 17 |
+
return (
|
| 18 |
+
<div className="App">
|
| 19 |
+
{currentView === 'home' ? (
|
| 20 |
+
<HomePage onNavigateToChat={navigateToChat} />
|
| 21 |
+
) : (
|
| 22 |
+
<ChatPage onNavigateToHome={navigateToHome} />
|
| 23 |
+
)}
|
| 24 |
+
</div>
|
| 25 |
+
);
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
export default App;
|
phd-advisor-frontend/src/App.test.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { render, screen } from '@testing-library/react';
|
| 2 |
+
import App from './App';
|
| 3 |
+
|
| 4 |
+
test('renders learn react link', () => {
|
| 5 |
+
render(<App />);
|
| 6 |
+
const linkElement = screen.getByText(/learn react/i);
|
| 7 |
+
expect(linkElement).toBeInTheDocument();
|
| 8 |
+
});
|
phd-advisor-frontend/src/components/AdvisorCard.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import React from 'react';
|
| 2 |
+
|
| 3 |
+
const AdvisorCard = ({ advisor }) => {
|
| 4 |
+
const Icon = advisor.icon;
|
| 5 |
+
|
| 6 |
+
return (
|
| 7 |
+
<div className="advisor-card">
|
| 8 |
+
<div
|
| 9 |
+
className="advisor-card-icon"
|
| 10 |
+
style={{ backgroundColor: advisor.bgColor }}
|
| 11 |
+
>
|
| 12 |
+
<Icon style={{ color: advisor.color }} />
|
| 13 |
+
</div>
|
| 14 |
+
<h3 className="advisor-card-title">{advisor.name}</h3>
|
| 15 |
+
<p
|
| 16 |
+
className="advisor-card-role"
|
| 17 |
+
style={{ color: advisor.color }}
|
| 18 |
+
>
|
| 19 |
+
{advisor.role}
|
| 20 |
+
</p>
|
| 21 |
+
<p className="advisor-card-description">{advisor.description}</p>
|
| 22 |
+
</div>
|
| 23 |
+
);
|
| 24 |
+
};
|
| 25 |
+
|
| 26 |
+
export default AdvisorCard;
|
phd-advisor-frontend/src/components/ChatInput.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import React, { useState } from 'react';
|
| 2 |
+
import { Send } from 'lucide-react';
|
| 3 |
+
|
| 4 |
+
const ChatInput = ({ onSendMessage, isLoading }) => {
|
| 5 |
+
const [inputMessage, setInputMessage] = useState('');
|
| 6 |
+
|
| 7 |
+
const handleSend = () => {
|
| 8 |
+
if (!inputMessage.trim() || isLoading) return;
|
| 9 |
+
|
| 10 |
+
onSendMessage(inputMessage);
|
| 11 |
+
setInputMessage('');
|
| 12 |
+
};
|
| 13 |
+
|
| 14 |
+
const handleKeyPress = (e) => {
|
| 15 |
+
if (e.key === 'Enter' && !e.shiftKey) {
|
| 16 |
+
e.preventDefault();
|
| 17 |
+
handleSend();
|
| 18 |
+
}
|
| 19 |
+
};
|
| 20 |
+
|
| 21 |
+
return (
|
| 22 |
+
<div className="input-area">
|
| 23 |
+
<div className="input-container">
|
| 24 |
+
<textarea
|
| 25 |
+
value={inputMessage}
|
| 26 |
+
onChange={(e) => setInputMessage(e.target.value)}
|
| 27 |
+
onKeyPress={handleKeyPress}
|
| 28 |
+
placeholder="Ask your advisors anything about your PhD journey..."
|
| 29 |
+
className="message-input"
|
| 30 |
+
rows="2"
|
| 31 |
+
disabled={isLoading}
|
| 32 |
+
/>
|
| 33 |
+
<button
|
| 34 |
+
onClick={handleSend}
|
| 35 |
+
disabled={!inputMessage.trim() || isLoading}
|
| 36 |
+
className="send-button"
|
| 37 |
+
>
|
| 38 |
+
<Send className="send-icon" />
|
| 39 |
+
<span className="send-text">Send</span>
|
| 40 |
+
</button>
|
| 41 |
+
</div>
|
| 42 |
+
</div>
|
| 43 |
+
);
|
| 44 |
+
};
|
| 45 |
+
|
| 46 |
+
export default ChatInput;
|
phd-advisor-frontend/src/components/MessageBubble.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import React from 'react';
|
| 2 |
+
import { advisors } from '../data/advisors';
|
| 3 |
+
|
| 4 |
+
const MessageBubble = ({ message }) => {
|
| 5 |
+
if (message.type === 'user') {
|
| 6 |
+
return (
|
| 7 |
+
<div className="user-message-container">
|
| 8 |
+
<div className="user-message">
|
| 9 |
+
<p>{message.content}</p>
|
| 10 |
+
</div>
|
| 11 |
+
</div>
|
| 12 |
+
);
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
if (message.type === 'advisor') {
|
| 16 |
+
const advisor = advisors[message.advisorId];
|
| 17 |
+
const Icon = advisor.icon;
|
| 18 |
+
|
| 19 |
+
return (
|
| 20 |
+
<div className="advisor-message-container">
|
| 21 |
+
<div
|
| 22 |
+
className="advisor-avatar"
|
| 23 |
+
style={{ backgroundColor: advisor.bgColor }}
|
| 24 |
+
>
|
| 25 |
+
<Icon style={{ color: advisor.color }} />
|
| 26 |
+
</div>
|
| 27 |
+
<div className="advisor-message-bubble">
|
| 28 |
+
<div className="advisor-message-header">
|
| 29 |
+
<h4
|
| 30 |
+
className="advisor-message-name"
|
| 31 |
+
style={{ color: advisor.color }}
|
| 32 |
+
>
|
| 33 |
+
{advisor.name}
|
| 34 |
+
</h4>
|
| 35 |
+
<span className="message-time">
|
| 36 |
+
{message.timestamp.toLocaleTimeString([], {
|
| 37 |
+
hour: '2-digit',
|
| 38 |
+
minute: '2-digit'
|
| 39 |
+
})}
|
| 40 |
+
</span>
|
| 41 |
+
</div>
|
| 42 |
+
<p className="advisor-message-text">{message.content}</p>
|
| 43 |
+
</div>
|
| 44 |
+
</div>
|
| 45 |
+
);
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
if (message.type === 'error') {
|
| 49 |
+
return (
|
| 50 |
+
<div className="error-message-container">
|
| 51 |
+
<div className="error-message">
|
| 52 |
+
<p>{message.content}</p>
|
| 53 |
+
</div>
|
| 54 |
+
</div>
|
| 55 |
+
);
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
return null;
|
| 59 |
+
};
|
| 60 |
+
|
| 61 |
+
export default MessageBubble;
|
phd-advisor-frontend/src/components/ThinkingIndicator.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import React from 'react';
|
| 2 |
+
import { advisors } from '../data/advisors';
|
| 3 |
+
|
| 4 |
+
const ThinkingIndicator = ({ advisorId }) => {
|
| 5 |
+
const advisor = advisors[advisorId];
|
| 6 |
+
const Icon = advisor.icon;
|
| 7 |
+
|
| 8 |
+
return (
|
| 9 |
+
<div className="thinking-container">
|
| 10 |
+
<div
|
| 11 |
+
className="advisor-avatar"
|
| 12 |
+
style={{ backgroundColor: advisor.bgColor }}
|
| 13 |
+
>
|
| 14 |
+
<Icon style={{ color: advisor.color }} />
|
| 15 |
+
</div>
|
| 16 |
+
<div className="thinking-bubble">
|
| 17 |
+
<div className="thinking-header">
|
| 18 |
+
<h4
|
| 19 |
+
className="advisor-name"
|
| 20 |
+
style={{ color: advisor.color }}
|
| 21 |
+
>
|
| 22 |
+
{advisor.name}
|
| 23 |
+
</h4>
|
| 24 |
+
</div>
|
| 25 |
+
<div className="thinking-dots">
|
| 26 |
+
<div
|
| 27 |
+
className="thinking-dot"
|
| 28 |
+
style={{
|
| 29 |
+
backgroundColor: advisor.color,
|
| 30 |
+
animationDelay: '0ms'
|
| 31 |
+
}}
|
| 32 |
+
></div>
|
| 33 |
+
<div
|
| 34 |
+
className="thinking-dot"
|
| 35 |
+
style={{
|
| 36 |
+
backgroundColor: advisor.color,
|
| 37 |
+
animationDelay: '150ms'
|
| 38 |
+
}}
|
| 39 |
+
></div>
|
| 40 |
+
<div
|
| 41 |
+
className="thinking-dot"
|
| 42 |
+
style={{
|
| 43 |
+
backgroundColor: advisor.color,
|
| 44 |
+
animationDelay: '300ms'
|
| 45 |
+
}}
|
| 46 |
+
></div>
|
| 47 |
+
</div>
|
| 48 |
+
<p className="thinking-text">thinking...</p>
|
| 49 |
+
</div>
|
| 50 |
+
</div>
|
| 51 |
+
);
|
| 52 |
+
};
|
| 53 |
+
|
| 54 |
+
export default ThinkingIndicator;
|
phd-advisor-frontend/src/data/advisors.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import { BookOpen, Target, Brain } from 'lucide-react';
|
| 2 |
+
|
| 3 |
+
export const advisors = {
|
| 4 |
+
methodist: {
|
| 5 |
+
name: 'Dr. Methodist',
|
| 6 |
+
role: 'Methodical Advisor',
|
| 7 |
+
color: '#3B82F6',
|
| 8 |
+
bgColor: '#EFF6FF',
|
| 9 |
+
icon: BookOpen,
|
| 10 |
+
description: 'Structured & Planning-focused'
|
| 11 |
+
},
|
| 12 |
+
theorist: {
|
| 13 |
+
name: 'Dr. Theorist',
|
| 14 |
+
role: 'Theoretical Advisor',
|
| 15 |
+
color: '#8B5CF6',
|
| 16 |
+
bgColor: '#F3E8FF',
|
| 17 |
+
icon: Brain,
|
| 18 |
+
description: 'Abstract & Conceptual'
|
| 19 |
+
},
|
| 20 |
+
pragmatist: {
|
| 21 |
+
name: 'Dr. Pragmatist',
|
| 22 |
+
role: 'Practical Advisor',
|
| 23 |
+
color: '#10B981',
|
| 24 |
+
bgColor: '#ECFDF5',
|
| 25 |
+
icon: Target,
|
| 26 |
+
description: 'Real-world & Outcome-focused'
|
| 27 |
+
}
|
| 28 |
+
};
|
phd-advisor-frontend/src/index.css
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Reset and base styles */
|
| 2 |
+
* {
|
| 3 |
+
box-sizing: border-box;
|
| 4 |
+
}
|
| 5 |
+
|
| 6 |
+
body {
|
| 7 |
+
margin: 0;
|
| 8 |
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
| 9 |
+
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
| 10 |
+
sans-serif;
|
| 11 |
+
-webkit-font-smoothing: antialiased;
|
| 12 |
+
-moz-osx-font-smoothing: grayscale;
|
| 13 |
+
}
|
phd-advisor-frontend/src/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import React from 'react';
|
| 2 |
+
import ReactDOM from 'react-dom/client';
|
| 3 |
+
import './index.css';
|
| 4 |
+
import App from './App';
|
| 5 |
+
import reportWebVitals from './reportWebVitals';
|
| 6 |
+
|
| 7 |
+
const root = ReactDOM.createRoot(document.getElementById('root'));
|
| 8 |
+
root.render(
|
| 9 |
+
<React.StrictMode>
|
| 10 |
+
<App />
|
| 11 |
+
</React.StrictMode>
|
| 12 |
+
);
|
| 13 |
+
|
| 14 |
+
// If you want to start measuring performance in your app, pass a function
|
| 15 |
+
// to log results (for example: reportWebVitals(console.log))
|
| 16 |
+
// or send to an analytics endpoint. Learn more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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import React, { useState, useEffect, useRef } from 'react';
|
| 2 |
+
import { Home, MessageCircle } from 'lucide-react';
|
| 3 |
+
import ChatInput from '../components/ChatInput';
|
| 4 |
+
import MessageBubble from '../components/MessageBubble';
|
| 5 |
+
import ThinkingIndicator from '../components/ThinkingIndicator';
|
| 6 |
+
import { advisors } from '../data/advisors';
|
| 7 |
+
|
| 8 |
+
const ChatPage = ({ onNavigateToHome }) => {
|
| 9 |
+
const [messages, setMessages] = useState([]);
|
| 10 |
+
const [isLoading, setIsLoading] = useState(false);
|
| 11 |
+
const [thinkingAdvisors, setThinkingAdvisors] = useState([]);
|
| 12 |
+
const messagesEndRef = useRef(null);
|
| 13 |
+
|
| 14 |
+
const scrollToBottom = () => {
|
| 15 |
+
messagesEndRef.current?.scrollIntoView({ behavior: 'smooth' });
|
| 16 |
+
};
|
| 17 |
+
|
| 18 |
+
useEffect(() => {
|
| 19 |
+
scrollToBottom();
|
| 20 |
+
}, [messages, thinkingAdvisors]);
|
| 21 |
+
|
| 22 |
+
const handleSendMessage = async (inputMessage) => {
|
| 23 |
+
const userMessage = {
|
| 24 |
+
type: 'user',
|
| 25 |
+
content: inputMessage,
|
| 26 |
+
timestamp: new Date()
|
| 27 |
+
};
|
| 28 |
+
|
| 29 |
+
setMessages(prev => [...prev, userMessage]);
|
| 30 |
+
setIsLoading(true);
|
| 31 |
+
|
| 32 |
+
// Show thinking indicators for all advisors
|
| 33 |
+
setThinkingAdvisors(['methodist', 'theorist', 'pragmatist']);
|
| 34 |
+
|
| 35 |
+
try {
|
| 36 |
+
const response = await fetch('http://localhost:8000/chat', {
|
| 37 |
+
method: 'POST',
|
| 38 |
+
headers: {
|
| 39 |
+
'Content-Type': 'application/json',
|
| 40 |
+
},
|
| 41 |
+
body: JSON.stringify({
|
| 42 |
+
user_input: inputMessage,
|
| 43 |
+
active_personas: ['methodist', 'theorist', 'pragmatist']
|
| 44 |
+
}),
|
| 45 |
+
});
|
| 46 |
+
|
| 47 |
+
if (!response.ok) {
|
| 48 |
+
throw new Error('Failed to send message');
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
const data = await response.json();
|
| 52 |
+
|
| 53 |
+
// Clear thinking indicators
|
| 54 |
+
setThinkingAdvisors([]);
|
| 55 |
+
|
| 56 |
+
// Add advisor responses with staggered timing for better UX
|
| 57 |
+
data.forEach((advisorResponse, index) => {
|
| 58 |
+
setTimeout(() => {
|
| 59 |
+
// Map the API persona names to our advisor IDs
|
| 60 |
+
let advisorId = 'methodist'; // default fallback
|
| 61 |
+
|
| 62 |
+
if (advisorResponse.persona.toLowerCase().includes('methodist')) {
|
| 63 |
+
advisorId = 'methodist';
|
| 64 |
+
} else if (advisorResponse.persona.toLowerCase().includes('theorist')) {
|
| 65 |
+
advisorId = 'theorist';
|
| 66 |
+
} else if (advisorResponse.persona.toLowerCase().includes('pragmatist')) {
|
| 67 |
+
advisorId = 'pragmatist';
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
const message = {
|
| 71 |
+
type: 'advisor',
|
| 72 |
+
advisorId,
|
| 73 |
+
content: advisorResponse.response,
|
| 74 |
+
timestamp: new Date()
|
| 75 |
+
};
|
| 76 |
+
|
| 77 |
+
setMessages(prev => [...prev, message]);
|
| 78 |
+
}, index * 800); // Stagger responses by 800ms
|
| 79 |
+
});
|
| 80 |
+
|
| 81 |
+
} catch (error) {
|
| 82 |
+
console.error('Error sending message:', error);
|
| 83 |
+
setThinkingAdvisors([]);
|
| 84 |
+
setMessages(prev => [...prev, {
|
| 85 |
+
type: 'error',
|
| 86 |
+
content: 'Sorry, there was an error processing your message. Please try again.',
|
| 87 |
+
timestamp: new Date()
|
| 88 |
+
}]);
|
| 89 |
+
} finally {
|
| 90 |
+
setIsLoading(false);
|
| 91 |
+
}
|
| 92 |
+
};
|
| 93 |
+
|
| 94 |
+
return (
|
| 95 |
+
<div className="chat-page">
|
| 96 |
+
{/* Header */}
|
| 97 |
+
<header className="chat-header">
|
| 98 |
+
<div className="chat-header-content">
|
| 99 |
+
<div className="chat-header-left">
|
| 100 |
+
<button
|
| 101 |
+
onClick={onNavigateToHome}
|
| 102 |
+
className="home-button"
|
| 103 |
+
>
|
| 104 |
+
<Home className="home-icon" />
|
| 105 |
+
</button>
|
| 106 |
+
<div>
|
| 107 |
+
<h1 className="chat-title">Advisory Panel Chat</h1>
|
| 108 |
+
<p className="chat-subtitle">Consulting with your three advisors</p>
|
| 109 |
+
</div>
|
| 110 |
+
</div>
|
| 111 |
+
<div className="advisor-indicators">
|
| 112 |
+
{Object.entries(advisors).map(([id, advisor]) => {
|
| 113 |
+
const Icon = advisor.icon;
|
| 114 |
+
return (
|
| 115 |
+
<div
|
| 116 |
+
key={id}
|
| 117 |
+
className="advisor-indicator"
|
| 118 |
+
style={{ backgroundColor: advisor.bgColor }}
|
| 119 |
+
>
|
| 120 |
+
<Icon style={{ color: advisor.color }} />
|
| 121 |
+
</div>
|
| 122 |
+
);
|
| 123 |
+
})}
|
| 124 |
+
</div>
|
| 125 |
+
</div>
|
| 126 |
+
</header>
|
| 127 |
+
|
| 128 |
+
{/* Chat Area */}
|
| 129 |
+
<div className="chat-container">
|
| 130 |
+
<div className="chat-box">
|
| 131 |
+
{/* Messages */}
|
| 132 |
+
<div className="messages-container">
|
| 133 |
+
{messages.length === 0 && (
|
| 134 |
+
<div className="empty-state">
|
| 135 |
+
<div className="empty-state-icon">
|
| 136 |
+
<MessageCircle />
|
| 137 |
+
</div>
|
| 138 |
+
<h3 className="empty-state-title">Start Your Consultation</h3>
|
| 139 |
+
<p className="empty-state-text">
|
| 140 |
+
Ask a question and get insights from all three advisors
|
| 141 |
+
</p>
|
| 142 |
+
</div>
|
| 143 |
+
)}
|
| 144 |
+
|
| 145 |
+
{messages.map((message, index) => (
|
| 146 |
+
<MessageBubble key={index} message={message} />
|
| 147 |
+
))}
|
| 148 |
+
|
| 149 |
+
{/* Thinking Indicators */}
|
| 150 |
+
{thinkingAdvisors.map(advisorId => (
|
| 151 |
+
<ThinkingIndicator key={advisorId} advisorId={advisorId} />
|
| 152 |
+
))}
|
| 153 |
+
|
| 154 |
+
<div ref={messagesEndRef} />
|
| 155 |
+
</div>
|
| 156 |
+
|
| 157 |
+
{/* Input Area */}
|
| 158 |
+
<ChatInput onSendMessage={handleSendMessage} isLoading={isLoading} />
|
| 159 |
+
</div>
|
| 160 |
+
</div>
|
| 161 |
+
</div>
|
| 162 |
+
);
|
| 163 |
+
};
|
| 164 |
+
|
| 165 |
+
export default ChatPage;
|
phd-advisor-frontend/src/pages/HomePage.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import React from 'react';
|
| 2 |
+
import { MessageCircle, Users, Target, Brain, ArrowRight } from 'lucide-react';
|
| 3 |
+
import AdvisorCard from '../components/AdvisorCard';
|
| 4 |
+
import { advisors } from '../data/advisors';
|
| 5 |
+
|
| 6 |
+
const HomePage = ({ onNavigateToChat }) => {
|
| 7 |
+
return (
|
| 8 |
+
<div className="homepage">
|
| 9 |
+
{/* Header */}
|
| 10 |
+
<header className="header">
|
| 11 |
+
<div className="header-content">
|
| 12 |
+
<div className="header-left">
|
| 13 |
+
<div className="logo-container">
|
| 14 |
+
<Users className="logo-icon" />
|
| 15 |
+
</div>
|
| 16 |
+
<div>
|
| 17 |
+
<h1 className="logo-title">PhD Advisory Panel</h1>
|
| 18 |
+
<p className="logo-subtitle">Your AI-powered academic advisors</p>
|
| 19 |
+
</div>
|
| 20 |
+
</div>
|
| 21 |
+
</div>
|
| 22 |
+
</header>
|
| 23 |
+
|
| 24 |
+
{/* Hero Section */}
|
| 25 |
+
<main className="main">
|
| 26 |
+
<div className="hero-section">
|
| 27 |
+
<h2 className="hero-title">
|
| 28 |
+
Get Guidance from <span className="hero-highlight">Three Expert Advisors</span>
|
| 29 |
+
</h2>
|
| 30 |
+
<p className="hero-subtitle">
|
| 31 |
+
Receive diverse perspectives on your PhD journey from our specialized AI advisors,
|
| 32 |
+
each bringing unique insights to help you succeed.
|
| 33 |
+
</p>
|
| 34 |
+
<button
|
| 35 |
+
onClick={onNavigateToChat}
|
| 36 |
+
className="cta-button"
|
| 37 |
+
>
|
| 38 |
+
<MessageCircle className="cta-icon" />
|
| 39 |
+
<span>Start Conversation</span>
|
| 40 |
+
<ArrowRight className="cta-arrow" />
|
| 41 |
+
</button>
|
| 42 |
+
</div>
|
| 43 |
+
|
| 44 |
+
{/* Advisors Grid */}
|
| 45 |
+
<div className="advisors-grid">
|
| 46 |
+
{Object.entries(advisors).map(([id, advisor]) => (
|
| 47 |
+
<AdvisorCard key={id} advisor={advisor} />
|
| 48 |
+
))}
|
| 49 |
+
</div>
|
| 50 |
+
|
| 51 |
+
{/* Features Section */}
|
| 52 |
+
<div className="features-section">
|
| 53 |
+
<h3 className="features-title">Why Choose Our Advisory Panel?</h3>
|
| 54 |
+
<div className="features-grid">
|
| 55 |
+
<div className="feature-card">
|
| 56 |
+
<div className="feature-icon">
|
| 57 |
+
<Users />
|
| 58 |
+
</div>
|
| 59 |
+
<h4 className="feature-title">Multiple Perspectives</h4>
|
| 60 |
+
<p className="feature-description">
|
| 61 |
+
Get varied viewpoints from different advisory styles
|
| 62 |
+
</p>
|
| 63 |
+
</div>
|
| 64 |
+
<div className="feature-card">
|
| 65 |
+
<div className="feature-icon">
|
| 66 |
+
<Brain />
|
| 67 |
+
</div>
|
| 68 |
+
<h4 className="feature-title">AI-Powered Insights</h4>
|
| 69 |
+
<p className="feature-description">
|
| 70 |
+
Leverage advanced AI for comprehensive guidance
|
| 71 |
+
</p>
|
| 72 |
+
</div>
|
| 73 |
+
<div className="feature-card">
|
| 74 |
+
<div className="feature-icon">
|
| 75 |
+
<Target />
|
| 76 |
+
</div>
|
| 77 |
+
<h4 className="feature-title">Focused Advice</h4>
|
| 78 |
+
<p className="feature-description">
|
| 79 |
+
Receive targeted recommendations for your specific needs
|
| 80 |
+
</p>
|
| 81 |
+
</div>
|
| 82 |
+
</div>
|
| 83 |
+
</div>
|
| 84 |
+
</main>
|
| 85 |
+
</div>
|
| 86 |
+
);
|
| 87 |
+
};
|
| 88 |
+
|
| 89 |
+
export default HomePage;
|
phd-advisor-frontend/src/reportWebVitals.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
const reportWebVitals = onPerfEntry => {
|
| 2 |
+
if (onPerfEntry && onPerfEntry instanceof Function) {
|
| 3 |
+
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
|
| 4 |
+
getCLS(onPerfEntry);
|
| 5 |
+
getFID(onPerfEntry);
|
| 6 |
+
getFCP(onPerfEntry);
|
| 7 |
+
getLCP(onPerfEntry);
|
| 8 |
+
getTTFB(onPerfEntry);
|
| 9 |
+
});
|
| 10 |
+
}
|
| 11 |
+
};
|
| 12 |
+
|
| 13 |
+
export default reportWebVitals;
|
phd-advisor-frontend/src/setupTests.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// jest-dom adds custom jest matchers for asserting on DOM nodes.
|
| 2 |
+
// allows you to do things like:
|
| 3 |
+
// expect(element).toHaveTextContent(/react/i)
|
| 4 |
+
// learn more: https://github.com/testing-library/jest-dom
|
| 5 |
+
import '@testing-library/jest-dom';
|
phd-advisor-frontend/src/styles/components.css
ADDED
|
@@ -0,0 +1,585 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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|
+
}
|
| 12 |
+
|
| 13 |
+
.header-content {
|
| 14 |
+
max-width: 1280px;
|
| 15 |
+
margin: 0 auto;
|
| 16 |
+
padding: 16px 24px;
|
| 17 |
+
display: flex;
|
| 18 |
+
align-items: center;
|
| 19 |
+
justify-content: space-between;
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
.header-left {
|
| 23 |
+
display: flex;
|
| 24 |
+
align-items: center;
|
| 25 |
+
gap: 12px;
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
.logo-container {
|
| 29 |
+
width: 40px;
|
| 30 |
+
height: 40px;
|
| 31 |
+
background: linear-gradient(135deg, #6366F1, #8B5CF6);
|
| 32 |
+
border-radius: 8px;
|
| 33 |
+
display: flex;
|
| 34 |
+
align-items: center;
|
| 35 |
+
justify-content: center;
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
.logo-icon {
|
| 39 |
+
width: 24px;
|
| 40 |
+
height: 24px;
|
| 41 |
+
color: #FFFFFF;
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
.logo-title {
|
| 45 |
+
font-size: 20px;
|
| 46 |
+
font-weight: bold;
|
| 47 |
+
color: #111827;
|
| 48 |
+
margin: 0;
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
.logo-subtitle {
|
| 52 |
+
font-size: 14px;
|
| 53 |
+
color: #6B7280;
|
| 54 |
+
margin: 0;
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
.main {
|
| 58 |
+
max-width: 1280px;
|
| 59 |
+
margin: 0 auto;
|
| 60 |
+
padding: 64px 24px;
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
.hero-section {
|
| 64 |
+
text-align: center;
|
| 65 |
+
margin-bottom: 64px;
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
.hero-title {
|
| 69 |
+
font-size: 48px;
|
| 70 |
+
font-weight: bold;
|
| 71 |
+
color: #111827;
|
| 72 |
+
margin-bottom: 24px;
|
| 73 |
+
line-height: 1.1;
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
.hero-highlight {
|
| 77 |
+
background: linear-gradient(135deg, #6366F1, #8B5CF6);
|
| 78 |
+
-webkit-background-clip: text;
|
| 79 |
+
-webkit-text-fill-color: transparent;
|
| 80 |
+
background-clip: text;
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
.hero-subtitle {
|
| 84 |
+
font-size: 20px;
|
| 85 |
+
color: #6B7280;
|
| 86 |
+
max-width: 768px;
|
| 87 |
+
margin: 0 auto 32px auto;
|
| 88 |
+
line-height: 1.6;
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
.cta-button {
|
| 92 |
+
display: inline-flex;
|
| 93 |
+
align-items: center;
|
| 94 |
+
gap: 12px;
|
| 95 |
+
background: linear-gradient(135deg, #6366F1, #8B5CF6);
|
| 96 |
+
color: #FFFFFF;
|
| 97 |
+
padding: 16px 32px;
|
| 98 |
+
border-radius: 12px;
|
| 99 |
+
font-size: 18px;
|
| 100 |
+
font-weight: 600;
|
| 101 |
+
border: none;
|
| 102 |
+
cursor: pointer;
|
| 103 |
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
|
| 104 |
+
transition: all 0.3s ease;
|
| 105 |
+
text-decoration: none;
|
| 106 |
+
}
|
| 107 |
+
|
| 108 |
+
.cta-button:hover {
|
| 109 |
+
transform: scale(1.05);
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
.cta-icon {
|
| 113 |
+
width: 24px;
|
| 114 |
+
height: 24px;
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
.cta-arrow {
|
| 118 |
+
width: 20px;
|
| 119 |
+
height: 20px;
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
/* Advisor Cards */
|
| 123 |
+
.advisors-grid {
|
| 124 |
+
display: grid;
|
| 125 |
+
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
| 126 |
+
gap: 32px;
|
| 127 |
+
margin-bottom: 64px;
|
| 128 |
+
}
|
| 129 |
+
|
| 130 |
+
.advisor-card {
|
| 131 |
+
background-color: #FFFFFF;
|
| 132 |
+
border-radius: 16px;
|
| 133 |
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
|
| 134 |
+
padding: 32px;
|
| 135 |
+
border: 1px solid #E5E7EB;
|
| 136 |
+
transition: box-shadow 0.3s ease;
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
.advisor-card:hover {
|
| 140 |
+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
.advisor-card-icon {
|
| 144 |
+
width: 64px;
|
| 145 |
+
height: 64px;
|
| 146 |
+
border-radius: 16px;
|
| 147 |
+
display: flex;
|
| 148 |
+
align-items: center;
|
| 149 |
+
justify-content: center;
|
| 150 |
+
margin-bottom: 24px;
|
| 151 |
+
}
|
| 152 |
+
|
| 153 |
+
.advisor-card-icon svg {
|
| 154 |
+
width: 32px;
|
| 155 |
+
height: 32px;
|
| 156 |
+
}
|
| 157 |
+
|
| 158 |
+
.advisor-card-title {
|
| 159 |
+
font-size: 24px;
|
| 160 |
+
font-weight: bold;
|
| 161 |
+
color: #111827;
|
| 162 |
+
margin-bottom: 8px;
|
| 163 |
+
}
|
| 164 |
+
|
| 165 |
+
.advisor-card-role {
|
| 166 |
+
font-weight: 500;
|
| 167 |
+
margin-bottom: 16px;
|
| 168 |
+
font-size: 16px;
|
| 169 |
+
}
|
| 170 |
+
|
| 171 |
+
.advisor-card-description {
|
| 172 |
+
color: #6B7280;
|
| 173 |
+
line-height: 1.6;
|
| 174 |
+
margin: 0;
|
| 175 |
+
}
|
| 176 |
+
|
| 177 |
+
/* Features Section */
|
| 178 |
+
.features-section {
|
| 179 |
+
background-color: #FFFFFF;
|
| 180 |
+
border-radius: 24px;
|
| 181 |
+
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
|
| 182 |
+
padding: 48px;
|
| 183 |
+
border: 1px solid #E5E7EB;
|
| 184 |
+
}
|
| 185 |
+
|
| 186 |
+
.features-title {
|
| 187 |
+
font-size: 32px;
|
| 188 |
+
font-weight: bold;
|
| 189 |
+
color: #111827;
|
| 190 |
+
text-align: center;
|
| 191 |
+
margin-bottom: 48px;
|
| 192 |
+
}
|
| 193 |
+
|
| 194 |
+
.features-grid {
|
| 195 |
+
display: grid;
|
| 196 |
+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
| 197 |
+
gap: 32px;
|
| 198 |
+
}
|
| 199 |
+
|
| 200 |
+
.feature-card {
|
| 201 |
+
text-align: center;
|
| 202 |
+
}
|
| 203 |
+
|
| 204 |
+
.feature-icon {
|
| 205 |
+
width: 48px;
|
| 206 |
+
height: 48px;
|
| 207 |
+
background-color: #EFF6FF;
|
| 208 |
+
border-radius: 12px;
|
| 209 |
+
display: flex;
|
| 210 |
+
align-items: center;
|
| 211 |
+
justify-content: center;
|
| 212 |
+
margin: 0 auto 16px auto;
|
| 213 |
+
}
|
| 214 |
+
|
| 215 |
+
.feature-icon svg {
|
| 216 |
+
width: 24px;
|
| 217 |
+
height: 24px;
|
| 218 |
+
color: #6366F1;
|
| 219 |
+
}
|
| 220 |
+
|
| 221 |
+
.feature-title {
|
| 222 |
+
font-weight: 600;
|
| 223 |
+
color: #111827;
|
| 224 |
+
margin-bottom: 8px;
|
| 225 |
+
font-size: 18px;
|
| 226 |
+
}
|
| 227 |
+
|
| 228 |
+
.feature-description {
|
| 229 |
+
color: #6B7280;
|
| 230 |
+
margin: 0;
|
| 231 |
+
line-height: 1.6;
|
| 232 |
+
}
|
| 233 |
+
|
| 234 |
+
/* Chat Page Styles */
|
| 235 |
+
.chat-page {
|
| 236 |
+
min-height: 100vh;
|
| 237 |
+
background-color: #F9FAFB;
|
| 238 |
+
}
|
| 239 |
+
|
| 240 |
+
.chat-header {
|
| 241 |
+
background-color: #FFFFFF;
|
| 242 |
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
| 243 |
+
border-bottom: 1px solid #E5E7EB;
|
| 244 |
+
position: sticky;
|
| 245 |
+
top: 0;
|
| 246 |
+
z-index: 10;
|
| 247 |
+
}
|
| 248 |
+
|
| 249 |
+
.chat-header-content {
|
| 250 |
+
max-width: 1024px;
|
| 251 |
+
margin: 0 auto;
|
| 252 |
+
padding: 16px 24px;
|
| 253 |
+
display: flex;
|
| 254 |
+
align-items: center;
|
| 255 |
+
justify-content: space-between;
|
| 256 |
+
}
|
| 257 |
+
|
| 258 |
+
.chat-header-left {
|
| 259 |
+
display: flex;
|
| 260 |
+
align-items: center;
|
| 261 |
+
gap: 12px;
|
| 262 |
+
}
|
| 263 |
+
|
| 264 |
+
.home-button {
|
| 265 |
+
padding: 8px;
|
| 266 |
+
background-color: transparent;
|
| 267 |
+
border: none;
|
| 268 |
+
border-radius: 8px;
|
| 269 |
+
cursor: pointer;
|
| 270 |
+
transition: background-color 0.2s ease;
|
| 271 |
+
}
|
| 272 |
+
|
| 273 |
+
.home-button:hover {
|
| 274 |
+
background-color: #F3F4F6;
|
| 275 |
+
}
|
| 276 |
+
|
| 277 |
+
.home-icon {
|
| 278 |
+
width: 20px;
|
| 279 |
+
height: 20px;
|
| 280 |
+
color: #6B7280;
|
| 281 |
+
}
|
| 282 |
+
|
| 283 |
+
.chat-title {
|
| 284 |
+
font-size: 18px;
|
| 285 |
+
font-weight: 600;
|
| 286 |
+
color: #111827;
|
| 287 |
+
margin: 0;
|
| 288 |
+
}
|
| 289 |
+
|
| 290 |
+
.chat-subtitle {
|
| 291 |
+
font-size: 14px;
|
| 292 |
+
color: #6B7280;
|
| 293 |
+
margin: 0;
|
| 294 |
+
}
|
| 295 |
+
|
| 296 |
+
.advisor-indicators {
|
| 297 |
+
display: flex;
|
| 298 |
+
align-items: center;
|
| 299 |
+
gap: 8px;
|
| 300 |
+
}
|
| 301 |
+
|
| 302 |
+
.advisor-indicator {
|
| 303 |
+
width: 32px;
|
| 304 |
+
height: 32px;
|
| 305 |
+
border-radius: 50%;
|
| 306 |
+
display: flex;
|
| 307 |
+
align-items: center;
|
| 308 |
+
justify-content: center;
|
| 309 |
+
}
|
| 310 |
+
|
| 311 |
+
.advisor-indicator svg {
|
| 312 |
+
width: 16px;
|
| 313 |
+
height: 16px;
|
| 314 |
+
}
|
| 315 |
+
|
| 316 |
+
/* Chat Container */
|
| 317 |
+
.chat-container {
|
| 318 |
+
max-width: 1024px;
|
| 319 |
+
margin: 0 auto;
|
| 320 |
+
padding: 24px;
|
| 321 |
+
}
|
| 322 |
+
|
| 323 |
+
.chat-box {
|
| 324 |
+
background-color: #FFFFFF;
|
| 325 |
+
border-radius: 16px;
|
| 326 |
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
|
| 327 |
+
height: calc(100vh - 200px);
|
| 328 |
+
display: flex;
|
| 329 |
+
flex-direction: column;
|
| 330 |
+
}
|
| 331 |
+
|
| 332 |
+
.messages-container {
|
| 333 |
+
flex: 1;
|
| 334 |
+
overflow-y: auto;
|
| 335 |
+
padding: 24px;
|
| 336 |
+
display: flex;
|
| 337 |
+
flex-direction: column;
|
| 338 |
+
gap: 16px;
|
| 339 |
+
}
|
| 340 |
+
|
| 341 |
+
/* Empty State */
|
| 342 |
+
.empty-state {
|
| 343 |
+
text-align: center;
|
| 344 |
+
padding: 48px 0;
|
| 345 |
+
}
|
| 346 |
+
|
| 347 |
+
.empty-state-icon {
|
| 348 |
+
width: 64px;
|
| 349 |
+
height: 64px;
|
| 350 |
+
background: linear-gradient(135deg, #6366F1, #8B5CF6);
|
| 351 |
+
border-radius: 16px;
|
| 352 |
+
display: flex;
|
| 353 |
+
align-items: center;
|
| 354 |
+
justify-content: center;
|
| 355 |
+
margin: 0 auto 16px auto;
|
| 356 |
+
}
|
| 357 |
+
|
| 358 |
+
.empty-state-icon svg {
|
| 359 |
+
width: 32px;
|
| 360 |
+
height: 32px;
|
| 361 |
+
color: #FFFFFF;
|
| 362 |
+
}
|
| 363 |
+
|
| 364 |
+
.empty-state-title {
|
| 365 |
+
font-size: 18px;
|
| 366 |
+
font-weight: 600;
|
| 367 |
+
color: #111827;
|
| 368 |
+
margin-bottom: 8px;
|
| 369 |
+
}
|
| 370 |
+
|
| 371 |
+
.empty-state-text {
|
| 372 |
+
color: #6B7280;
|
| 373 |
+
margin: 0;
|
| 374 |
+
}
|
| 375 |
+
|
| 376 |
+
/* Message Bubbles */
|
| 377 |
+
.user-message-container {
|
| 378 |
+
display: flex;
|
| 379 |
+
justify-content: flex-end;
|
| 380 |
+
margin-bottom: 16px;
|
| 381 |
+
}
|
| 382 |
+
|
| 383 |
+
.user-message {
|
| 384 |
+
background: linear-gradient(135deg, #6366F1, #8B5CF6);
|
| 385 |
+
color: #FFFFFF;
|
| 386 |
+
border-radius: 16px;
|
| 387 |
+
padding: 12px 24px;
|
| 388 |
+
max-width: 384px;
|
| 389 |
+
}
|
| 390 |
+
|
| 391 |
+
.user-message p {
|
| 392 |
+
margin: 0;
|
| 393 |
+
}
|
| 394 |
+
|
| 395 |
+
.advisor-message-container {
|
| 396 |
+
display: flex;
|
| 397 |
+
align-items: flex-start;
|
| 398 |
+
gap: 12px;
|
| 399 |
+
margin-bottom: 16px;
|
| 400 |
+
}
|
| 401 |
+
|
| 402 |
+
.advisor-avatar {
|
| 403 |
+
width: 40px;
|
| 404 |
+
height: 40px;
|
| 405 |
+
border-radius: 50%;
|
| 406 |
+
display: flex;
|
| 407 |
+
align-items: center;
|
| 408 |
+
justify-content: center;
|
| 409 |
+
flex-shrink: 0;
|
| 410 |
+
}
|
| 411 |
+
|
| 412 |
+
.advisor-avatar svg {
|
| 413 |
+
width: 20px;
|
| 414 |
+
height: 20px;
|
| 415 |
+
}
|
| 416 |
+
|
| 417 |
+
.advisor-message-bubble {
|
| 418 |
+
background-color: #FFFFFF;
|
| 419 |
+
border-radius: 12px;
|
| 420 |
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
| 421 |
+
border: 1px solid #E5E7EB;
|
| 422 |
+
padding: 16px;
|
| 423 |
+
max-width: 512px;
|
| 424 |
+
}
|
| 425 |
+
|
| 426 |
+
.advisor-message-header {
|
| 427 |
+
display: flex;
|
| 428 |
+
align-items: center;
|
| 429 |
+
gap: 8px;
|
| 430 |
+
margin-bottom: 8px;
|
| 431 |
+
}
|
| 432 |
+
|
| 433 |
+
.advisor-message-name {
|
| 434 |
+
font-weight: 500;
|
| 435 |
+
font-size: 14px;
|
| 436 |
+
}
|
| 437 |
+
|
| 438 |
+
.message-time {
|
| 439 |
+
font-size: 12px;
|
| 440 |
+
color: #9CA3AF;
|
| 441 |
+
}
|
| 442 |
+
|
| 443 |
+
.advisor-message-text {
|
| 444 |
+
color: #374151;
|
| 445 |
+
line-height: 1.6;
|
| 446 |
+
margin: 0;
|
| 447 |
+
}
|
| 448 |
+
|
| 449 |
+
/* Error Messages */
|
| 450 |
+
.error-message-container {
|
| 451 |
+
display: flex;
|
| 452 |
+
justify-content: center;
|
| 453 |
+
margin-bottom: 16px;
|
| 454 |
+
}
|
| 455 |
+
|
| 456 |
+
.error-message {
|
| 457 |
+
background-color: #FEF2F2;
|
| 458 |
+
border: 1px solid #FECACA;
|
| 459 |
+
color: #DC2626;
|
| 460 |
+
border-radius: 12px;
|
| 461 |
+
padding: 12px 16px;
|
| 462 |
+
max-width: 384px;
|
| 463 |
+
}
|
| 464 |
+
|
| 465 |
+
.error-message p {
|
| 466 |
+
margin: 0;
|
| 467 |
+
}
|
| 468 |
+
|
| 469 |
+
/* Thinking Indicators */
|
| 470 |
+
.thinking-container {
|
| 471 |
+
display: flex;
|
| 472 |
+
align-items: flex-start;
|
| 473 |
+
gap: 12px;
|
| 474 |
+
margin-bottom: 16px;
|
| 475 |
+
opacity: 0.8;
|
| 476 |
+
}
|
| 477 |
+
|
| 478 |
+
.thinking-bubble {
|
| 479 |
+
background-color: #FFFFFF;
|
| 480 |
+
border-radius: 12px;
|
| 481 |
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
| 482 |
+
border: 1px solid #E5E7EB;
|
| 483 |
+
padding: 16px;
|
| 484 |
+
max-width: 288px;
|
| 485 |
+
}
|
| 486 |
+
|
| 487 |
+
.thinking-header {
|
| 488 |
+
display: flex;
|
| 489 |
+
align-items: center;
|
| 490 |
+
gap: 8px;
|
| 491 |
+
margin-bottom: 8px;
|
| 492 |
+
}
|
| 493 |
+
|
| 494 |
+
.advisor-name {
|
| 495 |
+
font-weight: 500;
|
| 496 |
+
font-size: 14px;
|
| 497 |
+
margin: 0;
|
| 498 |
+
}
|
| 499 |
+
|
| 500 |
+
.thinking-dots {
|
| 501 |
+
display: flex;
|
| 502 |
+
gap: 4px;
|
| 503 |
+
}
|
| 504 |
+
|
| 505 |
+
.thinking-dot {
|
| 506 |
+
width: 8px;
|
| 507 |
+
height: 8px;
|
| 508 |
+
border-radius: 50%;
|
| 509 |
+
animation: bounce 1.4s ease-in-out infinite both;
|
| 510 |
+
}
|
| 511 |
+
|
| 512 |
+
.thinking-text {
|
| 513 |
+
font-size: 14px;
|
| 514 |
+
color: #6B7280;
|
| 515 |
+
margin-top: 4px;
|
| 516 |
+
margin-bottom: 0;
|
| 517 |
+
}
|
| 518 |
+
|
| 519 |
+
/* Chat Input */
|
| 520 |
+
.input-area {
|
| 521 |
+
border-top: 1px solid #E5E7EB;
|
| 522 |
+
padding: 16px;
|
| 523 |
+
}
|
| 524 |
+
|
| 525 |
+
.input-container {
|
| 526 |
+
display: flex;
|
| 527 |
+
gap: 16px;
|
| 528 |
+
}
|
| 529 |
+
|
| 530 |
+
.message-input {
|
| 531 |
+
flex: 1;
|
| 532 |
+
resize: none;
|
| 533 |
+
border: 1px solid #D1D5DB;
|
| 534 |
+
border-radius: 12px;
|
| 535 |
+
padding: 12px 16px;
|
| 536 |
+
font-size: 14px;
|
| 537 |
+
font-family: inherit;
|
| 538 |
+
outline: none;
|
| 539 |
+
transition: border-color 0.2s ease;
|
| 540 |
+
}
|
| 541 |
+
|
| 542 |
+
.message-input:focus {
|
| 543 |
+
border-color: #6366F1;
|
| 544 |
+
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
|
| 545 |
+
}
|
| 546 |
+
|
| 547 |
+
.send-button {
|
| 548 |
+
background: linear-gradient(135deg, #6366F1, #8B5CF6);
|
| 549 |
+
color: #FFFFFF;
|
| 550 |
+
padding: 12px 24px;
|
| 551 |
+
border-radius: 12px;
|
| 552 |
+
border: none;
|
| 553 |
+
font-weight: 500;
|
| 554 |
+
cursor: pointer;
|
| 555 |
+
transition: all 0.2s ease;
|
| 556 |
+
display: flex;
|
| 557 |
+
align-items: center;
|
| 558 |
+
gap: 8px;
|
| 559 |
+
}
|
| 560 |
+
|
| 561 |
+
.send-button:hover:not(:disabled) {
|
| 562 |
+
transform: translateY(-1px);
|
| 563 |
+
box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
|
| 564 |
+
}
|
| 565 |
+
|
| 566 |
+
.send-button:disabled {
|
| 567 |
+
opacity: 0.5;
|
| 568 |
+
cursor: not-allowed;
|
| 569 |
+
transform: none;
|
| 570 |
+
}
|
| 571 |
+
|
| 572 |
+
.send-icon {
|
| 573 |
+
width: 20px;
|
| 574 |
+
height: 20px;
|
| 575 |
+
}
|
| 576 |
+
|
| 577 |
+
.send-text {
|
| 578 |
+
display: none;
|
| 579 |
+
}
|
| 580 |
+
|
| 581 |
+
@media (min-width: 640px) {
|
| 582 |
+
.send-text {
|
| 583 |
+
display: inline;
|
| 584 |
+
}
|
| 585 |
+
}
|