Add 'Forgot Password' button when changing passwords in the Settings Page.

This will directly go into the Reset Password page. This scenario is only possible after already signed in.
This commit is contained in:
infiinte-persistence 2020-07-07 15:36:13 +08:00 committed by Sean Yesmunt
parent fdcfd3b6fc
commit 3f8d447b2a
3 changed files with 13 additions and 1 deletions

View file

@ -17,6 +17,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Option to remove abandoned claims from Blocked Channels page _community pr!_ ([#4433](https://github.com/lbryio/lbry-desktop/pull/4433))
- New channel create/edit page ([#4445](https://github.com/lbryio/lbry-desktop/pull/4445))
- Add dialog to copy various types of links for a claim _community pr!_ ([#4474](https://github.com/lbryio/lbry-desktop/pull/4474))
- Add password reset link to settings page for logged in users _community pr!_ ([#4473](https://github.com/lbryio/lbry-desktop/pull/4473))
### Changed

View file

@ -1252,6 +1252,14 @@
"Old Password": "Old Password",
"New Password": "New Password",
"Set Password": "Set Password",
"Reset Your Password": "Reset Your Password",
"Reset Password": "Reset Password",
"Check your email for a link to reset your password.": "Check your email for a link to reset your password.",
"Email sent!": "Email sent!",
"Choose A New Password": "Choose A New Password",
"Setting a new password for %email%": "Setting a new password for %email%",
"Update Password": "Update Password",
"We can't find that email. Did you mean to register?": "We can't find that email. Did you mean to register?",
"App Notifications": "App Notifications",
"Notification settings for the desktop app.": "Notification settings for the desktop app.",
"Get notified when a publish or channel is confirmed.": "Get notified when a publish or channel is confirmed.",

View file

@ -4,6 +4,7 @@ import { FormField, Form } from 'component/common/form';
import Button from 'component/button';
import ErrorText from 'component/common/error-text';
import Card from 'component/common/card';
import * as PAGES from 'constants/pages';
type Props = {
user: ?User,
@ -64,7 +65,9 @@ export default function SettingAccountPassword(props: Props) {
<div className="section__actions">
<Button button="primary" type="submit" label={__('Set Password')} disabled={!newPassword} />
{!hasPassword && (
{hasPassword ? (
<Button button="link" label={__('Forgot Password?')} navigate={`/$/${PAGES.AUTH_PASSWORD_RESET}`} />
) : (
<Button button="link" label={__('Cancel')} onClick={() => setIsAddingPassword(false)} />
)}
</div>