Archived exercises hidden from selects. Password fields Show Password toggle

This commit is contained in:
AG
2025-12-18 21:11:40 +02:00
parent b6cb3059af
commit b32f47c2b5
9 changed files with 103 additions and 32 deletions

9
src/utils/password.ts Normal file
View File

@@ -0,0 +1,9 @@
export function generatePassword(length = 8): string {
const charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+";
let password = "";
for (let i = 0; i < length; i++) {
password += charset.charAt(Math.floor(Math.random() * charset.length));
}
return password;
}