Skip to content

Commit

Permalink
tweak UI
Browse files Browse the repository at this point in the history
  • Loading branch information
yvesago committed Feb 15, 2022
1 parent c8af392 commit 861363d
Show file tree
Hide file tree
Showing 16 changed files with 1,831 additions and 30 deletions.
1 change: 0 additions & 1 deletion handlers/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ func LoginHandler(c *gin.Context) {
useOtp := contains(groups, cfg.CfgUsers.GIDuseOtp)

// redirect to otp if otp group and secret
Log.Info("useOtp:", useOtp)
if u.OTPSecret != "" && useOtp {
s.ReqOTP = true
s.User = ""
Expand Down
3 changes: 2 additions & 1 deletion handlers/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func UserList(c *gin.Context) {
for k := range Data.Groups {
hg[Data.Groups[k].GIDNumber] = Data.Groups[k].Name
}
render(c, gin.H{"title": Tr(lang, "Users Page"), "currentPage": "user", "userdata": Data.Users, "hashgroups": hg}, "user/list.tmpl")
render(c, gin.H{"title": Tr(lang, "Users page"), "currentPage": "user", "userdata": Data.Users, "hashgroups": hg}, "user/list.tmpl")
}

func UserEdit(c *gin.Context) {
Expand Down Expand Up @@ -565,6 +565,7 @@ func UserChgOTP(c *gin.Context) {

// Validate new otpsecret or no change
if !userf.Validate(cfg.PassPolicy) || otp == (&Data.Users[k]).OTPSecret {
userf.OTPSecret = (&Data.Users[k]).OTPSecret
render(c, gin.H{"title": u.Name,
"currentPage": "profile",
"navotp": true,
Expand Down
7 changes: 6 additions & 1 deletion locales/en-US/en.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Account: ""
Account disabled: ""
Add: ""
Add group: ""
Add user: ""
Expand All @@ -9,6 +10,7 @@ Cancel: ""
Can use OTP: ""
Change password: ""
Changes canceled: ""
Change Secret: ""
Changes saved: ""
Change with caution: ""
Close: ""
Expand All @@ -19,6 +21,7 @@ Connect: ""
Connection: ""
Create: ""
Create OTP: ""
Create secret: ""
Data locked by admin.: ""
Delete: ""
Disabled: ""
Expand Down Expand Up @@ -49,12 +52,14 @@ Nothing to save: ""
Only for group: ""
Others: ""
OTP: ""
OTP updated: ""
Password: ""
Passwords mismatch: ""
Password updated: ""
Pending registration: ""
Please enter a valid email address: ""
Profile: ""
Reset: ""
Secret: ""
Show QR code: ""
Special groups: ""
Expand All @@ -68,7 +73,7 @@ Unknown user: ""
Update: ""
Username: ""
Users: ""
Users Page: ""
Users page: ""
Wrong base32: ""
Yes: ""
You are disconnected: ""
8 changes: 7 additions & 1 deletion locales/fr-FR/fr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Account: "Compte"
Account disabled: "Compte désactivé"
Add: "Ajouter"
Add group: "Ajout groupe"
Add user: "Ajout utilisateur"
Expand All @@ -9,6 +10,7 @@ Cancel: "Annuler"
Can use OTP: "Peuvent utiliser OTP"
Change password: "Changement du mot de passe"
Changes canceled: "Annulation des changements"
Change Secret: "Nouveau secret"
Changes saved: "Enregistrement des changements"
Change with caution: "ATTENTION Ce changement peut provoquer des effets de bords !"
Close: "Fermer"
Expand All @@ -19,6 +21,7 @@ Connect: "Se connecter"
Connection: "Connexion"
Create: "Créer"
Create OTP: "Créer OTP"
Create secret: "Nouveau secret"
Data locked by admin.: ""
Delete: "Supprimer"
Disabled: "Désactivé"
Expand Down Expand Up @@ -48,12 +51,15 @@ Nothing to cancel: "Il n'y a rien à annuler"
Nothing to save: "Il n'y a rien à sauver"
Only for group: "Seulement pour le groupe"
Others: "Autres groupes"
OTP: ""
OTP updated: "OTP modifié"
Password: "Mot de passe"
Passwords mismatch: "Les mots de passe sont différents"
Password updated: "Mot de passe modifié"
Pending registration: "Enregistrements en attente"
Please enter a valid email address: "Adresse mail non valide"
Profile: "Profil"
Reset: ""
Secret: ""
Show QR code: "QR Code"
Special groups: "Groupes spéciaux"
Expand All @@ -67,7 +73,7 @@ Unknown user: "Utilisateur inconnu"
Update: "Modifier"
Username: "Identifiant"
Users: "Utilisateurs"
Users Page: "Gestion des utilisateurs"
Users page: "Gestion des utilisateurs"
Wrong base32: "Encodage base32 non valide"
Yes: "Oui"
You are disconnected: "Vous êtes déconnecté"
7 changes: 6 additions & 1 deletion locales/tr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Account: ""
Account disabled: ""
Add: ""
Add group: ""
Add user: ""
Expand All @@ -9,6 +10,7 @@ Cancel: ""
Can use OTP: ""
Change password: ""
Changes canceled: ""
Change Secret: ""
Changes saved: ""
Change with caution: ""
Close: ""
Expand All @@ -19,6 +21,7 @@ Connect: ""
Connection: ""
Create: ""
Create OTP: ""
Create secret: ""
Data locked by admin.: ""
Delete: ""
Disabled: ""
Expand Down Expand Up @@ -49,12 +52,14 @@ Nothing to save: ""
Only for group: ""
Others: ""
OTP: ""
OTP updated: ""
Password: ""
Passwords mismatch: ""
Password updated: ""
Pending registration: ""
Please enter a valid email address: ""
Profile: ""
Reset: ""
Secret: ""
Show QR code: ""
Special groups: ""
Expand All @@ -68,7 +73,7 @@ Unknown user: ""
Update: ""
Username: ""
Users: ""
Users Page: ""
Users page: ""
Wrong base32: ""
Yes: ""
You are disconnected: ""
Loading

0 comments on commit 861363d

Please sign in to comment.