Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!doctype html>
<html lang="en">
<html data-theme-loaded="false" lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
]
},
"dependencies": {
"@heroicons/react": "^2.2.0",
"@mui/icons-material": "^7.3.0",
"@mui/material": "^7.3.0",
"@mui/styled-engine-sc": "^7.3.0",
Expand All @@ -44,7 +45,8 @@
"react-router-dom": "^7.7.1",
"styled-components": "^6.2.0",
"tailwindcss": "^4.2.4",
"vite-plugin-remove-console": "^2.2.0"
"vite-plugin-remove-console": "^2.2.0",
"zustand": "^5.0.12"
},
"devDependencies": {
"@chromatic-com/storybook": "^5.1.2",
Expand Down
58 changes: 38 additions & 20 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
import { RouterProvider } from 'react-router-dom'
import router from './routes'
// import styles from "./App.module.css";
import { AuthProvider } from './context/AuthContext'
import { AuthProvider } from "./context/AuthContext";
import TestCard from "./TestCard";
import LoginCard from "./LoginCard";
// import * from '@mui/styled-engine-sc' as styledEngineSC;,
import { LanguageProvider } from './context/LanguageContext'
import CustomTranslate from './textTranslation/CustomTranslate'
// import { LanguageProvider } from "./context/LanguageContext";
// import CustomTranslate from "./textTranslation/CustomTranslate";


function App() {
return (
<AuthProvider>
<LanguageProvider>
<CustomTranslate />
{/* <GoogleTranslate/> */}
<RouterProvider router={router} />
{/* </CustomTranslate> */}
</LanguageProvider>
<RouterProvider router={router} />
<TestCard />
<LoginCard />
</AuthProvider>
)
}
Expand Down
86 changes: 86 additions & 0 deletions src/LoginCard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
import ThemeToggleSwitch from './ThemeToggleSwitch';

function LoginCard() {

const handleGoogleLogin = () => {
// Replace with your actual backend OAuth endpoint
window.location.href = 'http://localhost:8080/oauth2/authorization/google';
};

return (
<div className="fixed inset-0 flex items-center justify-center bg-bg-primary">

<div className="flex gap-2 absolute top-4 right-10">
<ThemeToggleSwitch />
</div>

<div className="w-full max-w-sm bg-bg-secondary border border-border-primary rounded-lg shadow-md p-6 space-y-6">

{/* Heading */}
<div className="space-y-1">
<h2 className="text-2xl font-semibold text-text-primary">
Welcome
</h2>

<p className="text-sm text-text-secondary">
Sign in using your Google account
</p>
</div>

{/* Google OAuth Button */}
<button
onClick={handleGoogleLogin}
className="
cursor-pointer
w-full
flex
items-center
justify-center
gap-3
py-3
rounded-md
bg-bg-tertiary
text-text-primary
border
border-border-secondary
hover:bg-bg-primary
transition
"
>
{/* Google Icon */}
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 48 48"
className="w-5 h-5"
>
<path
fill="#FFC107"
d="M43.6 20.5H42V20H24v8h11.3C33.7 32.7 29.3 36 24 36c-6.6 0-12-5.4-12-12s5.4-12 12-12c3 0 5.7 1.1 7.8 2.9l5.7-5.7C34.1 6.1 29.3 4 24 4 12.9 4 4 12.9 4 24s8.9 20 20 20 20-8.9 20-20c0-1.3-.1-2.3-.4-3.5z"
/>
<path
fill="#FF3D00"
d="M6.3 14.7l6.6 4.8C14.7 15.1 18.9 12 24 12c3 0 5.7 1.1 7.8 2.9l5.7-5.7C34.1 6.1 29.3 4 24 4 16.3 4 9.7 8.3 6.3 14.7z"
/>
<path
fill="#4CAF50"
d="M24 44c5.2 0 10-2 13.5-5.3l-6.2-5.2C29.2 35.1 26.7 36 24 36c-5.3 0-9.7-3.3-11.3-8l-6.5 5C9.5 39.5 16.2 44 24 44z"
/>
<path
fill="#1976D2"
d="M43.6 20.5H42V20H24v8h11.3c-1.1 3.1-3.3 5.5-6.2 7.1l6.2 5.2C39.1 36.7 44 31 44 24c0-1.3-.1-2.3-.4-3.5z"
/>
</svg>

Continue with Google
</button>

{/* Footer */}
<p className="text-xs text-center text-text-tertiary">
By continuing, you agree to the platform policies.
</p>
</div>
</div>
);
}

export default LoginCard;
Loading
Loading