mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-08-08 21:44:32 +02:00
Add a user pref to reveal dotted passwords - Closes #208
This commit is contained in:
4
resources/js/composables/helpers.js
vendored
4
resources/js/composables/helpers.js
vendored
@ -34,7 +34,7 @@ export function useIdGenerator(fieldType, fieldName) {
|
||||
}
|
||||
}
|
||||
|
||||
export function useDisplayablePassword(pwd) {
|
||||
export function useDisplayablePassword(pwd, reveal = false) {
|
||||
const user = useUserStore()
|
||||
|
||||
if (user.preferences.formatPassword && pwd.length > 0) {
|
||||
@ -48,5 +48,5 @@ export function useDisplayablePassword(pwd) {
|
||||
}
|
||||
}
|
||||
|
||||
return user.preferences.showOtpAsDot ? pwd.replace(/[0-9]/g, '●') : pwd
|
||||
return user.preferences.showOtpAsDot && !reveal ? pwd.replace(/[0-9]/g, '●') : pwd
|
||||
}
|
Reference in New Issue
Block a user