diff --git a/src/js/simple-popups.js b/src/js/simple-popups.js
index 773ac967b..4c6cafba7 100644
--- a/src/js/simple-popups.js
+++ b/src/js/simple-popups.js
@@ -64,18 +64,30 @@ class SimplePopup {
if (this.type === "number") {
this.inputs.forEach((input) => {
el.find(".inputs").append(`
-
+
`);
});
} else if (this.type === "text") {
this.inputs.forEach((input) => {
if (input.type) {
el.find(".inputs").append(`
-
+
`);
} else {
el.find(".inputs").append(`
-
+
`);
}
});
@@ -254,6 +266,8 @@ list.updateName = new SimplePopup(
pass
);
await user.reauthenticateWithCredential(credential);
+ } else if (user.providerData[0].providerId === "google.com") {
+ await user.reauthenticateWithPopup(AccountController.gmailProvider);
}
Loader.show();
@@ -304,13 +318,7 @@ list.updateName = new SimplePopup(
() => {
const user = firebase.auth().currentUser;
if (user.providerData[0].providerId === "google.com") {
- eval(`this.inputs = [
- {
- placeholder: "New name",
- type: "text",
- initVal: "",
- },
- ]`);
+ eval(`this.inputs[0].hidden = true`);
eval(`this.buttonText = "Reauthenticate to update"`);
}
}