From 3b9024129d89e29d89c2015702f50f8e1140441f Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Sun, 6 May 2018 11:30:52 +0200 Subject: [PATCH] See #187: Front logic for password reset --- .../registration/password_reset_email.html | 12 +++ front/src/components/auth/Login.vue | 33 ++++--- front/src/router/index.js | 19 +++++ front/src/views/auth/PasswordReset.vue | 75 ++++++++++++++++ front/src/views/auth/PasswordResetConfirm.vue | 85 +++++++++++++++++++ 5 files changed, 211 insertions(+), 13 deletions(-) create mode 100644 api/funkwhale_api/templates/registration/password_reset_email.html create mode 100644 front/src/views/auth/PasswordReset.vue create mode 100644 front/src/views/auth/PasswordResetConfirm.vue diff --git a/api/funkwhale_api/templates/registration/password_reset_email.html b/api/funkwhale_api/templates/registration/password_reset_email.html new file mode 100644 index 000000000..7a587d720 --- /dev/null +++ b/api/funkwhale_api/templates/registration/password_reset_email.html @@ -0,0 +1,12 @@ +{% load i18n %}{% autoescape off %} +{% blocktrans %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endblocktrans %} + +{% trans "Please go to the following page and choose a new password:" %} +{{ funkwhale_url }}/auth/password/reset/confirm?uid={{ uid }}&token={{ token }} +{% trans "Your username, in case you've forgotten:" %} {{ user.get_username }} + +{% trans "Thanks for using our site!" %} + +{% blocktrans %}The {{ site_name }} team{% endblocktrans %} + +{% endautoescape %} diff --git a/front/src/components/auth/Login.vue b/front/src/components/auth/Login.vue index b06ce89f0..f3add57b1 100644 --- a/front/src/components/auth/Login.vue +++ b/front/src/components/auth/Login.vue @@ -12,9 +12,15 @@
- +
- - + + +
- - - - + @@ -42,12 +46,15 @@ + + + diff --git a/front/src/views/auth/PasswordResetConfirm.vue b/front/src/views/auth/PasswordResetConfirm.vue new file mode 100644 index 000000000..d29192498 --- /dev/null +++ b/front/src/views/auth/PasswordResetConfirm.vue @@ -0,0 +1,85 @@ + + + + + +