Your account is not verified. Send the verification email again.`
- );
- }
PageTransition.set(false);
AccountButton.loading(true);
if ((await getDataAndInit()) === false) {
@@ -413,35 +404,6 @@ export async function signIn(): Promise Your account is not verified. Send the verification email again.`
+ );
+ }
},
async () => {
//
diff --git a/frontend/src/ts/popups/simple-popups.ts b/frontend/src/ts/popups/simple-popups.ts
index d3e5054b8..f72b5f486 100644
--- a/frontend/src/ts/popups/simple-popups.ts
+++ b/frontend/src/ts/popups/simple-popups.ts
@@ -1241,6 +1241,50 @@ list["deleteCustomTheme"] = new SimplePopup(
}
);
+list["forgotPassword"] = new SimplePopup(
+ "forgotPassword",
+ "text",
+ "Forgot Password",
+ [
+ {
+ type: "text",
+ placeholder: "Email",
+ initVal: "",
+ },
+ ],
+ "",
+ "Send",
+ async (_thisPopup, email) => {
+ Loader.show();
+ const result = await Ape.users.forgotPasswordEmail(email);
+ if (result.status !== 200) {
+ Loader.hide();
+ Notifications.add(
+ "Failed to request password reset email: " + result.message,
+ 5000
+ );
+ } else {
+ Loader.hide();
+ Notifications.add("Password reset email sent", 1, 3);
+ }
+ },
+ (thisPopup) => {
+ const inputValue = $(
+ `.pageLogin .login input[name="current-email"]`
+ ).val() as string;
+ if (inputValue) {
+ thisPopup.inputs[0].initVal = inputValue;
+ }
+ },
+ () => {
+ //
+ }
+);
+
+$(".pageLogin #forgotPasswordButton").on("click", () => {
+ list["forgotPassword"].show();
+});
+
$(".pageSettings .section.discordIntegration #unlinkDiscordButton").on(
"click",
() => {