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
66b0151d
authored
2023-09-01 14:27:15 +0800
by
Ian Rizh Mañago
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch '28225_not_loading' of
https://gitlab.baytech.ph/baytech/chatgpt.ai-pro.org
into 1DEVT
2 parents
e7c86cd9
452ab7ca
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
49 deletions
client/public/index.html
client/src/App.js
client/src/index.css
client/public/index.html
View file @
66b0151
...
...
@@ -26,32 +26,11 @@
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>
AI-Pro ChatGPT
</title>
<script
src=
'%REACT_APP_BTCOMPONENT_S3_URL%/common/btutil-authenticate.min.js'
></script>
<script>
let
aiUser
=
btutil_getCookie
(
'aiwp_logged_in'
);
if
(
!
aiUser
)
{
window
.
location
.
href
=
'%REACT_APP_AUTH_FAILED_REDIRECTION_URL%'
;
}
else
{
let
objBody
=
{
aiwp_logged_in
:
aiUser
};
let
params
=
[];
params
[
'objBody'
]
=
objBody
;
params
[
'strUrl'
]
=
'%REACT_APP_EXTERNAL_API_URL%/e/v1/authenticate/'
;
btutil_checkAuthentication
(
params
,
cbCheckAuthentication
,
cbErrCheckAuthentication
);
function
cbCheckAuthentication
(
res
)
{
// console.log(res);
if
(
!
res
.
success
)
{
window
.
location
.
href
=
'%REACT_APP_AUTH_FAILED_REDIRECTION_URL%'
;
}
else
{
document
.
getElementById
(
"root"
).
classList
.
add
(
"active"
);
}
}
function
cbErrCheckAuthentication
(
res
)
{
console
.
log
(
res
);
}
}
let
ver
=
new
Date
().
getTime
();
let
btutilAsset
=
document
.
createElement
(
'script'
);
btutilAsset
.
setAttribute
(
'src'
,
"%REACT_APP_BTUTIL_ASSET_URL%"
+
ver
);
document
.
head
.
appendChild
(
btutilAsset
);
</script>
</head>
<body>
...
...
client/src/App.js
View file @
66b0151
...
...
@@ -56,26 +56,7 @@ function App() {
}
async
function
handleSubmit
(
e
){
e
.
preventDefault
();
let
aiUser
=
window
.
btutil_getCookie
(
'aiwp_logged_in'
);
if
(
!
aiUser
)
{
window
.
location
.
href
=
process
.
env
.
REACT_APP_AUTH_FAILED_REDIRECTION_URL
;
return
;
}
else
{
let
objBody
=
{
aiwp_logged_in
:
aiUser
};
let
params
=
[];
params
[
'objBody'
]
=
objBody
;
params
[
'strUrl'
]
=
process
.
env
.
REACT_APP_EXTERNAL_API_URL
+
'/e/v1/authenticate/'
;
window
.
btutil_checkAuthentication
(
params
,
function
(
res
)
{
if
(
!
res
.
success
)
{
window
.
location
.
href
=
process
.
env
.
REACT_APP_AUTH_FAILED_REDIRECTION_URL
;
}
else
{
submitPrompt
();
}
},
function
(
res
)
{});
}
submitPrompt
();
}
async
function
submitPrompt
()
{
...
...
client/src/index.css
View file @
66b0151
...
...
@@ -10,8 +10,4 @@ body {
code
{
font-family
:
source-code-pro
,
Menlo
,
Monaco
,
Consolas
,
'Courier New'
,
monospace
;
}
#root
:not
(
.active
)
{
display
:
none
;
}
\ No newline at end of file
...
...
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