From 53386b35c912e4ea1d4928f373a8b16c246c27b0 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Sat, 13 Apr 2024 00:11:20 +0300 Subject: [PATCH] Make Reset account functional --- public/script.js | 4 +- public/scripts/templates/changePassword.html | 2 +- public/scripts/templates/userProfile.html | 2 +- public/scripts/templates/userReset.html | 18 ++++++ public/scripts/user.js | 59 +++++++++++++++++++ src/endpoints/users-private.js | 60 ++++++++++++++++++-- src/endpoints/users-public.js | 6 +- src/users.js | 4 +- 8 files changed, 143 insertions(+), 12 deletions(-) create mode 100644 public/scripts/templates/userReset.html diff --git a/public/script.js b/public/script.js index c9447c2fa..c7d5270c3 100644 --- a/public/script.js +++ b/public/script.js @@ -666,13 +666,15 @@ async function getSystemMessages() { registerPromptManagerMigration(); $(document).ajaxError(function myErrorHandler(_, xhr) { + // Cohee: CSRF doesn't error out in multiple tabs anymore, so this is unnecessary + /* if (xhr.status == 403) { toastr.warning( 'doubleCsrf errors in console are NORMAL in this case. If you want to run ST in multiple tabs, start the server with --disableCsrf option.', 'Looks like you\'ve opened SillyTavern in another browser tab', { timeOut: 0, extendedTimeOut: 0, preventDuplicates: true }, ); - } + } */ }); async function getClientVersion() { diff --git a/public/scripts/templates/changePassword.html b/public/scripts/templates/changePassword.html index bbebf088f..b5ed6ecab 100644 --- a/public/scripts/templates/changePassword.html +++ b/public/scripts/templates/changePassword.html @@ -1,7 +1,7 @@
- +
diff --git a/public/scripts/templates/userProfile.html b/public/scripts/templates/userProfile.html index e80007d85..0aa40eb0d 100644 --- a/public/scripts/templates/userProfile.html +++ b/public/scripts/templates/userProfile.html @@ -77,7 +77,7 @@ Reset Settings
-