这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
a61ec97
Enable isPersisted by default
Apr 11, 2023
65e5266
Adjust bfx logo size
Apr 11, 2023
5e907d0
Remove unused checkbox
Apr 11, 2023
88e81d7
Actualize add account section header
Apr 11, 2023
d0cfbb1
Improve auth dialog sizing
Apr 11, 2023
8240365
Actualize pwd protection description
Apr 11, 2023
6f92fbd
Lint fix
Apr 11, 2023
11f83c6
Improve checkbox styling
Apr 11, 2023
227705c
Actualize auth dialog spacing
Apr 11, 2023
d4f2561
Update platform logo styling
Apr 11, 2023
cb3a9ef
Adjust input key height
Apr 11, 2023
4fbbc85
Actualize secondary text color
Apr 11, 2023
c7025d6
Improve checkbox labels styling
Apr 11, 2023
5a8d386
[wip] LoginApiKey section
Apr 12, 2023
b52130a
Actualize fields and prop-types
Apr 12, 2023
2b08a00
Rework use api key with unified sub-section
Apr 12, 2023
5016e53
Improve input handler naming
Apr 12, 2023
c627ae4
Improve key_url handling
Apr 12, 2023
4771d77
Unused component cleanup
Apr 12, 2023
51a54df
Improve link splitting
Apr 12, 2023
11d196e
Rework api note without callout
Apr 12, 2023
908b64f
Improve api key note spacing
Apr 12, 2023
0a56a17
Update locales
Apr 12, 2023
32699e8
Actualize api key/secret fields labels
Apr 12, 2023
310affe
Add showLoginPassword checker
Apr 12, 2023
db9ff08
[wip] Login password sub-section
Apr 12, 2023
96e032e
Add pwd error labels, actualize prop-types
Apr 12, 2023
fba181d
Rework passwords with unified sub-component
Apr 12, 2023
be77cce
Lint fix
Apr 12, 2023
ee95493
Improve checkboxes aligning
Apr 12, 2023
2e6627a
Update spacing
Apr 12, 2023
4395fea
Add toggleUseApiKey handler
Apr 12, 2023
14294cd
Update auth keys & descriptions
Apr 12, 2023
c1ff93a
Improve footer items alighning
Apr 12, 2023
ee7d01e
Actualize mode switch link color
Apr 12, 2023
d18a39f
Implement login mode switch, cleanup
Apr 12, 2023
ffd3be6
Add mode switch dynamic labeling
Apr 12, 2023
1935e2e
Update auth btn size
Apr 12, 2023
bc0b452
Improve mode swicth aligning
Apr 12, 2023
42f19c0
Update footer sub-sections styling
Apr 12, 2023
2d50c2c
Update api key swicth classnames
Apr 13, 2023
846114b
Add api switch link styling
Apr 13, 2023
895696e
Improve footer actions section positioning
Apr 13, 2023
855370b
Update auth modes switcher
Apr 13, 2023
e525dd9
Lint fix
Apr 13, 2023
f80ca0d
Add sign in to existing acc key/description
Apr 13, 2023
42a432a
Update mode switcher link description
Apr 13, 2023
61c3fbc
Improve footer link spacing
Apr 13, 2023
bd72c10
Update swicth mode styling
Apr 13, 2023
363be2e
Add sign in section switch icon
Apr 13, 2023
3153a94
Adjust sign-in icon
Apr 13, 2023
3f1be30
Improve icon styling, unused styles cleanup
Apr 13, 2023
c87de20
Adjust signup elements
Apr 14, 2023
a0d7520
Fix sub-users list spacing
Apr 14, 2023
e53fd69
Remove remember me checkbox from sign in
Apr 14, 2023
95febf2
Improve checkox spacing
Apr 14, 2023
3fca76d
Remove redundant wrapper and unused element
Apr 14, 2023
88ea76b
Rework sub-accs mode switcher
Apr 14, 2023
e5a805a
Improve spacing
Apr 14, 2023
ac8c40f
Lint fix
Apr 14, 2023
36bae33
Add toggle api key render check
Apr 14, 2023
4a761f0
Implement unified auth mode switcher
Apr 17, 2023
5791fde
Remove unused import
Apr 17, 2023
d156ef8
Improve sign up mode switching
Apr 17, 2023
d055cdb
Cleanup
Apr 17, 2023
b4dc3c4
Make mode switcher icon customizable
Apr 17, 2023
5d576f0
Update sign up footer actions config
Apr 17, 2023
0d3b643
Wrap api note into callout
Apr 18, 2023
250445c
Adjust info icon
Apr 18, 2023
b9625f2
Add api callout icon
Apr 18, 2023
7bca358
Improve callout styling
Apr 18, 2023
642adb6
Actualize change password key/description
Apr 18, 2023
c347ea1
Update pwd section navigation link
Apr 18, 2023
8a3f9b2
Update modal title, remove outdated title icon
Apr 18, 2023
3d69820
Improve dialog configuration
Apr 18, 2023
6faac59
Lint fix and code readabilty improvements
Apr 18, 2023
52b67a8
Add reset password note desription
Apr 18, 2023
c454f87
Add bfx logo to forgot password section
Apr 18, 2023
936257d
Implement reset password notification
Apr 18, 2023
3a4aef6
Add new pwd keys/descriptions
Apr 18, 2023
e8784c6
Actualize update password fields labels
Apr 18, 2023
2c3fcdb
Make api key note redering configurable
Apr 18, 2023
6f3b9a6
Update LoginApiKey config, lint fix
Apr 18, 2023
9688910
Lint fix
Apr 18, 2023
4f6affc
Enhance api section for reset pwd
Apr 18, 2023
b97e503
Add reset pwd key/description
Apr 19, 2023
54c3681
Update forgot password success btn
Apr 19, 2023
f0932aa
Rework and improve section switching
Apr 19, 2023
6e8a6ef
Update locales
Apr 19, 2023
4579dc8
Actualize mode switcher title
Apr 19, 2023
fd93aff
Remove redundant checkbox
Apr 19, 2023
0140b64
Add reset local password key
Apr 19, 2023
452a4d2
Update local pwd render checker and related checkbox title
Apr 19, 2023
8547da9
Actualize rm pwd desription
Apr 19, 2023
ece985e
Update password recovery flow & related helpers
Apr 19, 2023
020a7c3
Improve note callout render cases
Apr 19, 2023
b311242
Implement api key usage toggler
Apr 19, 2023
3e9fa35
Add reset account via api key desriptions
Apr 19, 2023
d913cc1
Update pwd reset type link titles
Apr 19, 2023
0a58c8b
Actualize onPasswordRecovery handler flow
Apr 19, 2023
2fd98f6
Implement show enter password checker
Apr 19, 2023
d0fcb0f
Enhance configuration checkers
Apr 19, 2023
dfd122d
Implement LoginPassword custom labels support, update prop-types
Apr 19, 2023
a644430
Update sign up sub-sections config
Apr 19, 2023
e790ed5
Rework and optimize handle local password section
Apr 19, 2023
4b79752
Cleanup and lint fixes
Apr 19, 2023
a185fcb
Rename isNotPasswordProtected to isPasswordProtectionDisabled
Apr 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions public/locales/en/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,35 @@
"invalidToken": "Invalid token, please try again",
"loginSessionExpired": "Your login session has expired, please try again"
},
"apiKey": "API Key",
"apiSecret": "API Secret",
"accWithApiKey": "Add account with API key",
"accWithoutApiKey": "Add account without API key",
"simpleAccounts": "Simple Accounts",
"multipleAccounts": "Multiple Accounts",
"signUp": "Sign Up",
"signIn": "Sign In",
"signInToExistingAcc": "Sign in to an existing account",
"signInToDifferentAcc": "Sign in to a different account",
"selectMasterAccount": "Select Master Account",
"passwordRecovery": "Password Recovery",
"forgotPassword": "Forgot Password",
"forgotPasswordNote": "Reset your Reports App account by entering your account details and a new password.",
"subAccount": "Sub Account",
"enterAPIKey": "Enter API Key:",
"enterAPISecret": "Enter API Secret:",
"enterPassword": "Enter Bitfinex Report App Password",
"repeatPassword": "Repeat Bitfinex Report App Password",
"enterNewPassword": "Enter New Bitfinex Report App Password",
"repeatNewPassword": "Repeat New Bitfinex Report App Password",
"resetPassword": "Reset Password",
"removeLoginPassword": "Remove Password on Login",
"resetAccWithApiKey": "Reset account with API key",
"resetAccWithoutApiKey": "Reset account without API key",
"enterEmail": "Enter Email:",
"checkAuth": "Check Auth",
"note1": "Visit ",
"note2": " to get the readonly API key and secret pair.",
"passwordProtection": "Enable password protection",
"passwordProtection": "Require Password on Login",
"passwordLengthValidationError": "The password must be at least 8 characters long",
"passwordCharactersValidationError": "The password must include both uppercase and lowercase characters",
"passwordRepeatValidationError": "The password does not match",
Expand Down
1 change: 1 addition & 0 deletions src/components/Auth/InputKey/_InputKey.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
}

.bp3-input {
height: 40px;
padding: 0 15px;
font-size: 15px;

Expand Down
66 changes: 66 additions & 0 deletions src/components/Auth/LoginApiKey/LoginApiKey.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import React, { memo } from 'react'
import PropTypes from 'prop-types'
import { useTranslation } from 'react-i18next'
import { Callout } from '@blueprintjs/core'
import _split from 'lodash/split'

import Icon from 'icons'
import config from 'config'

import InputKey from '../InputKey'

const { KEY_URL } = config

export const LoginApiKey = ({
apiKey,
onChange,
showNote,
apiSecret,
}) => {
const { t } = useTranslation()
return (
<>
{showNote && (
<Callout icon={<Icon.INFO_CIRCLE />}>
<div className='api-key-note'>
{t('auth.note1')}
<a
href={KEY_URL}
target='_blank'
rel='noopener noreferrer'
>
{_split(KEY_URL, 'https://')[1]}
</a>
{t('auth.note2')}
</div>
</Callout>
)
}
<InputKey
name='apiKey'
value={apiKey}
label='auth.apiKey'
onChange={onChange}
/>
<InputKey
name='apiSecret'
value={apiSecret}
label='auth.apiSecret'
onChange={onChange}
/>
</>
)
}

LoginApiKey.propTypes = {
showNote: PropTypes.bool,
onChange: PropTypes.func.isRequired,
apiKey: PropTypes.string.isRequired,
apiSecret: PropTypes.string.isRequired,
}

LoginApiKey.defaultProps = {
showNote: false,
}

export default memo(LoginApiKey)
1 change: 1 addition & 0 deletions src/components/Auth/LoginApiKey/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './LoginApiKey'
44 changes: 44 additions & 0 deletions src/components/Auth/LoginPassword/LoginPassword.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import React, { memo } from 'react'
import PropTypes from 'prop-types'

import InputKey from '../InputKey'
import ErrorLabel from '../ErrorLabel'

export const LoginPassword = ({
onChange,
password,
passwordError,
passwordLabel,
passwordRepeat,
passwordRepeatLabel,
passwordRepeatError,
}) => (
<>
<InputKey
name='password'
value={password}
onChange={onChange}
label={passwordLabel}
/>
<ErrorLabel text={passwordError} />
<InputKey
onChange={onChange}
name='passwordRepeat'
value={passwordRepeat}
label={passwordRepeatLabel}
/>
<ErrorLabel text={passwordRepeatError} />
</>
)

LoginPassword.propTypes = {
onChange: PropTypes.func.isRequired,
password: PropTypes.string.isRequired,
passwordError: PropTypes.string.isRequired,
passwordLabel: PropTypes.string.isRequired,
passwordRepeat: PropTypes.string.isRequired,
passwordRepeatLabel: PropTypes.string.isRequired,
passwordRepeatError: PropTypes.string.isRequired,
}

export default memo(LoginPassword)
1 change: 1 addition & 0 deletions src/components/Auth/LoginPassword/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './LoginPassword'
32 changes: 32 additions & 0 deletions src/components/Auth/ModeSwitcher/ModeSwitcher.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React, { memo } from 'react'
import PropTypes from 'prop-types'

export const ModeSwitcher = ({
icon,
mode,
title,
switchMode,
}) => (
<div className='auth-mode-switch-wrapper'>
<div
onClick={() => switchMode(mode)}
className='bitfinex-auth-mode-switch'
>
{icon}
{title}
</div>
</div>
)

ModeSwitcher.propTypes = {
icon: PropTypes.node,
mode: PropTypes.string.isRequired,
title: PropTypes.string.isRequired,
switchMode: PropTypes.func.isRequired,
}

ModeSwitcher.defaultProps = {
icon: null,
}

export default memo(ModeSwitcher)
1 change: 1 addition & 0 deletions src/components/Auth/ModeSwitcher/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './ModeSwitcher'
Loading