From d421830fd2617f9bd8052a504d2be45db8fdc74a Mon Sep 17 00:00:00 2001 From: MLewkowicz Date: Mon, 15 Apr 2024 21:24:02 -0400 Subject: [PATCH] minor profile frontend changes --- backend/.elasticbeanstalk/config.yml | 18 +++++++++++++ deploy_frontend.sh | 5 ++++ frontend/src/app/page.module.css | 24 ++++++++++++----- frontend/src/app/profile_icon.png | Bin 0 -> 14671 bytes frontend/src/app/profiles.tsx | 39 ++++++++++++++++----------- 5 files changed, 64 insertions(+), 22 deletions(-) create mode 100644 backend/.elasticbeanstalk/config.yml create mode 100755 deploy_frontend.sh create mode 100755 frontend/src/app/profile_icon.png diff --git a/backend/.elasticbeanstalk/config.yml b/backend/.elasticbeanstalk/config.yml new file mode 100644 index 000000000..0be995fe8 --- /dev/null +++ b/backend/.elasticbeanstalk/config.yml @@ -0,0 +1,18 @@ +branch-defaults: + default: + environment: null + group_suffix: null +global: + application_name: bluebook-ai-backend + branch: null + default_ec2_keyname: bluebookai-server-key + default_platform: Python 3.8 running on 64bit Amazon Linux 2 + default_region: us-east-2 + include_git_submodules: true + instance_profile: null + platform_name: null + platform_version: null + profile: null + repository: null + sc: null + workspace_type: Application diff --git a/deploy_frontend.sh b/deploy_frontend.sh new file mode 100755 index 000000000..c8c6257d9 --- /dev/null +++ b/deploy_frontend.sh @@ -0,0 +1,5 @@ +echo "Deploying Frontend..." +cd frontend +export REACT_APP_API_URL=/api +npm run build +aws s3 sync out/ s3://bluebook-ai-frontend --acl public-read diff --git a/frontend/src/app/page.module.css b/frontend/src/app/page.module.css index 1c22bef19..9cef48973 100644 --- a/frontend/src/app/page.module.css +++ b/frontend/src/app/page.module.css @@ -84,10 +84,8 @@ padding: 1rem; margin-bottom: auto; font-size: 13px; - padding-bottom: 100px; } - .message { display: inline; flex-direction: column; @@ -292,11 +290,24 @@ .floatingProfileButton { position: fixed; bottom: 20px; - right: 90px; /* Adjust based on chat button placement */ - z-index: 1001; - /* additional styling */ + right: 70px; + width: 50px; + height: 50px; + padding: 10px 15px; + border-radius: 50%; + background-color: #468ff2; + background-image: url('profile_icon.png'); + background-repeat: no-repeat; + background-position: center; + background-size: 40%; + color: white; + border: none; + cursor: pointer; + box-shadow: 2px 2px 10px rgb(0 0 0 / 20%); + z-index: 1200; } + .profileContainer { position: fixed; bottom: 70px; /* Adjust based on your design */ @@ -306,7 +317,8 @@ box-shadow: 0 4px 6px rgba(0,0,0,0.1); transition: right 0.3s ease-in-out; /* More styles */ -} +} + .profileVisible { right: 10px; /* Adjust to make visible */ diff --git a/frontend/src/app/profile_icon.png b/frontend/src/app/profile_icon.png new file mode 100755 index 0000000000000000000000000000000000000000..27c1e557a50e8055b43cf76af0cba339a427060c GIT binary patch literal 14671 zcmbt*g;N|)wDsZv0t9z=cY?dSF77THG&n(mySuv+Yy-iAOK=j{#T|mX1-|{g_x^*g zYN~ejww<~?)7^9LIWd~*3K(c4XaE2JLrGCq8vuZZ-NFOjA;Nyl+{xSl03iY;St(s# z$Z3I3w%$^Ee=zUVtmR=(3>P21%{OWSysm2Q0S*Rv?p#?M+^^$tsGR5Y)Wb{+8p9k; z@eWp;*w*NBG4G=t@_*uRu&u&U5p-_B|JPuK<#%grM&O7t*oo97JQOLUI#t8|$7#mk zp(5>QUthr<+n$cNEqBosu`L9Xn`Z!Cvduxk^+{9KHL*Am%=4@@?Xk~OAT(vm!3_Ew z@6`<0lt^G&6*+pI*EY`KTOOf-l^#u5b%A;0Zw&w!8D#$4$x``}_hWb3v2v=GJUZF- zb?_1~$Fs4Vk7UDC>NZ^LZF;CFAXRIgv~1O8Fw4j*tXTxZd%F(^%rxf4_)^L_(|8P* z;2^mR1a!dD%~oKf8&7*XzPln4uU}5q!*A!Mv0)w%qS)OwMbZymovg z76QO(nhdtRC+2979}ee{?uB^M<&OrGRcp9@_8_8>46g;?pbqeYY=&#)XNU+JpraIP zup?g@#81<2-`&rvIuE2JHUK17!K~?p5GUDq+inL-NeXm8s@E0?M@1Hx1ltZ1*Ef9+ z;zT6R<-{G1nx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;64^w;yH+L z>K^lkH&d)bstqfl;%ezNlV6Wzn0Qxyk-kJ*(|n2KDhhpx|0vo$mR7i`Kn^0DNDcp( zx3x;R^)*iIcB4L1Ds+`ZLG6Jn2&_o-n-%{f z_Ok*c#rw7yQ9GwPBWDap?F3qL*aO~tNV}LL5njJjd=5okL?%hqpw0cl{L4YvQ+QS$ zO2nvpAtJ9+*$}CcN&wSAY@+^fVzu-g^@zM~gwg+%Mp`cfEz@0tQ{WAMG zVry=mA1q0smf8isJSa_3DLzUk{(&I{Ps2?LNBvnZ3L`K?N>owqJlEXw zOyL8*R^ZqY3;5ea5`a{lL-3M)t{^^YI=?*p^(B)ZhUBvNKl;4+bZ$8#eSBHLT{28U zqc9>b&==%Up6>45Gnrh<3nR)??lMGWqA|F2{HMB6r%uu;6<=1vOvj-p$-A44rU0X6 z6E}3GoG+*vV<3cpL??7*)cP0JKb-4Q+%nxMci4LJN@QUC|JvRcwc5ZT zx2|@}L*8iA^g4|wIwg8s;@Y)S_kJ_DpQVhnMCzU(ew=>f5l;#9wk59kCha^+)pG5B zk3{-4HaN62CdX?sE=V85$veaH4$B+lrwj(IMfgzzV7&q~lxg zC#R%A@#-5)+J&IL6F6N`2BwLv-!V1Yr-voPQgzt?hYJ}c`7`4&6QTwKsxY&7%U&-B z0U)r1yNV||^gT?j#uAo(L7kQ}B;xW1I1I~Qy{0IbBfHa7!L(`_AO2U8qIB{bIJ`^= zE1ORXeQ!k-k#bt0Ou!SNq-xs>6Qh;DlxoU22~6c!a(G&@rXbt-;`|6zdtuM)0eO&Z z{Bbkj1O3&JI;H { const [popupVisible, setPopupVisible] = useState(false); + const [chatHistoryVisible, setChatHistoryVisible] = useState(false); const [username, setUsername] = useState("JohnDoe"); const [email, setEmail] = useState("johndoe@example.com"); const [courses, setCourses] = useState([]); @@ -15,6 +16,10 @@ const ProfilePopup = () => { setPopupVisible(!popupVisible); }; + const toggleChatHistory = () => { + setChatHistoryVisible(!chatHistoryVisible); + }; + const handleSaveProfile = async () => { const response = await fetch('/api/save_profile', { method: 'POST', @@ -43,12 +48,9 @@ const ProfilePopup = () => { const reloadChat = async (chatId: number) => { console.log(`Reloading chat with ID: ${chatId}`); - // Simulate fetching chat data from a backend const response = await fetch(`/api/reload_chat/${chatId}`); if (response.ok) { const data = await response.json(); - // Assuming you have a state for the current chat display: - // setCurrentChat(data.chatContent); console.log("Chat reloaded:", data.chatContent); } else { console.error("Failed to reload chat"); @@ -63,11 +65,12 @@ const ProfilePopup = () => { return ( <> {popupVisible && (
+ +
User Profile
setUsername(e.target.value)} placeholder="Username" /> @@ -79,20 +82,24 @@ const ProfilePopup = () => { {courses.map(course =>
{course}
)}
-
-
Chat History
-
- {chatHistories.map(history => ( -
- {history.summary} - -
- ))} -
-
)} + + {chatHistoryVisible && ( +
+
Chat History
+
+ {chatHistories.map(history => ( +
+ {history.summary} + +
+ ))} +
+ +
+ )} ); };