diff --git a/packages/apps-electron/src/electron/index.ts b/packages/apps-electron/src/electron/index.ts index 5e5524bff2..544adb467b 100644 --- a/packages/apps-electron/src/electron/index.ts +++ b/packages/apps-electron/src/electron/index.ts @@ -10,18 +10,20 @@ import { createWindow } from './window'; const ENV = process.env.NODE_ENV || 'production'; -const onReady = async () => { - registerAccountStoreHandlers(); - setupContentSecurityPolicy(ENV); - await createWindow(ENV); - await setupAutoUpdater(); -}; - -app.on('web-contents-created', (e, webContents) => { - webContents.on('new-window', (e, url) => { +app.on('web-contents-created', (_, webContents): void => { + webContents.on('new-window', (e, url): void => { e.preventDefault(); shell.openExternal(url).catch(console.error); }); }); -app.whenReady().then(onReady).catch(console.error); +app + .whenReady() + .then(async (): Promise => { + registerAccountStoreHandlers(); + setupContentSecurityPolicy(ENV); + + await createWindow(ENV); + await setupAutoUpdater(); + }) + .catch(console.error); diff --git a/packages/page-accounts/src/Accounts/PasswordInput.tsx b/packages/page-accounts/src/Accounts/PasswordInput.tsx index 605c7d89b6..114ff16a10 100644 --- a/packages/page-accounts/src/Accounts/PasswordInput.tsx +++ b/packages/page-accounts/src/Accounts/PasswordInput.tsx @@ -2,10 +2,9 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { Modal, Password } from '@polkadot/react-components'; -import keyring from '@polkadot/ui-keyring'; - import React, { useCallback, useState } from 'react'; +import { Modal, Password, PasswordStrength } from '@polkadot/react-components'; +import keyring from '@polkadot/ui-keyring'; import { useTranslation } from '../translate'; @@ -67,9 +66,11 @@ export default function PasswordInput ({ onChange, onEnter, password }: Props): onEnter={onEnter} value={password2} /> +

{t('The password and password confirmation for this account. This is required to authenticate any transactions made and to encrypt the keypair.')}

+

{t('Ensure you are using a strong password for proper account protection.')}

); diff --git a/packages/page-accounts/src/Accounts/modals/ChangePass.tsx b/packages/page-accounts/src/Accounts/modals/ChangePass.tsx index 044f046535..79ba547b38 100644 --- a/packages/page-accounts/src/Accounts/modals/ChangePass.tsx +++ b/packages/page-accounts/src/Accounts/modals/ChangePass.tsx @@ -3,7 +3,7 @@ // of the Apache-2.0 license. See the LICENSE file for details. import React, { useCallback, useState } from 'react'; -import { AddressRow, Button, Modal, Password } from '@polkadot/react-components'; +import { AddressRow, Button, Modal, Password, PasswordStrength } from '@polkadot/react-components'; import keyring from '@polkadot/ui-keyring'; import { useTranslation } from '../../translate'; @@ -91,14 +91,15 @@ function ChangePass ({ address, className = '', onClose }: Props): React.ReactEl ('Change account password')} + size='large' > -

{t('This will apply to any future use of this account as stored on this browser. Ensure that you securely store this new password and that it is strong and unique to the account.')}

-
+ /> + + ('The existing account password as specified when this account was created or when it was last changed.')} @@ -108,6 +109,13 @@ function ChangePass ({ address, className = '', onClose }: Props): React.ReactEl tabIndex={1} value={oldPass} /> + + +

{t('The existing account password as specified when this account was created or when it was last changed.')}

+
+
+ + ('The new account password. Once set, all future account unlocks will be performed with this new password.')} isError={!newPass1.isValid} @@ -126,8 +134,12 @@ function ChangePass ({ address, className = '', onClose }: Props): React.ReactEl tabIndex={2} value={newPass2.password} /> -
-
+ + + +

{t('This will apply to any future use of this account as stored on this browser. Ensure that you securely store this new password and that it is strong and unique to the account.')}

+
+