From 108f17b0e909e801545668dca059f52d50a4b47a Mon Sep 17 00:00:00 2001 From: Fedor Katurov Date: Tue, 28 Jul 2020 14:11:04 +0700 Subject: [PATCH] moved accounts to settings --- src/components/main/UserButton/index.tsx | 5 --- .../profile/ProfileAccounts/styles.scss | 5 +-- .../profile/ProfileAccountsError/styles.scss | 3 +- .../profile/ProfileSettings/index.tsx | 31 +++++++++++++--- .../profile/ProfileSettings/styles.scss | 37 +++++++++++++++++-- src/constants/errors.ts | 2 +- src/containers/profile/ProfileInfo/index.tsx | 28 ++++++-------- src/containers/profile/ProfileTabs/index.tsx | 7 ---- src/redux/auth/types.ts | 2 +- 9 files changed, 78 insertions(+), 42 deletions(-) diff --git a/src/components/main/UserButton/index.tsx b/src/components/main/UserButton/index.tsx index b31acbc2..c3220067 100644 --- a/src/components/main/UserButton/index.tsx +++ b/src/components/main/UserButton/index.tsx @@ -22,10 +22,6 @@ const UserButton: FC = ({ user: { username, photo }, authOpenProfile, on authOpenProfile(username, 'settings'); }, [authOpenProfile, username]); - const onAccountsOpen = useCallback(() => { - authOpenProfile(username, 'accounts'); - }, [authOpenProfile, username]); - return (
@@ -42,7 +38,6 @@ const UserButton: FC = ({ user: { username, photo }, authOpenProfile, on
Профиль
Настройки
-
Аккаунты
Выдох
diff --git a/src/components/profile/ProfileAccounts/styles.scss b/src/components/profile/ProfileAccounts/styles.scss index bdbb7351..b425072d 100644 --- a/src/components/profile/ProfileAccounts/styles.scss +++ b/src/components/profile/ProfileAccounts/styles.scss @@ -1,10 +1,9 @@ .wrap { - padding: $gap; } .list { - box-shadow: inset transparentize(white, 0.9) 0 0 0 2px; border-radius: $radius; + background: transparentize(white, 0.95); } .buttons { @@ -80,6 +79,6 @@ } .info { - padding: $gap; + padding: $gap $gap / 2; font: $font_14_regular; } diff --git a/src/components/profile/ProfileAccountsError/styles.scss b/src/components/profile/ProfileAccountsError/styles.scss index 10604e68..c36a67a5 100644 --- a/src/components/profile/ProfileAccountsError/styles.scss +++ b/src/components/profile/ProfileAccountsError/styles.scss @@ -12,9 +12,10 @@ margin: 0 !important; padding: $gap; box-sizing: border-box; + border-radius: $radius; @include can_backdrop { - background-color: transparentize($red, 0.5); + background-color: transparentize($red, 0.5); backdrop-filter: blur(10px); } } diff --git a/src/components/profile/ProfileSettings/index.tsx b/src/components/profile/ProfileSettings/index.tsx index d0f9f9eb..e1f3b724 100644 --- a/src/components/profile/ProfileSettings/index.tsx +++ b/src/components/profile/ProfileSettings/index.tsx @@ -11,6 +11,7 @@ import reject from 'ramda/es/reject'; import * as AUTH_ACTIONS from '~/redux/auth/actions'; import { ERROR_LITERAL } from '~/constants/errors'; import { ProfileAccounts } from '~/components/profile/ProfileAccounts'; +import classNames from 'classnames'; const mapStateToProps = state => ({ user: selectAuthUser(state), @@ -70,7 +71,11 @@ const ProfileSettingsUnconnected: FC = ({ return (
- + +
+ О себе +
+ = ({
- + + + +
+ Логин и пароли +
+ = ({ error={patch_errors.new_password && ERROR_LITERAL[patch_errors.new_password]} /> -
- = ({
Чтобы изменить любое из этих полей, нужно ввести старый пароль.
+ + - + + +
+
+ Аккаунты +
+ + +
+ +