diff --git a/app/assets/javascripts/discourse/app/components/toggle-password-mask.hbs b/app/assets/javascripts/discourse/app/components/toggle-password-mask.hbs
new file mode 100644
index 00000000000..6e98b87f102
--- /dev/null
+++ b/app/assets/javascripts/discourse/app/components/toggle-password-mask.hbs
@@ -0,0 +1,6 @@
+
diff --git a/app/assets/javascripts/discourse/app/controllers/create-account.js b/app/assets/javascripts/discourse/app/controllers/create-account.js
index 997a72afd53..b364d8d2ebd 100644
--- a/app/assets/javascripts/discourse/app/controllers/create-account.js
+++ b/app/assets/javascripts/discourse/app/controllers/create-account.js
@@ -42,6 +42,7 @@ export default Controller.extend(
prefilledUsername: null,
userFields: null,
isDeveloper: false,
+ maskPassword: true,
hasAuthOptions: notEmpty("authOptions"),
canCreateLocal: setting("enable_local_logins"),
@@ -68,6 +69,7 @@ export default Controller.extend(
rejectedPasswords: [],
prefilledUsername: null,
isDeveloper: false,
+ maskPassword: true,
});
this._createUserFields();
},
@@ -435,6 +437,11 @@ export default Controller.extend(
});
},
+ @action
+ togglePasswordMask() {
+ this.toggleProperty("maskPassword");
+ },
+
actions: {
externalLogin(provider) {
this.login.send("externalLogin", provider, { signup: true });
diff --git a/app/assets/javascripts/discourse/app/controllers/invites-show.js b/app/assets/javascripts/discourse/app/controllers/invites-show.js
index ea121fac4bb..2d99c580f8b 100644
--- a/app/assets/javascripts/discourse/app/controllers/invites-show.js
+++ b/app/assets/javascripts/discourse/app/controllers/invites-show.js
@@ -1,7 +1,7 @@
import { alias, bool, not, readOnly } from "@ember/object/computed";
import Controller, { inject as controller } from "@ember/controller";
import DiscourseURL from "discourse/lib/url";
-import EmberObject from "@ember/object";
+import EmberObject, { action } from "@ember/object";
import I18n from "I18n";
import NameValidation from "discourse/mixins/name-validation";
import PasswordValidation from "discourse/mixins/password-validation";
@@ -47,6 +47,7 @@ export default Controller.extend(
inviteImageUrl: getUrl("/images/envelope.svg"),
isInviteLink: readOnly("model.is_invite_link"),
rejectedEmails: null,
+ maskPassword: true,
init() {
this._super(...arguments);
@@ -288,6 +289,11 @@ export default Controller.extend(
});
},
+ @action
+ togglePasswordMask() {
+ this.toggleProperty("maskPassword");
+ },
+
actions: {
submit() {
const userFields = this.userFields;
diff --git a/app/assets/javascripts/discourse/app/controllers/login.js b/app/assets/javascripts/discourse/app/controllers/login.js
index de5238a41dd..9d35dc7c977 100644
--- a/app/assets/javascripts/discourse/app/controllers/login.js
+++ b/app/assets/javascripts/discourse/app/controllers/login.js
@@ -41,6 +41,7 @@ export default Controller.extend(ModalFunctionality, {
showLoginButtons: true,
showSecondFactor: false,
awaitingApproval: false,
+ maskPassword: true,
canLoginLocal: setting("enable_local_logins"),
canLoginLocalWithEmail: setting("enable_local_logins_via_email"),
@@ -58,6 +59,7 @@ export default Controller.extend(ModalFunctionality, {
showSecurityKey: false,
showLoginButtons: true,
awaitingApproval: false,
+ maskPassword: true,
});
},
@@ -188,6 +190,11 @@ export default Controller.extend(ModalFunctionality, {
this.send("showForgotPassword");
},
+ @action
+ togglePasswordMask() {
+ this.toggleProperty("maskPassword");
+ },
+
actions: {
forgotPassword() {
this.handleForgotPassword();
diff --git a/app/assets/javascripts/discourse/app/controllers/password-reset.js b/app/assets/javascripts/discourse/app/controllers/password-reset.js
index 472a69005dd..6e232fd5b23 100644
--- a/app/assets/javascripts/discourse/app/controllers/password-reset.js
+++ b/app/assets/javascripts/discourse/app/controllers/password-reset.js
@@ -33,6 +33,7 @@ export default Controller.extend(PasswordValidation, {
successMessage: null,
requiresApproval: false,
redirected: false,
+ maskPassword: true,
@discourseComputed()
continueButtonText() {
@@ -58,6 +59,11 @@ export default Controller.extend(PasswordValidation, {
DiscourseURL.redirectTo(this.redirectTo || "/");
},
+ @action
+ togglePasswordMask() {
+ this.toggleProperty("maskPassword");
+ },
+
actions: {
submit() {
ajax({
diff --git a/app/assets/javascripts/discourse/app/templates/invites/show.hbs b/app/assets/javascripts/discourse/app/templates/invites/show.hbs
index 737efb67349..dfe4adf1c20 100644
--- a/app/assets/javascripts/discourse/app/templates/invites/show.hbs
+++ b/app/assets/javascripts/discourse/app/templates/invites/show.hbs
@@ -94,17 +94,20 @@
{{#unless this.externalAuthsOnly}}