feat: restore 'Meet' link in client navigation for improved accessibility
All checks were successful
GBCI / build (push) Successful in 2m17s
All checks were successful
GBCI / build (push) Successful in 2m17s
This commit is contained in:
parent
d657ae4aec
commit
2d2f6a34b0
4 changed files with 67 additions and 76 deletions
|
@ -1,67 +0,0 @@
|
||||||
"use client";
|
|
||||||
import React, { useState } from 'react';
|
|
||||||
import { UserAuthForm } from './components/user-auth-form';
|
|
||||||
|
|
||||||
const AuthenticationScreen = () => {
|
|
||||||
const [isAuthenticated, setIsAuthenticated] = useState(false);
|
|
||||||
|
|
||||||
const handleLogin = async () => {
|
|
||||||
try {
|
|
||||||
localStorage.setItem('authToken', 'dummy-token');
|
|
||||||
setIsAuthenticated(true);
|
|
||||||
alert('Login Successful');
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Login error:', error);
|
|
||||||
alert('Login Error');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleLogout = async () => {
|
|
||||||
try {
|
|
||||||
localStorage.removeItem('authToken');
|
|
||||||
setIsAuthenticated(false);
|
|
||||||
alert('Logout Successful');
|
|
||||||
} catch (error) {
|
|
||||||
console.error('Logout error:', error);
|
|
||||||
alert('Logout Error');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="auth-screen">
|
|
||||||
<div className="auth-content">
|
|
||||||
<button
|
|
||||||
className="auth-login-button"
|
|
||||||
onClick={isAuthenticated ? handleLogout : handleLogin}
|
|
||||||
>
|
|
||||||
{isAuthenticated ? 'Logout' : 'Login'}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<div className="auth-left-panel">
|
|
||||||
<div className="auth-logo">
|
|
||||||
<h1>Welcome to General Bots Online</h1>
|
|
||||||
</div>
|
|
||||||
<div className="auth-quote">
|
|
||||||
<p>"Errar é Humano."</p>
|
|
||||||
<p>General Bots</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className="auth-form-container">
|
|
||||||
<div className="auth-form-header">
|
|
||||||
<h2>Create an account</h2>
|
|
||||||
<p>Enter your email below to create your account</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<UserAuthForm />
|
|
||||||
|
|
||||||
<p className="auth-terms">
|
|
||||||
By clicking continue, you agree to our Terms of Service and Privacy Policy.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default AuthenticationScreen;
|
|
74
app/page.tsx
74
app/page.tsx
|
@ -1,9 +1,67 @@
|
||||||
// app/page.tsx (your home page)
|
"use client";
|
||||||
export default function Home() {
|
import React, { useState } from 'react';
|
||||||
|
import { UserAuthForm } from '../components/user-auth-form';
|
||||||
|
|
||||||
|
const AuthenticationScreen = () => {
|
||||||
|
const [isAuthenticated, setIsAuthenticated] = useState(false);
|
||||||
|
|
||||||
|
const handleLogin = async () => {
|
||||||
|
try {
|
||||||
|
localStorage.setItem('authToken', 'dummy-token');
|
||||||
|
setIsAuthenticated(true);
|
||||||
|
alert('Login Successful');
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Login error:', error);
|
||||||
|
alert('Login Error');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleLogout = async () => {
|
||||||
|
try {
|
||||||
|
localStorage.removeItem('authToken');
|
||||||
|
setIsAuthenticated(false);
|
||||||
|
alert('Logout Successful');
|
||||||
|
} catch (error) {
|
||||||
|
console.error('Logout error:', error);
|
||||||
|
alert('Logout Error');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<main className="min-h-screen p-8">
|
<div className="auth-screen">
|
||||||
<h1 className="text-3xl font-bold">Welcome to My Tauri App</h1>
|
<div className="auth-content">
|
||||||
<p className="mt-4">This is your home page</p>
|
<button
|
||||||
</main>
|
className="auth-login-button"
|
||||||
)
|
onClick={isAuthenticated ? handleLogout : handleLogin}
|
||||||
}
|
>
|
||||||
|
{isAuthenticated ? 'Logout' : 'Login'}
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div className="auth-left-panel">
|
||||||
|
<div className="auth-logo">
|
||||||
|
<h1>Welcome to General Bots Online</h1>
|
||||||
|
</div>
|
||||||
|
<div className="auth-quote">
|
||||||
|
<p>"Errar é Humano."</p>
|
||||||
|
<p>General Bots</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="auth-form-container">
|
||||||
|
<div className="auth-form-header">
|
||||||
|
<h2>Create an account</h2>
|
||||||
|
<p>Enter your email below to create your account</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<UserAuthForm />
|
||||||
|
|
||||||
|
<p className="auth-terms">
|
||||||
|
By clicking continue, you agree to our Terms of Service and Privacy Policy.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default AuthenticationScreen;
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
"src",
|
"src",
|
||||||
|
|
||||||
".next/types/**/*.ts"
|
".next/types/**/*.ts"
|
||||||
, "app" ],
|
, "app", "components/user-auth-form.tsx" ],
|
||||||
"references": [
|
"references": [
|
||||||
{
|
{
|
||||||
"path": "./tsconfig.node.json"
|
"path": "./tsconfig.node.json"
|
||||||
|
|
Loading…
Add table
Reference in a new issue