-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
49 lines (47 loc) · 1.52 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/imgs/bot.webp" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Montserrat&display=swap"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.2/css/all.min.css"
integrity="sha512-z3gLpd7yknf1YoNbCzqRKc4qyor8gaKU1qmn+CShxbuBusANI9QpRohGBreCFkKxLhei6S9CQXFEbbKuqLg0DA=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
<title>ChatGPT</title>
</head>
<body class="dark:bg-[#343541]">
<div id="root"></div>
<div id="modal"></div>
<script type="module" src="/src/main.tsx"></script>
<script>
// Session management script
document.addEventListener("DOMContentLoaded", function() {
// Check if the user is logged in
function isLoggedIn() {
return localStorage.getItem("userLoggedIn") === "true";
}
// Redirect to login page
function redirectToLogin() {
window.location.href = "/login.html";
}
// Check for a new session
if (!isLoggedIn()) {
redirectToLogin();
} else {
// Optional: Update session information or do something else
console.log("User is already logged in.");
}
});
</script>
</body>
</html>