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:
natreex
2025-11-16 13:20:20 -05:00
parent c9cf99e166
commit 1e6ebba56d
15 changed files with 1492 additions and 12 deletions

View File

@@ -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 (