Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #407 from deriv-com/revert-395-farabi/bot-1118/cre…
Browse files Browse the repository at this point in the history
…ate-permanent-banner-on-binary-bot

Revert "[BOT] Farabi/bot-1118/create permanent banner on binary bot "
  • Loading branch information
farabi-deriv authored Feb 13, 2024
2 parents 1ceef60 + 0baae3a commit f3c8ad7
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 774 deletions.
322 changes: 0 additions & 322 deletions public/images/deriv-banner-responsive.svg

This file was deleted.

329 changes: 0 additions & 329 deletions public/images/deriv-banner.svg

This file was deleted.

2 changes: 1 addition & 1 deletion src/assets/css/_dbot-banner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
}
&__button {
font-size: 14px;
background-color: var(--color-deriv-red);
background-color: var(--color-driv-red);
font-weight: bold;
vertical-align: middle;
align-items: center;
Expand Down
4 changes: 2 additions & 2 deletions src/assets/css/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@

@if $type== 'tertiary' {
background: var(--button-tertiary-default);
color: var(--color-deriv-red) !important;
color: var(--color-driv-red) !important;

&:focus,
&:hover {
Expand All @@ -272,7 +272,7 @@

@if $type== 'link' {
background: transparent;
color: var(--color-deriv-red) !important;
color: var(--color-driv-red) !important;

&:focus:not([disabled]),
&:hover:not([disabled]) {
Expand Down
5 changes: 2 additions & 3 deletions src/assets/css/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,8 @@ $TYPEFACES_LIST: generate-typefaces();
--disabled-color: #f2f2f2;
--static-circle-diameter: 0.5rem;
--dynamic-circle-diameter: 2rem;
--color-deriv-red: #ff444f;
--color-driv-red: #ff444f;

--font-size-xl: 24px;
--font-size-l: 18px;
--font-size-n: 16px;
--font-size-s: 14px;
Expand All @@ -150,7 +149,7 @@ $TYPEFACES_LIST: generate-typefaces();
--text-loss-danger: #{$color-red-1};
--text-colored-background: #{$color-white};
// Buttons
--button-primary-default: var(--color-deriv-red);
--button-primary-default: var(--color-driv-red);
--button-secondary-default: #{$color-grey-1};
--button-tertiary-default: transparent;
--button-primary-hover: #{$color-red-5};
Expand Down
9 changes: 4 additions & 5 deletions src/assets/css/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,6 @@ ul.bullet {
width: 100%;
border: none;
z-index: 999;
position: fixed;

@include mobile {
height: 40px;
Expand Down Expand Up @@ -1040,7 +1039,7 @@ ul.bullet {
text-align: right;

&-text {
color: var(--color-deriv-red);
color: var(--color-driv-red);
font-size: var(--font-size-xs);

&:hover {
Expand All @@ -1056,7 +1055,7 @@ ul.bullet {
border-radius: 4px;
margin: 0 0 14px;
height: 40px;
color: var(--color-deriv-red);
color: var(--color-driv-red);
font-size: var(--font-size-s);
cursor: pointer;

Expand Down Expand Up @@ -1254,7 +1253,7 @@ ul.bullet {
cursor: pointer;

&.ui-tabs-active {
border-bottom: solid 1.5px var(--color-deriv-red) !important;
border-bottom: solid 1.5px var(--color-driv-red) !important;
cursor: default;

a {
Expand Down Expand Up @@ -1649,7 +1648,7 @@ ul.bullet {

&__link {
@include typeface(--paragraph-left-bold-prominent);
color: var(--color-deriv-red);
color: var(--color-driv-red);
text-decoration: none;
}

Expand Down
32 changes: 0 additions & 32 deletions src/components/Banner/fixed-dbot-banner.jsx

This file was deleted.

69 changes: 0 additions & 69 deletions src/components/Banner/fixed-dbot-banner.scss

This file was deleted.

7 changes: 6 additions & 1 deletion src/components/Banner/move-to-dbot-banner.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import GTM from '@utilities/integrations/gtm';
import { observer as globalObserver } from '@utilities/observer';
import { getActiveLoginId } from '@storage';
import DerivAppModal from '../common/deriv-app-modal';
import { visitDerivBot } from './redirect-to-dbot';
import './move-to-dbot-banner.scss';

const updateLastPopupTime = () => {
Expand Down Expand Up @@ -50,6 +49,12 @@ const MoveToDbotBanner = () => {
}
}, []);

const visitDerivBot = () => {
const user_id = getActiveLoginId();
GTM.pushDataLayer({ event: 'bbot_moved_to_deriv_bot', user_id: user_id ?? null });
window.open('https://app.deriv.com/bot/?redirect_from_bbot=1', '_self', 'noopener');
};

const closeModal = () => {
const user_id = getActiveLoginId();
GTM.pushDataLayer({ event: 'bbot_cancel_redirection_popup', user_id: user_id ?? null });
Expand Down
8 changes: 0 additions & 8 deletions src/components/Banner/redirect-to-dbot.js

This file was deleted.

2 changes: 0 additions & 2 deletions src/components/Main/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import TradeInfoPanel from '../../botPage/view/TradeInfoPanel';
import initialize, { applyToolboxPermissions } from '../../blockly/blockly-worksace';
import BotUnavailableMessage from '../Error/bot-unavailable-message-page';
import MoveToDbotBanner from '../Banner/move-to-dbot-banner';
import FixedDbotBanner from '../Banner/fixed-dbot-banner';

const Main = () => {
const [blockly, setBlockly] = React.useState(null);
Expand Down Expand Up @@ -137,7 +136,6 @@ const Main = () => {
},
]}
/>
<FixedDbotBanner />
<MoveToDbotBanner />
<BotUnavailableMessage />
<div id='bot-blockly'>
Expand Down

0 comments on commit f3c8ad7

Please sign in to comment.