Add login page and social login integration
- Implement `LoginPage`, `LoginForm`, and `SocialForm` components. - Add language toggle and dynamic title support. - Update `tsconfig.electron.json` for stricter settings. - Add `electron-store` and associated types for token storage. - Update `package.json` scripts and dependencies for Electron compatibility.
This commit is contained in:
@@ -30,9 +30,17 @@ export default function UserMenu() {
|
||||
};
|
||||
}, [isProfileMenuOpen]);
|
||||
|
||||
function handleLogout(): void {
|
||||
async function handleLogout(): Promise<void> {
|
||||
System.removeCookie("token");
|
||||
document.location.href = "https://eritors.com/login";
|
||||
|
||||
// Si dans Electron, utiliser IPC pour logout
|
||||
if (window.electron) {
|
||||
await window.electron.removeToken();
|
||||
window.electron.logout();
|
||||
} else {
|
||||
// Fallback web
|
||||
document.location.href = "https://eritors.com/login";
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user