From f955e7956a7110268ec75b8bf096421f847a01bd Mon Sep 17 00:00:00 2001 From: Farabi Date: Thu, 10 Oct 2024 11:17:40 +0800 Subject: [PATCH 1/4] fix: bot notification and reload on language switch --- src/app/app-content.jsx | 1 + src/components/layout/footer/index.tsx | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/app/app-content.jsx b/src/app/app-content.jsx index 90e9cd46..a07fa55f 100644 --- a/src/app/app-content.jsx +++ b/src/app/app-content.jsx @@ -17,6 +17,7 @@ import BotBuilder from '../pages/bot-builder'; import Main from '../pages/main'; import './app.scss'; import 'react-toastify/dist/ReactToastify.css'; +import '../components/bot-notification/bot-notification.scss'; const AppContent = () => { const { localize } = useTranslations(); diff --git a/src/components/layout/footer/index.tsx b/src/components/layout/footer/index.tsx index 132b20b9..11c7c963 100644 --- a/src/components/layout/footer/index.tsx +++ b/src/components/layout/footer/index.tsx @@ -46,7 +46,11 @@ const Footer = () => { isModalOpen languages={LANGUAGES} onClose={hideModal} - onLanguageSwitch={code => switchLanguage(code)} + onLanguageSwitch={code => { + switchLanguage(code); + hideModal(); + window.location.reload(); + }} selectedLanguage={currentLang} /> )} From 06fec69359fc2c8ce17567d48fc1c04d35e60094 Mon Sep 17 00:00:00 2001 From: Farabi Date: Fri, 11 Oct 2024 10:39:46 +0800 Subject: [PATCH 2/4] fix: app header and hide deposit button on responsive --- .../custom-notifications.scss | 8 ++++++- src/components/layout/header/header.scss | 7 +++---- src/components/layout/header/header.tsx | 21 +++++++++---------- 3 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/components/layout/header/custom-notifications/custom-notifications.scss b/src/components/layout/header/custom-notifications/custom-notifications.scss index 3a450091..14995f35 100644 --- a/src/components/layout/header/custom-notifications/custom-notifications.scss +++ b/src/components/layout/header/custom-notifications/custom-notifications.scss @@ -1,8 +1,14 @@ +@use 'components/shared/styles/mixins' as *; + .notifications__wrapper { padding-inline-start: 0.5rem; border-inline-start: 1px solid var(--general-section-1); border-width: 1px; - margin-inline-end: 1rem; + margin-inline-end: 2.4rem; + + @include mobile-screen { + margin-inline-end: 0; + } &--desktop { z-index: 10; diff --git a/src/components/layout/header/header.scss b/src/components/layout/header/header.scss index 75f41c2d..dd50a27d 100644 --- a/src/components/layout/header/header.scss +++ b/src/components/layout/header/header.scss @@ -1,8 +1,7 @@ @use 'components/shared/styles/constants' as *; +@use 'components/shared/styles/mixins' as *; .app-header { - padding-inline-end: 20px; - &__account-settings { padding-inline-end: 0.75rem; border-inline-end: 0.1rem solid var(--general-section-1); @@ -42,8 +41,8 @@ } .deriv-account-switcher { - &__button { - margin: 0 1.6rem 0 1.7rem; + &__balance { + padding: 0 1rem 0.1rem 0; } &__list { diff --git a/src/components/layout/header/header.tsx b/src/components/layout/header/header.tsx index be234fb2..b7a887d6 100644 --- a/src/components/layout/header/header.tsx +++ b/src/components/layout/header/header.tsx @@ -1,6 +1,5 @@ import clsx from 'clsx'; import Button from '@/components/shared_ui/button'; -import Text from '@/components/shared_ui/text'; import useActiveAccount from '@/hooks/api/account/useActiveAccount'; import { StandaloneCircleUserRegularIcon } from '@deriv/quill-icons/Standalone'; import { useAuthData } from '@deriv-com/api-hooks'; @@ -45,16 +44,16 @@ const AppHeader = () => { )} - + {isDesktop && ( + + + )} ); } else { From 3e95d3178021122bdffed73feb6a3e9b9a78996e Mon Sep 17 00:00:00 2001 From: Farabi Date: Fri, 11 Oct 2024 10:40:44 +0800 Subject: [PATCH 3/4] fix: deriv bot as selected platform --- .../layout/header/platform-switcher/platform-switcher.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/layout/header/platform-switcher/platform-switcher.tsx b/src/components/layout/header/platform-switcher/platform-switcher.tsx index 3d449515..f3e1b6b1 100644 --- a/src/components/layout/header/platform-switcher/platform-switcher.tsx +++ b/src/components/layout/header/platform-switcher/platform-switcher.tsx @@ -10,7 +10,7 @@ const PlatformSwitcher = () => { {platformsConfig.map(({ active, description, href, icon }) => ( From 93b8066305dfc55170afb88c63c61b15ec3f36f4 Mon Sep 17 00:00:00 2001 From: Farabi Date: Fri, 11 Oct 2024 11:09:03 +0800 Subject: [PATCH 4/4] fix: login signup buttons on header --- src/components/layout/header/header.scss | 4 ---- src/components/layout/header/header.tsx | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/components/layout/header/header.scss b/src/components/layout/header/header.scss index dd50a27d..64e21a04 100644 --- a/src/components/layout/header/header.scss +++ b/src/components/layout/header/header.scss @@ -112,9 +112,5 @@ button { font-weight: 400; margin-right: 1.6rem; - - &:last-child { - margin-right: 0; - } } } diff --git a/src/components/layout/header/header.tsx b/src/components/layout/header/header.tsx index b7a887d6..43744b53 100644 --- a/src/components/layout/header/header.tsx +++ b/src/components/layout/header/header.tsx @@ -60,7 +60,7 @@ const AppHeader = () => { return (