Spaces:
Running
Running
Commit
·
784b5c6
1
Parent(s):
5649a75
v0.0.2 Debug
Browse files- .gitattributes +2 -0
- frontend/app/assets/logo-cropped.jpg +3 -0
- frontend/app/assets/logo.jpg +3 -0
- frontend/app/assets/logo2-cropped.jpg +3 -0
- frontend/app/assets/logo2.jpg +3 -0
- frontend/app/assets/logo3-cropped.jpg +3 -0
- frontend/app/assets/logo3.jpg +3 -0
- frontend/app/assets/logo4-cropped.jpg +3 -0
- frontend/app/assets/logo4.jpg +3 -0
- frontend/app/assets/logo5-cropped.jpg +3 -0
- frontend/app/assets/logo6-cropped.jpg +3 -0
- frontend/app/assets/logo7-cropped.jpg +3 -0
- frontend/app/assets/logo7.jpg +3 -0
- frontend/app/assets/logo8-cropped.jpg +3 -0
- frontend/app/assets/logo8.jpg +3 -0
- frontend/app/components/NexusAuth.css +10 -10
- frontend/app/components/NexusAuth.js +2 -2
- frontend/app/components/Sidebar.js +112 -0
- frontend/app/components/SplashScreen.js +66 -11
- frontend/app/globals.css +8 -163
- frontend/app/layout.js +53 -21
- frontend/app/lib/config.js +4 -2
- frontend/app/page.js +10 -35
- frontend/app/page.module.css +0 -168
- frontend/app/settings/page.js +5 -0
- frontend/app/support/page.js +5 -0
.gitattributes
CHANGED
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
*.jpg filter=lfs diff=lfs merge=lfs -text
|
37 |
+
*.png filter=lfs diff=lfs merge=lfs -text
|
frontend/app/assets/logo-cropped.jpg
ADDED
![]() |
Git LFS Details
|
frontend/app/assets/logo.jpg
ADDED
![]() |
Git LFS Details
|
frontend/app/assets/logo2-cropped.jpg
ADDED
![]() |
Git LFS Details
|
frontend/app/assets/logo2.jpg
ADDED
![]() |
Git LFS Details
|
frontend/app/assets/logo3-cropped.jpg
ADDED
![]() |
Git LFS Details
|
frontend/app/assets/logo3.jpg
ADDED
![]() |
Git LFS Details
|
frontend/app/assets/logo4-cropped.jpg
ADDED
![]() |
Git LFS Details
|
frontend/app/assets/logo4.jpg
ADDED
![]() |
Git LFS Details
|
frontend/app/assets/logo5-cropped.jpg
ADDED
![]() |
Git LFS Details
|
frontend/app/assets/logo6-cropped.jpg
ADDED
![]() |
Git LFS Details
|
frontend/app/assets/logo7-cropped.jpg
ADDED
![]() |
Git LFS Details
|
frontend/app/assets/logo7.jpg
ADDED
![]() |
Git LFS Details
|
frontend/app/assets/logo8-cropped.jpg
ADDED
![]() |
Git LFS Details
|
frontend/app/assets/logo8.jpg
ADDED
![]() |
Git LFS Details
|
frontend/app/components/NexusAuth.css
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
/* Container Styling */
|
2 |
.nexus-auth-form {
|
3 |
max-width: 400px;
|
4 |
-
margin:
|
5 |
-
padding:
|
6 |
border: none;
|
7 |
border-radius: 12px;
|
8 |
background: linear-gradient(145deg, var(--accent), var(--secondary));
|
@@ -13,24 +13,24 @@
|
|
13 |
/* Header Styling */
|
14 |
.nexus-auth-form h2 {
|
15 |
text-align: center;
|
16 |
-
margin-bottom:
|
17 |
color: var(--foreground);
|
18 |
-
font-size: 1.
|
19 |
font-weight: 600;
|
20 |
letter-spacing: 1px;
|
21 |
text-transform: uppercase;
|
22 |
border-bottom: 2px solid var(--primary);
|
23 |
-
padding-bottom:
|
24 |
}
|
25 |
|
26 |
/* Form Group Styling */
|
27 |
.form-group {
|
28 |
-
margin-bottom:
|
29 |
}
|
30 |
|
31 |
.form-group label {
|
32 |
display: block;
|
33 |
-
margin-bottom:
|
34 |
color: var(--foreground);
|
35 |
font-size: 1rem;
|
36 |
font-weight: 500;
|
@@ -39,7 +39,7 @@
|
|
39 |
|
40 |
.form-group input {
|
41 |
width: 100%;
|
42 |
-
padding:
|
43 |
background-color: var(--secondary);
|
44 |
color: var(--foreground);
|
45 |
border: 2px solid var(--primary);
|
@@ -158,8 +158,8 @@
|
|
158 |
|
159 |
@media (max-width: 480px) {
|
160 |
.nexus-auth-form {
|
161 |
-
padding:
|
162 |
-
max-width:
|
163 |
}
|
164 |
|
165 |
.nexus-auth-form h2 {
|
|
|
1 |
/* Container Styling */
|
2 |
.nexus-auth-form {
|
3 |
max-width: 400px;
|
4 |
+
margin: 10px auto;
|
5 |
+
padding: 20px;
|
6 |
border: none;
|
7 |
border-radius: 12px;
|
8 |
background: linear-gradient(145deg, var(--accent), var(--secondary));
|
|
|
13 |
/* Header Styling */
|
14 |
.nexus-auth-form h2 {
|
15 |
text-align: center;
|
16 |
+
margin-bottom: 10px;
|
17 |
color: var(--foreground);
|
18 |
+
font-size: 1.4rem;
|
19 |
font-weight: 600;
|
20 |
letter-spacing: 1px;
|
21 |
text-transform: uppercase;
|
22 |
border-bottom: 2px solid var(--primary);
|
23 |
+
padding-bottom: 5px;
|
24 |
}
|
25 |
|
26 |
/* Form Group Styling */
|
27 |
.form-group {
|
28 |
+
margin-bottom: 5px;
|
29 |
}
|
30 |
|
31 |
.form-group label {
|
32 |
display: block;
|
33 |
+
margin-bottom: 5px;
|
34 |
color: var(--foreground);
|
35 |
font-size: 1rem;
|
36 |
font-weight: 500;
|
|
|
39 |
|
40 |
.form-group input {
|
41 |
width: 100%;
|
42 |
+
padding: 10px;
|
43 |
background-color: var(--secondary);
|
44 |
color: var(--foreground);
|
45 |
border: 2px solid var(--primary);
|
|
|
158 |
|
159 |
@media (max-width: 480px) {
|
160 |
.nexus-auth-form {
|
161 |
+
padding: 10px;
|
162 |
+
max-width: 90%;
|
163 |
}
|
164 |
|
165 |
.nexus-auth-form h2 {
|
frontend/app/components/NexusAuth.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
'use client';
|
2 |
import './NexusAuth.css';
|
3 |
import { useState, useEffect } from 'react';
|
4 |
-
import NexusAuthApi from '
|
5 |
-
import SplashScreen from '
|
6 |
import { CheckCircleIcon} from '@heroicons/react/20/solid';
|
7 |
|
8 |
const SignupForm = ({ onSignup }) => {
|
|
|
1 |
'use client';
|
2 |
import './NexusAuth.css';
|
3 |
import { useState, useEffect } from 'react';
|
4 |
+
import NexusAuthApi from '@/app/lib/Nexus_Auth_API';
|
5 |
+
import SplashScreen from '@/app/components/SplashScreen';
|
6 |
import { CheckCircleIcon} from '@heroicons/react/20/solid';
|
7 |
|
8 |
const SignupForm = ({ onSignup }) => {
|
frontend/app/components/Sidebar.js
ADDED
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
'use client';
|
2 |
+
import { VERSION } from "@/app/lib/config";
|
3 |
+
import { Bars3Icon, UserCircleIcon, Cog6ToothIcon, QuestionMarkCircleIcon } from "@heroicons/react/20/solid";
|
4 |
+
import Link from "next/link";
|
5 |
+
import Image from "next/image";
|
6 |
+
import logo from "@/app/assets/logo8-cropped.jpg";
|
7 |
+
|
8 |
+
export default function Sidebar({ isCollapsed, toggleSidebar }) {
|
9 |
+
const logoStyle = {
|
10 |
+
width: isCollapsed ? "60px" : "100px",
|
11 |
+
height: isCollapsed ? "60px" : "100px",
|
12 |
+
borderRadius: "50px",
|
13 |
+
transition: "width 0.3s ease, height 0.3s ease",
|
14 |
+
};
|
15 |
+
|
16 |
+
const sidebarStyle = {
|
17 |
+
width: "180px",
|
18 |
+
left: isCollapsed ? "-180px" : "0",
|
19 |
+
backgroundColor: "var(--sidebar-background)",
|
20 |
+
color: "var(--foreground)",
|
21 |
+
padding: isCollapsed ? "15px" : "30px",
|
22 |
+
position: "fixed",
|
23 |
+
height: "100vh",
|
24 |
+
display: "flex",
|
25 |
+
flexDirection: "column",
|
26 |
+
borderRight: "1px solid rgba(255, 255, 255, 0.1)",
|
27 |
+
transition: "left 0.3s ease, width 0.3s ease, padding 0.3s ease",
|
28 |
+
zIndex: 10,
|
29 |
+
};
|
30 |
+
|
31 |
+
const versionStyle = {
|
32 |
+
color: "var(--hover-accent)",
|
33 |
+
fontSize: isCollapsed ? "0.6em" : "0.9em",
|
34 |
+
marginTop: "20px",
|
35 |
+
textAlign: "end",
|
36 |
+
};
|
37 |
+
|
38 |
+
const navLinkStyle = {
|
39 |
+
display: "flex",
|
40 |
+
alignItems: "center",
|
41 |
+
gap: "5px",
|
42 |
+
padding: "10px 5px",
|
43 |
+
transition: "all 0.3s ease",
|
44 |
+
color: "var(--foreground)",
|
45 |
+
fontSize: "1.2em",
|
46 |
+
};
|
47 |
+
|
48 |
+
const textStyle = {
|
49 |
+
opacity: isCollapsed ? 0 : 1,
|
50 |
+
transition: "opacity 0.3s ease",
|
51 |
+
pointerEvents: isCollapsed ? "none" : "auto",
|
52 |
+
};
|
53 |
+
|
54 |
+
const iconStyle = {
|
55 |
+
width: "30px",
|
56 |
+
height: "30px",
|
57 |
+
flexShrink: 0,
|
58 |
+
};
|
59 |
+
|
60 |
+
const toggleButtonStyle = {
|
61 |
+
position: "absolute",
|
62 |
+
top: "20px",
|
63 |
+
right: isCollapsed ? "-50px" : "10px",
|
64 |
+
width: "35px",
|
65 |
+
height: "35px",
|
66 |
+
backgroundColor: "var(--button-background)",
|
67 |
+
color: "var(--foreground)",
|
68 |
+
border: "none",
|
69 |
+
borderRadius: "10px",
|
70 |
+
cursor: "pointer",
|
71 |
+
display: "flex",
|
72 |
+
alignItems: "center",
|
73 |
+
justifyContent: "center",
|
74 |
+
boxShadow: "0 2px 5px rgba(0, 0, 0, 0.2)",
|
75 |
+
transition: "background-color 0.3s ease, right 0.3s ease",
|
76 |
+
};
|
77 |
+
|
78 |
+
return (
|
79 |
+
<div style={sidebarStyle}>
|
80 |
+
<div className="logo-container" style={{ display: "flex", flexDirection: "column", alignItems: "center" }}>
|
81 |
+
<Image style={logoStyle} src={logo} alt="App Logo" />
|
82 |
+
<sup style={versionStyle}>{VERSION}</sup>
|
83 |
+
<button
|
84 |
+
style={toggleButtonStyle}
|
85 |
+
onClick={toggleSidebar}
|
86 |
+
>
|
87 |
+
<Bars3Icon style={{transform: `rotate(${isCollapsed ? 0 : 90}deg)`, transition: 'transform .3s', width: '20px' }} />
|
88 |
+
</button>
|
89 |
+
</div>
|
90 |
+
<ul className="nav-links" style={{ listStyleType: "none", marginTop: "20px", paddingLeft: "0" }}>
|
91 |
+
<li>
|
92 |
+
<Link href="/" style={navLinkStyle}>
|
93 |
+
<UserCircleIcon style={iconStyle} />
|
94 |
+
<span style={textStyle}>Profile</span>
|
95 |
+
</Link>
|
96 |
+
</li>
|
97 |
+
<li>
|
98 |
+
<Link href="/settings" style={navLinkStyle}>
|
99 |
+
<Cog6ToothIcon style={iconStyle} />
|
100 |
+
<span style={textStyle}>Settings</span>
|
101 |
+
</Link>
|
102 |
+
</li>
|
103 |
+
<li>
|
104 |
+
<Link href="/support" style={navLinkStyle}>
|
105 |
+
<QuestionMarkCircleIcon style={iconStyle} />
|
106 |
+
<span style={textStyle}>Support</span>
|
107 |
+
</Link>
|
108 |
+
</li>
|
109 |
+
</ul>
|
110 |
+
</div>
|
111 |
+
);
|
112 |
+
}
|
frontend/app/components/SplashScreen.js
CHANGED
@@ -1,21 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
1 |
const SplashScreen = () => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
const splashScreenStyle = {
|
3 |
-
display:
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
fontFamily: '
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
};
|
13 |
|
14 |
return (
|
15 |
<div style={splashScreenStyle}>
|
16 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
</div>
|
18 |
);
|
19 |
};
|
20 |
|
21 |
-
export default SplashScreen;
|
|
|
1 |
+
'use client';
|
2 |
+
import logo from "@/app/assets/logo3.jpg";
|
3 |
+
import Image from "next/image";
|
4 |
+
import { useEffect, useState } from "react";
|
5 |
+
|
6 |
const SplashScreen = () => {
|
7 |
+
const [loadingMessage, setLoadingMessage] = useState("Initializing...");
|
8 |
+
|
9 |
+
useEffect(() => {
|
10 |
+
// Optionally update the loading message over time
|
11 |
+
const messages = ["Warming up engines...", "Fetching data...", "Almost ready!"];
|
12 |
+
let index = 0;
|
13 |
+
const interval = setInterval(() => {
|
14 |
+
setLoadingMessage(messages[index]);
|
15 |
+
index = (index + 1) % messages.length;
|
16 |
+
}, 1500);
|
17 |
+
|
18 |
+
return () => clearInterval(interval);
|
19 |
+
}, []);
|
20 |
+
|
21 |
const splashScreenStyle = {
|
22 |
+
display: "flex",
|
23 |
+
flexDirection: "column",
|
24 |
+
justifyContent: "center",
|
25 |
+
alignItems: "center",
|
26 |
+
height: "100vh",
|
27 |
+
width: "100vw",
|
28 |
+
backgroundColor: "var(--background)",
|
29 |
+
color: "white",
|
30 |
+
fontFamily: "'Poppins', sans-serif",
|
31 |
+
animation: "fadeIn 1.5s ease-in-out",
|
32 |
+
};
|
33 |
+
|
34 |
+
const logoStyle = {
|
35 |
+
width: "120px",
|
36 |
+
height: "120px",
|
37 |
+
marginBottom: "1rem",
|
38 |
+
borderRadius: "50%",
|
39 |
+
animation: "pulse 2s infinite",
|
40 |
+
};
|
41 |
+
|
42 |
+
const messageStyle = {
|
43 |
+
fontSize: "1.2rem",
|
44 |
+
fontWeight: "400",
|
45 |
+
textAlign: "center",
|
46 |
+
opacity: 0.8,
|
47 |
};
|
48 |
|
49 |
return (
|
50 |
<div style={splashScreenStyle}>
|
51 |
+
<Image style={logoStyle} src={logo} alt="App Logo" />
|
52 |
+
<p style={messageStyle}>{loadingMessage}</p>
|
53 |
+
<style jsx>{`
|
54 |
+
@keyframes fadeIn {
|
55 |
+
from {
|
56 |
+
opacity: 0;
|
57 |
+
}
|
58 |
+
to {
|
59 |
+
opacity: 1;
|
60 |
+
}
|
61 |
+
}
|
62 |
+
|
63 |
+
@keyframes pulse {
|
64 |
+
0%, 100% {
|
65 |
+
transform: scale(1);
|
66 |
+
}
|
67 |
+
50% {
|
68 |
+
transform: scale(1.1);
|
69 |
+
}
|
70 |
+
}
|
71 |
+
`}</style>
|
72 |
</div>
|
73 |
);
|
74 |
};
|
75 |
|
76 |
+
export default SplashScreen;
|
frontend/app/globals.css
CHANGED
@@ -3,8 +3,9 @@
|
|
3 |
@tailwind utilities;
|
4 |
|
5 |
:root {
|
6 |
-
--background: #
|
7 |
--foreground: #E0E0E0; /* Light gray text */
|
|
|
8 |
--primary: #1F1F2A; /* Darker primary for sidebar */
|
9 |
--secondary: #2A2A3B; /* Soft secondary background for content */
|
10 |
--accent: #4a4a7f;
|
@@ -35,185 +36,29 @@ body {
|
|
35 |
margin: 0;
|
36 |
}
|
37 |
|
38 |
-
a {
|
39 |
-
text-decoration: none;
|
40 |
-
color: inherit;
|
41 |
-
}
|
42 |
-
|
43 |
-
a:hover {
|
44 |
-
text-decoration: underline;
|
45 |
-
}
|
46 |
-
|
47 |
-
/* Sidebar */
|
48 |
-
.sidebar {
|
49 |
-
width: 280px;
|
50 |
-
background-color: var(--primary);
|
51 |
-
color: var(--foreground);
|
52 |
-
padding: 30px;
|
53 |
-
position: fixed;
|
54 |
-
height: 100vh;
|
55 |
-
display: flex;
|
56 |
-
flex-direction: column;
|
57 |
-
border-right: 1px solid rgba(255, 255, 255, 0.1);
|
58 |
-
}
|
59 |
-
|
60 |
-
.sidebar .logo {
|
61 |
-
font-size: 2rem;
|
62 |
-
font-weight: bold;
|
63 |
-
margin-bottom: 40px;
|
64 |
-
color: var(--foreground);
|
65 |
-
}
|
66 |
-
|
67 |
-
.logo-container {
|
68 |
-
display: flex;
|
69 |
-
flex-direction: column;
|
70 |
-
align-items: left;
|
71 |
-
justify-content: center;
|
72 |
-
}
|
73 |
-
|
74 |
-
.version {
|
75 |
-
color: var(--hover-accent);
|
76 |
-
font-size: 0.8em;
|
77 |
-
margin-top: 20px;
|
78 |
-
text-align: end;
|
79 |
-
}
|
80 |
-
|
81 |
-
.sidebar .nav-links {
|
82 |
-
list-style-type: none;
|
83 |
-
margin-top: 20px;
|
84 |
-
}
|
85 |
-
|
86 |
-
.sidebar .nav-links li {
|
87 |
-
margin-bottom: 24px;
|
88 |
-
}
|
89 |
-
|
90 |
-
.sidebar .nav-links a {
|
91 |
-
color: var(--foreground);
|
92 |
-
font-size: 1.2em;
|
93 |
-
transition: all 0.3s ease;
|
94 |
-
}
|
95 |
-
|
96 |
-
.sidebar .nav-links a:hover {
|
97 |
-
color: var(--accent);
|
98 |
-
transform: scale(1.05);
|
99 |
-
}
|
100 |
-
|
101 |
-
/* Content Area */
|
102 |
-
.content {
|
103 |
-
margin-left: 280px;
|
104 |
-
padding: 30px;
|
105 |
-
flex-grow: 1;
|
106 |
-
height: 100vh;
|
107 |
-
overflow-y: auto;
|
108 |
-
background-color: var(--secondary);
|
109 |
-
}
|
110 |
-
|
111 |
-
/* Header */
|
112 |
-
.header {
|
113 |
-
margin-bottom: 40px;
|
114 |
-
}
|
115 |
-
|
116 |
-
.header h1 {
|
117 |
-
color: var(--foreground);
|
118 |
-
font-size: 2.5rem;
|
119 |
-
font-weight: 600;
|
120 |
-
margin-bottom: 10px;
|
121 |
-
}
|
122 |
-
|
123 |
-
/* Main content */
|
124 |
-
.main-content {
|
125 |
-
display: flex;
|
126 |
-
justify-content: center;
|
127 |
-
align-items: center;
|
128 |
-
flex-direction: column;
|
129 |
-
}
|
130 |
-
|
131 |
.user-info-card {
|
132 |
background-color: var(--secondary);
|
133 |
-
padding:
|
134 |
-
border-radius:
|
135 |
box-shadow: 0 4px 12px var(--shadow-dark);
|
136 |
text-align: center;
|
137 |
-
width:
|
|
|
138 |
margin-bottom: 30px;
|
139 |
transition: all 0.3s ease-in-out;
|
140 |
}
|
141 |
|
142 |
-
.user-info-card:hover {
|
143 |
-
transform: translateY(-5px);
|
144 |
-
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
|
145 |
-
}
|
146 |
-
|
147 |
-
.user-info-card h3 {
|
148 |
-
font-size: 1.8em;
|
149 |
-
color: var(--accent);
|
150 |
-
margin-bottom: 20px;
|
151 |
-
}
|
152 |
-
|
153 |
-
.user-info-card p {
|
154 |
-
color: var(--foreground);
|
155 |
-
margin-bottom: 20px;
|
156 |
-
}
|
157 |
-
|
158 |
.logout-button {
|
159 |
padding: 12px 24px;
|
160 |
background-color: var(--button-background);
|
161 |
color: var(--foreground);
|
162 |
border: none;
|
163 |
border-radius: 8px;
|
164 |
-
font-size:
|
165 |
cursor: pointer;
|
166 |
transition: background-color 0.3s ease;
|
167 |
}
|
168 |
|
169 |
.logout-button:hover {
|
170 |
-
background-color: var(--button-
|
171 |
-
}
|
172 |
-
|
173 |
-
/* Login Prompt */
|
174 |
-
.login-prompt {
|
175 |
-
text-align: center;
|
176 |
-
color: var(--foreground);
|
177 |
-
font-size: 1.3em;
|
178 |
-
margin-top: 40px;
|
179 |
-
}
|
180 |
-
|
181 |
-
.login-prompt a {
|
182 |
-
color: var(--accent);
|
183 |
-
text-decoration: none;
|
184 |
-
}
|
185 |
-
|
186 |
-
.login-prompt a:hover {
|
187 |
-
text-decoration: underline;
|
188 |
-
}
|
189 |
-
|
190 |
-
/* Responsive Design */
|
191 |
-
@media (max-width: 1024px) {
|
192 |
-
.sidebar {
|
193 |
-
width: 240px;
|
194 |
-
padding: 20px;
|
195 |
-
}
|
196 |
-
|
197 |
-
.content {
|
198 |
-
margin-left: 240px;
|
199 |
-
}
|
200 |
-
|
201 |
-
.user-info-card {
|
202 |
-
width: 90%;
|
203 |
-
}
|
204 |
-
}
|
205 |
-
|
206 |
-
@media (max-width: 768px) {
|
207 |
-
.sidebar {
|
208 |
-
width: 200px;
|
209 |
-
padding: 15px;
|
210 |
-
}
|
211 |
-
|
212 |
-
.content {
|
213 |
-
margin-left: 200px;
|
214 |
-
}
|
215 |
-
|
216 |
-
.user-info-card {
|
217 |
-
width: 90%;
|
218 |
-
}
|
219 |
}
|
|
|
3 |
@tailwind utilities;
|
4 |
|
5 |
:root {
|
6 |
+
--background: #100b1a; /* Deeper dark background */
|
7 |
--foreground: #E0E0E0; /* Light gray text */
|
8 |
+
--sidebar-background: #14141b; /* Darker sidebar background */
|
9 |
--primary: #1F1F2A; /* Darker primary for sidebar */
|
10 |
--secondary: #2A2A3B; /* Soft secondary background for content */
|
11 |
--accent: #4a4a7f;
|
|
|
36 |
margin: 0;
|
37 |
}
|
38 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
.user-info-card {
|
40 |
background-color: var(--secondary);
|
41 |
+
padding: 20px;
|
42 |
+
border-radius: 5px;
|
43 |
box-shadow: 0 4px 12px var(--shadow-dark);
|
44 |
text-align: center;
|
45 |
+
width: 90%; /* Adjust for smaller screens */
|
46 |
+
max-width: 500px; /* Limit for larger screens */
|
47 |
margin-bottom: 30px;
|
48 |
transition: all 0.3s ease-in-out;
|
49 |
}
|
50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
.logout-button {
|
52 |
padding: 12px 24px;
|
53 |
background-color: var(--button-background);
|
54 |
color: var(--foreground);
|
55 |
border: none;
|
56 |
border-radius: 8px;
|
57 |
+
font-size: 1em;
|
58 |
cursor: pointer;
|
59 |
transition: background-color 0.3s ease;
|
60 |
}
|
61 |
|
62 |
.logout-button:hover {
|
63 |
+
background-color: darken(var(--button-background), 10%);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
}
|
frontend/app/layout.js
CHANGED
@@ -1,9 +1,11 @@
|
|
1 |
'use client';
|
2 |
import { Geist, Geist_Mono } from "next/font/google";
|
3 |
import "./globals.css";
|
4 |
-
import {
|
|
|
5 |
import { ToastContainer, toast, Flip } from 'react-toastify';
|
6 |
import { CheckCircleIcon, InformationCircleIcon, ExclamationCircleIcon } from '@heroicons/react/20/solid';
|
|
|
7 |
|
8 |
const geistSans = Geist({
|
9 |
variable: "--font-geist-sans",
|
@@ -16,30 +18,60 @@ const geistMono = Geist_Mono({
|
|
16 |
});
|
17 |
|
18 |
export default function RootLayout({ children }) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
return (
|
20 |
<html lang="en">
|
21 |
<body className={`${geistSans.variable} ${geistMono.variable}`}>
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
|
|
41 |
<NexusAuthWrapper toast={toast}>
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
</NexusAuthWrapper>
|
44 |
</body>
|
45 |
</html>
|
|
|
1 |
'use client';
|
2 |
import { Geist, Geist_Mono } from "next/font/google";
|
3 |
import "./globals.css";
|
4 |
+
import { useState } from "react";
|
5 |
+
import { NexusAuthWrapper } from "@/app/components/NexusAuth";
|
6 |
import { ToastContainer, toast, Flip } from 'react-toastify';
|
7 |
import { CheckCircleIcon, InformationCircleIcon, ExclamationCircleIcon } from '@heroicons/react/20/solid';
|
8 |
+
import Sidebar from "@/app/components/Sidebar";
|
9 |
|
10 |
const geistSans = Geist({
|
11 |
variable: "--font-geist-sans",
|
|
|
18 |
});
|
19 |
|
20 |
export default function RootLayout({ children }) {
|
21 |
+
const [isCollapsed, setIsCollapsed] = useState(true);
|
22 |
+
const toggleSidebar = () => {
|
23 |
+
setIsCollapsed(!isCollapsed);
|
24 |
+
};
|
25 |
+
const contentStyle = {
|
26 |
+
padding: "30px",
|
27 |
+
flexGrow: 1,
|
28 |
+
height: "100vh",
|
29 |
+
overflowY: "auto",
|
30 |
+
backgroundColor: "var(--background)",
|
31 |
+
transition: "margin-left 0.3s ease",
|
32 |
+
};
|
33 |
+
|
34 |
+
const headerStyle = {
|
35 |
+
marginBottom: "30px",
|
36 |
+
display: "flex",
|
37 |
+
justifyContent: "center",
|
38 |
+
};
|
39 |
+
|
40 |
return (
|
41 |
<html lang="en">
|
42 |
<body className={`${geistSans.variable} ${geistMono.variable}`}>
|
43 |
+
<ToastContainer
|
44 |
+
transition={Flip}
|
45 |
+
theme="dark"
|
46 |
+
icon={({ type, theme }) => {
|
47 |
+
// theme is not used in this example but you could
|
48 |
+
switch (type) {
|
49 |
+
case 'info':
|
50 |
+
return <InformationCircleIcon className="text-indigo-400" />;
|
51 |
+
case 'error':
|
52 |
+
return <InformationCircleIcon className="text-red-500" />;
|
53 |
+
case 'success':
|
54 |
+
return <CheckCircleIcon className="h-5 w-5 text-green-500" />;
|
55 |
+
case 'warning':
|
56 |
+
return <ExclamationCircleIcon className="text-yellow-500" />;
|
57 |
+
default:
|
58 |
+
return null;
|
59 |
+
}
|
60 |
+
}}
|
61 |
+
/>
|
62 |
+
|
63 |
<NexusAuthWrapper toast={toast}>
|
64 |
+
<div className="dashboard-container">
|
65 |
+
<Sidebar isCollapsed={isCollapsed} toggleSidebar={toggleSidebar} />
|
66 |
+
<div style={contentStyle}>
|
67 |
+
<header style={headerStyle}>
|
68 |
+
<h1>Welcome to Your Dashboard</h1>
|
69 |
+
</header>
|
70 |
+
<div className="main-content">
|
71 |
+
{children}
|
72 |
+
</div>
|
73 |
+
</div>
|
74 |
+
</div>
|
75 |
</NexusAuthWrapper>
|
76 |
</body>
|
77 |
</html>
|
frontend/app/lib/config.js
CHANGED
@@ -1,3 +1,5 @@
|
|
1 |
export const API_BASE_URL = "https://hans-r-d-auth-nexus.hf.space/v1/api";
|
2 |
-
export const DEBUG = true;
|
3 |
-
export const VERSION = "
|
|
|
|
|
|
1 |
export const API_BASE_URL = "https://hans-r-d-auth-nexus.hf.space/v1/api";
|
2 |
+
export const DEBUG = true;
|
3 |
+
export const VERSION = "v0.0.2 Debug";
|
4 |
+
export const APP_NAME = "Nexus Auth";
|
5 |
+
export const APP_DESCRIPTION = "A simple authentication service";
|
frontend/app/page.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
'use client';
|
|
|
2 |
import { useState, useEffect } from "react";
|
3 |
-
import NexusAuthApi from "
|
4 |
-
import { VERSION } from "./lib/config";
|
5 |
|
6 |
export default function Home() {
|
7 |
const [username, setUsername] = useState(null);
|
@@ -33,39 +33,14 @@ export default function Home() {
|
|
33 |
};
|
34 |
|
35 |
return (
|
36 |
-
|
37 |
-
|
38 |
-
<div className="
|
39 |
-
<
|
40 |
-
<
|
41 |
-
|
42 |
-
</div>
|
43 |
-
<ul className="nav-links">
|
44 |
-
<li><a href="/profile">Profile</a></li>
|
45 |
-
<li><a href="/settings">Settings</a></li>
|
46 |
-
<li><a href="/support">Support</a></li>
|
47 |
-
</ul>
|
48 |
-
</div>
|
49 |
-
|
50 |
-
<div className="content">
|
51 |
-
<header className="header">
|
52 |
-
<h1>Welcome to Your Dashboard</h1>
|
53 |
-
</header>
|
54 |
-
|
55 |
-
<div className="main-content">
|
56 |
-
{username ? (
|
57 |
-
<div className="user-info-card">
|
58 |
-
<h3>Hello, <strong>{username}</strong></h3>
|
59 |
-
<p>User ID: <strong>{userID}</strong></p>
|
60 |
-
<button onClick={handleLogout} className="logout-button">Logout</button>
|
61 |
-
</div>
|
62 |
-
) : (
|
63 |
-
<div className="login-prompt">
|
64 |
-
<p>You are not logged in. Please <a href="/login">login</a> to access your account.</p>
|
65 |
-
</div>
|
66 |
-
)}
|
67 |
</div>
|
68 |
-
|
69 |
-
|
70 |
);
|
71 |
}
|
|
|
1 |
'use client';
|
2 |
+
|
3 |
import { useState, useEffect } from "react";
|
4 |
+
import NexusAuthApi from "@/app/lib/Nexus_Auth_API";
|
|
|
5 |
|
6 |
export default function Home() {
|
7 |
const [username, setUsername] = useState(null);
|
|
|
33 |
};
|
34 |
|
35 |
return (
|
36 |
+
<>
|
37 |
+
{username && (
|
38 |
+
<div className="user-info-card">
|
39 |
+
<h3>Hello, <strong>{username}</strong></h3>
|
40 |
+
<p>User ID: <strong>{userID}</strong></p>
|
41 |
+
<button onClick={handleLogout} className="logout-button">Logout</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
</div>
|
43 |
+
)}
|
44 |
+
</>
|
45 |
);
|
46 |
}
|
frontend/app/page.module.css
DELETED
@@ -1,168 +0,0 @@
|
|
1 |
-
.page {
|
2 |
-
--gray-rgb: 0, 0, 0;
|
3 |
-
--gray-alpha-200: rgba(var(--gray-rgb), 0.08);
|
4 |
-
--gray-alpha-100: rgba(var(--gray-rgb), 0.05);
|
5 |
-
|
6 |
-
--button-primary-hover: #383838;
|
7 |
-
--button-secondary-hover: #f2f2f2;
|
8 |
-
|
9 |
-
display: grid;
|
10 |
-
grid-template-rows: 20px 1fr 20px;
|
11 |
-
align-items: center;
|
12 |
-
justify-items: center;
|
13 |
-
min-height: 100svh;
|
14 |
-
padding: 80px;
|
15 |
-
gap: 64px;
|
16 |
-
font-family: var(--font-geist-sans);
|
17 |
-
}
|
18 |
-
|
19 |
-
@media (prefers-color-scheme: dark) {
|
20 |
-
.page {
|
21 |
-
--gray-rgb: 255, 255, 255;
|
22 |
-
--gray-alpha-200: rgba(var(--gray-rgb), 0.145);
|
23 |
-
--gray-alpha-100: rgba(var(--gray-rgb), 0.06);
|
24 |
-
|
25 |
-
--button-primary-hover: #ccc;
|
26 |
-
--button-secondary-hover: #1a1a1a;
|
27 |
-
}
|
28 |
-
}
|
29 |
-
|
30 |
-
.main {
|
31 |
-
display: flex;
|
32 |
-
flex-direction: column;
|
33 |
-
gap: 32px;
|
34 |
-
grid-row-start: 2;
|
35 |
-
}
|
36 |
-
|
37 |
-
.main ol {
|
38 |
-
font-family: var(--font-geist-mono);
|
39 |
-
padding-left: 0;
|
40 |
-
margin: 0;
|
41 |
-
font-size: 14px;
|
42 |
-
line-height: 24px;
|
43 |
-
letter-spacing: -0.01em;
|
44 |
-
list-style-position: inside;
|
45 |
-
}
|
46 |
-
|
47 |
-
.main li:not(:last-of-type) {
|
48 |
-
margin-bottom: 8px;
|
49 |
-
}
|
50 |
-
|
51 |
-
.main code {
|
52 |
-
font-family: inherit;
|
53 |
-
background: var(--gray-alpha-100);
|
54 |
-
padding: 2px 4px;
|
55 |
-
border-radius: 4px;
|
56 |
-
font-weight: 600;
|
57 |
-
}
|
58 |
-
|
59 |
-
.ctas {
|
60 |
-
display: flex;
|
61 |
-
gap: 16px;
|
62 |
-
}
|
63 |
-
|
64 |
-
.ctas a {
|
65 |
-
appearance: none;
|
66 |
-
border-radius: 128px;
|
67 |
-
height: 48px;
|
68 |
-
padding: 0 20px;
|
69 |
-
border: none;
|
70 |
-
border: 1px solid transparent;
|
71 |
-
transition:
|
72 |
-
background 0.2s,
|
73 |
-
color 0.2s,
|
74 |
-
border-color 0.2s;
|
75 |
-
cursor: pointer;
|
76 |
-
display: flex;
|
77 |
-
align-items: center;
|
78 |
-
justify-content: center;
|
79 |
-
font-size: 16px;
|
80 |
-
line-height: 20px;
|
81 |
-
font-weight: 500;
|
82 |
-
}
|
83 |
-
|
84 |
-
a.primary {
|
85 |
-
background: var(--foreground);
|
86 |
-
color: var(--background);
|
87 |
-
gap: 8px;
|
88 |
-
}
|
89 |
-
|
90 |
-
a.secondary {
|
91 |
-
border-color: var(--gray-alpha-200);
|
92 |
-
min-width: 180px;
|
93 |
-
}
|
94 |
-
|
95 |
-
.footer {
|
96 |
-
grid-row-start: 3;
|
97 |
-
display: flex;
|
98 |
-
gap: 24px;
|
99 |
-
}
|
100 |
-
|
101 |
-
.footer a {
|
102 |
-
display: flex;
|
103 |
-
align-items: center;
|
104 |
-
gap: 8px;
|
105 |
-
}
|
106 |
-
|
107 |
-
.footer img {
|
108 |
-
flex-shrink: 0;
|
109 |
-
}
|
110 |
-
|
111 |
-
/* Enable hover only on non-touch devices */
|
112 |
-
@media (hover: hover) and (pointer: fine) {
|
113 |
-
a.primary:hover {
|
114 |
-
background: var(--button-primary-hover);
|
115 |
-
border-color: transparent;
|
116 |
-
}
|
117 |
-
|
118 |
-
a.secondary:hover {
|
119 |
-
background: var(--button-secondary-hover);
|
120 |
-
border-color: transparent;
|
121 |
-
}
|
122 |
-
|
123 |
-
.footer a:hover {
|
124 |
-
text-decoration: underline;
|
125 |
-
text-underline-offset: 4px;
|
126 |
-
}
|
127 |
-
}
|
128 |
-
|
129 |
-
@media (max-width: 600px) {
|
130 |
-
.page {
|
131 |
-
padding: 32px;
|
132 |
-
padding-bottom: 80px;
|
133 |
-
}
|
134 |
-
|
135 |
-
.main {
|
136 |
-
align-items: center;
|
137 |
-
}
|
138 |
-
|
139 |
-
.main ol {
|
140 |
-
text-align: center;
|
141 |
-
}
|
142 |
-
|
143 |
-
.ctas {
|
144 |
-
flex-direction: column;
|
145 |
-
}
|
146 |
-
|
147 |
-
.ctas a {
|
148 |
-
font-size: 14px;
|
149 |
-
height: 40px;
|
150 |
-
padding: 0 16px;
|
151 |
-
}
|
152 |
-
|
153 |
-
a.secondary {
|
154 |
-
min-width: auto;
|
155 |
-
}
|
156 |
-
|
157 |
-
.footer {
|
158 |
-
flex-wrap: wrap;
|
159 |
-
align-items: center;
|
160 |
-
justify-content: center;
|
161 |
-
}
|
162 |
-
}
|
163 |
-
|
164 |
-
@media (prefers-color-scheme: dark) {
|
165 |
-
.logo {
|
166 |
-
filter: invert();
|
167 |
-
}
|
168 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
frontend/app/settings/page.js
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
export default function Settings() {
|
2 |
+
return (
|
3 |
+
<></>
|
4 |
+
)
|
5 |
+
};
|
frontend/app/support/page.js
ADDED
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
export default function Support() {
|
2 |
+
return (
|
3 |
+
<></>
|
4 |
+
)
|
5 |
+
};
|