Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Administrator
/
chatgpt.ai-pro.org
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
3
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
b14db9b8
authored
2023-02-07 19:28:34 +0800
by
RSA
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix
1 parent
0a4a261d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
client/src/App.js
client/src/color_theme_1.css
client/src/App.js
View file @
b14db9b
...
...
@@ -71,6 +71,7 @@ function App() {
// fetch response to the api combining the chat log array of messages and seinding it as a message to localhost:3000 as a post
const
messages
=
chatLogNew
.
map
((
message
)
=>
message
.
message
).
join
(
"\n"
)
try
{
const
response
=
await
fetch
(
process
.
env
.
REACT_APP_SERVER_URL
+
"/api"
,
{
method
:
"POST"
,
headers
:
{
...
...
@@ -103,6 +104,11 @@ function App() {
// setChatLog([...chatLogNew, { user: "gpt", message: `<div>${parsedData}</div>`} ])
var
scrollToTheBottomChatLog
=
document
.
getElementsByClassName
(
"chat-log"
)[
0
];
scrollToTheBottomChatLog
.
scrollTop
=
scrollToTheBottomChatLog
.
scrollHeight
;
}
catch
(
error
)
{
const
errorMsg
=
"We are currently experiencing heavy flow as of the moment, please try again."
;
setChatLog
([...
chatLogNew
,
{
user
:
"gpt"
,
message
:
`<div class="errormsg">
${
errorMsg
}
</div>`
}
])
// res.status(500).send(error || 'Something went wrong');
}
}
function
handleTemp
(
temp
)
{
...
...
client/src/color_theme_1.css
View file @
b14db9b
...
...
@@ -2,6 +2,13 @@
background-color
:
#101827
!important
;
}
.errormsg
{
border
:
1px
solid
red
;
padding
:
15px
25px
;
border-radius
:
10px
;
background
:
rgb
(
255
0
0
/
15%
);
}
.side-menu-button
{
border
:
0
solid
white
;
/* Permalink - use to edit and share this gradient: https://colorzilla.com/gradient-editor/#cedbe9+0,aac5de+17,6199c7+50,3a84c3+51,419ad6+59,4bb8f0+71,3a8bc2+84,26558b+100;Blue+Gloss */
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment