feat(ui): refonte de l'interface

This commit is contained in:
ElPouki committed 2026-09-15 15:30:20 +02:00
1 parent 3ede3e808c
commit 09eb1fa3aa
79 files changed
+5323 -3514

No files matched your search

+10
View File
@@ -20,6 +20,7 @@ export interface User {
apiToken : string
createdAt : string
tourSeenAt? : string | null
lastLoginAt?: string | null
}
const USERS_PATH = path.join(DATA_DIR, 'users.json')
@@ -144,6 +145,15 @@ export function changePassword(id: string, currentPassword: string, newPassword:
logger.info('users', `Mot de passe changé pour "${user.username}"`)
}
export function markLogin(id: string): string | null {
const users = readUsers()
const user = users.find(u => u.id === id)
if (!user) return null
user.lastLoginAt = new Date().toISOString()
writeUsers(users)
return user.lastLoginAt
}
export function markTourSeen(id: string): string {
const users = readUsers()
const user = users.find(u => u.id === id)