diff --git a/app/templates/share.js b/app/templates/share.js index d785d109..2aa31230 100644 --- a/app/templates/share.js +++ b/app/templates/share.js @@ -106,7 +106,18 @@ module.exports = function(state, emit) { `; function passwordComplete(password) { - const el = html`
+ const passwordSpan = html([ + `${state.translate('passwordResult', { + password: + '
'
+      })}
` + ]); + const og = passwordSpan.querySelector('.passwordOriginal'); + const masked = passwordSpan.querySelector('.passwordMask'); + og.textContent = password; + masked.textContent = password.replace(/./g, '●'); + return html`
+ ${passwordSpan}
`; - - const passwordSpan = html([ - `${state.translate('passwordResult', { - password: - '
'
-      })}
` - ]); - passwordSpan.querySelector('.passwordOriginal').textContent = password; - passwordSpan.querySelector('.passwordStar').textContent = password.replace( - /./g, - '●' - ); - el.insertBefore(passwordSpan, el.firstElementChild); - return el; } function resetPassword(event) { diff --git a/assets/main.css b/assets/main.css index 464203bc..65d8bea1 100644 --- a/assets/main.css +++ b/assets/main.css @@ -702,7 +702,7 @@ tbody { display: inline; } -.selectPassword :hover .passwordStar { +.selectPassword :hover .passwordMask { display: none; }