From 9776c7ed84ab027332e33c8a96f82cedbcd4f931 Mon Sep 17 00:00:00 2001 From: tay suisin Date: Mon, 12 Sep 2022 19:24:00 +0800 Subject: [PATCH 01/10] Binary Pop Up Warning Message --- scripts/config/pages.js | 1 + src/javascript/app/base/binary_pages.js | 2 + src/javascript/app/pages/cashier/cashier.js | 3 +- .../app/pages/dashboard/dashboard.js | 2 + src/javascript/app/pages/user/accounts.js | 8 +++ .../warning_scam_message.js | 0 src/sass/static/pages.scss | 53 +++++++++++++++++++ .../warning_scam_message.jsx | 41 ++++++++++++++ .../warning_scam_message.jsx | 13 +++++ 9 files changed, 122 insertions(+), 1 deletion(-) create mode 100644 src/javascript/app/pages/user/warning_scam_message/warning_scam_message.js create mode 100644 src/templates/app/user/warning_scam_message/warning_scam_message.jsx create mode 100644 src/templates/static/warning_scam_message/warning_scam_message.jsx diff --git a/scripts/config/pages.js b/scripts/config/pages.js index eaba962e92138..f38bf06c1a5d1 100644 --- a/scripts/config/pages.js +++ b/scripts/config/pages.js @@ -72,6 +72,7 @@ module.exports = [ ['explanation', 'app/trade/explanation', null], ['logged_inws', 'app/logged_in', null], ['redirect', 'app/logged_in', null, 'Redirecting...'], + ['user/warning-scam-message', 'app/user/warning_scam_message/warning_scam_message', null, 'Scam'], // ==================== Section: "static" ==================== ['404', 'static/404', 'full_width', '404'], diff --git a/src/javascript/app/base/binary_pages.js b/src/javascript/app/base/binary_pages.js index a6ab58764e43d..888fbf402a2c5 100644 --- a/src/javascript/app/base/binary_pages.js +++ b/src/javascript/app/base/binary_pages.js @@ -53,6 +53,7 @@ const SetCurrency = require('../pages/user/set_currency'); const TelegramBot = require('../pages/user/telegram_bot'); const TNCApproval = require('../pages/user/tnc_approval'); const VideoFacility = require('../pages/user/video_facility'); +const WarningScamMessage = require('../pages/user/warning_scam_message/warning_scam_message'); // ==================== static ==================== // const Charity = require('../../static/pages/charity'); @@ -168,6 +169,7 @@ const pages_config = { 'types-of-accounts' : { module: TypesOfAccounts }, 'video-facility' : { module: VideoFacility, is_authenticated: true, only_real: true }, 'why-us' : { module: WhyUs }, + 'warning-scam-message' : { module: WarningScamMessage }, }; /* eslint-enable max-len */ diff --git a/src/javascript/app/pages/cashier/cashier.js b/src/javascript/app/pages/cashier/cashier.js index c664e33a0fb61..418a503ba0371 100644 --- a/src/javascript/app/pages/cashier/cashier.js +++ b/src/javascript/app/pages/cashier/cashier.js @@ -329,7 +329,8 @@ const Cashier = (() => { }); } else { el_fiat_deposit.on('click', ()=>{ - Accounts.showCurrencyPopUp('create', 'deposit', true); + Accounts.showWarningMessagePopUp() + // Accounts.showCurrencyPopUp('create', 'deposit', true); return false; }); el_fiat_withdraw.on('click', ()=>{ diff --git a/src/javascript/app/pages/dashboard/dashboard.js b/src/javascript/app/pages/dashboard/dashboard.js index 3b3b067a3c22b..41cdf0aa987fe 100644 --- a/src/javascript/app/pages/dashboard/dashboard.js +++ b/src/javascript/app/pages/dashboard/dashboard.js @@ -5,6 +5,7 @@ const BinarySocket = require('../../base/socket'); const ServerTime = require('../../../_common/base/server_time'); const getLanguage = require('../../../_common/language').get; const urlForStatic = require('../../../_common/url').urlForStatic; +const Accounts = require('../user/accounts'); const Dashboard = (() => { let el_shadow_dom_dashboard; @@ -14,6 +15,7 @@ const Dashboard = (() => { const onUnload = () => ReactDOM.unmountComponentAtNode(el_shadow_dom_dashboard); const renderDashboard = (module) => { + Accounts.showWarningMessagePopUp(); const el_loading = document.getElementById('loading_dashboard'); const el_dashboard_container = document.getElementById('binary_dashboard'); diff --git a/src/javascript/app/pages/user/accounts.js b/src/javascript/app/pages/user/accounts.js index a202e5ea5e414..67133446091d9 100644 --- a/src/javascript/app/pages/user/accounts.js +++ b/src/javascript/app/pages/user/accounts.js @@ -189,6 +189,13 @@ const Accounts = (() => { switch: 'switch_account', }; + const showWarningMessagePopUp = () => { + showPopup({ + url : urlFor('user/warning-scam-message'), + content_id: '#warning_scam_message', + }); + }; + const showCurrencyPopUp = (action, redirect_to, all_fiat, all_crypto) => { showPopup({ url : urlFor('user/set-currency'), @@ -335,6 +342,7 @@ const Accounts = (() => { onLoad, onUnload, showCurrencyPopUp, + showWarningMessagePopUp, populateMultiAccount, }; })(); diff --git a/src/javascript/app/pages/user/warning_scam_message/warning_scam_message.js b/src/javascript/app/pages/user/warning_scam_message/warning_scam_message.js new file mode 100644 index 0000000000000..e69de29bb2d1d diff --git a/src/sass/static/pages.scss b/src/sass/static/pages.scss index db705ca3c1bf2..bba3c4e0bdc9b 100644 --- a/src/sass/static/pages.scss +++ b/src/sass/static/pages.scss @@ -843,6 +843,59 @@ body #not_authenticated_financial ul.checked > li { } } +.lightbox #warning_scam_message { + padding: 25px; + padding-bottom: 20px; + + #warning_scam_message_title_secondary { + color: $COLOR_BLACK; + } + #warning_scam_message_text_secondary { + font-size: 16px; + } + .warning-scam-message--content__info--message { + display: flex; + margin-bottom: 24px; + } + #warning_scam_message_scam_title_text { + font-weight: 300; + margin-bottom: 0; + } + .warning_scam_message_correct_content { + display: flex; + border: solid $COLOR_GREEN; + border-radius: 4px; + padding: 16px 0; + margin-bottom: 24px; + flex-direction: column; + justify-content: center; + } + .warning_scam_message_wrong_content { + display: flex; + border: solid $COLOR_RED; + border-radius: 4px; + padding: 16px 0; + margin-bottom: 24px; + flex-direction: column; + justify-content: center; + } + .warning_scam_message_link_container { + display: flex; + margin: 0 8px 0 32px; + border-radius: 4px; + border: solid $COLOR_GRAY_SHADE; + background-color: $COLOR_LIGHT_GRAY; + justify-content: center; + align-items: center; + } + #warning-scam-message-link { + margin: 8px 0; + } + .warning_scam_message_checkbox_container { + display: flex; + } +} + .lightbox #set_currency { padding: 25px; padding-bottom: 20px; diff --git a/src/templates/app/user/warning_scam_message/warning_scam_message.jsx b/src/templates/app/user/warning_scam_message/warning_scam_message.jsx new file mode 100644 index 0000000000000..246fd81500db9 --- /dev/null +++ b/src/templates/app/user/warning_scam_message/warning_scam_message.jsx @@ -0,0 +1,41 @@ +import React from 'react'; + +const WarningScamMessage = () => ( + +
+

{it.L('Beware of the fake links.')}

+

{it.L('A link can contain the word "Binary" and still be fake.')}

+

{it.L('Do not get lured to fake "Binary" pages!')}

+

{it.L('You may see links to websites with a fake Binary login page where you’ll get scammed for your money. ')}

+
+

{it.L('Do not trust and give away your credentials on fake websites, ads or emails.')}

+
+
+
+

+ {it.L('Only log in to your account at this secure link, never elsewhere.')} +

+
+
+ +
+
+
+
+

+ {it.L('Fake links often contain the word that looks like "Binary" but look out for these differences.')} +

+
+
+ +
+
+
+ +

{it.L('I\'ve read the above carefully.')}

+
+
+
+); + +export default WarningScamMessage; diff --git a/src/templates/static/warning_scam_message/warning_scam_message.jsx b/src/templates/static/warning_scam_message/warning_scam_message.jsx new file mode 100644 index 0000000000000..b28d7416997f7 --- /dev/null +++ b/src/templates/static/warning_scam_message/warning_scam_message.jsx @@ -0,0 +1,13 @@ +import React from 'react'; + +const WarningScamMessage = () => ( + +
+
+ Hi +
+
+
+); + +export default WarningScamMessage; From aa4ff8912401447e6b42f96a48d974ddcd777ed2 Mon Sep 17 00:00:00 2001 From: tay suisin Date: Tue, 13 Sep 2022 16:51:15 +0800 Subject: [PATCH 02/10] Updated Latest File Display for warning message pop up --- scripts/config/pages.js | 1 - src/javascript/app/base/binary_pages.js | 2 - src/javascript/app/base/client.js | 2 + src/javascript/app/base/page.js | 4 ++ src/javascript/app/pages/cashier/cashier.js | 3 +- .../app/pages/dashboard/dashboard.js | 2 - src/javascript/app/pages/user/accounts.js | 8 --- .../warning_scam_message.js | 43 ++++++++++++++ src/sass/static/pages.scss | 18 +++--- src/templates/_common/_layout/layout.jsx | 2 + .../warning_scam_message.jsx | 59 ++++++++++--------- .../warning_scam_message.jsx | 13 ---- 12 files changed, 95 insertions(+), 62 deletions(-) delete mode 100644 src/templates/static/warning_scam_message/warning_scam_message.jsx diff --git a/scripts/config/pages.js b/scripts/config/pages.js index f38bf06c1a5d1..eaba962e92138 100644 --- a/scripts/config/pages.js +++ b/scripts/config/pages.js @@ -72,7 +72,6 @@ module.exports = [ ['explanation', 'app/trade/explanation', null], ['logged_inws', 'app/logged_in', null], ['redirect', 'app/logged_in', null, 'Redirecting...'], - ['user/warning-scam-message', 'app/user/warning_scam_message/warning_scam_message', null, 'Scam'], // ==================== Section: "static" ==================== ['404', 'static/404', 'full_width', '404'], diff --git a/src/javascript/app/base/binary_pages.js b/src/javascript/app/base/binary_pages.js index 888fbf402a2c5..a6ab58764e43d 100644 --- a/src/javascript/app/base/binary_pages.js +++ b/src/javascript/app/base/binary_pages.js @@ -53,7 +53,6 @@ const SetCurrency = require('../pages/user/set_currency'); const TelegramBot = require('../pages/user/telegram_bot'); const TNCApproval = require('../pages/user/tnc_approval'); const VideoFacility = require('../pages/user/video_facility'); -const WarningScamMessage = require('../pages/user/warning_scam_message/warning_scam_message'); // ==================== static ==================== // const Charity = require('../../static/pages/charity'); @@ -169,7 +168,6 @@ const pages_config = { 'types-of-accounts' : { module: TypesOfAccounts }, 'video-facility' : { module: VideoFacility, is_authenticated: true, only_real: true }, 'why-us' : { module: WhyUs }, - 'warning-scam-message' : { module: WarningScamMessage }, }; /* eslint-enable max-len */ diff --git a/src/javascript/app/base/client.js b/src/javascript/app/base/client.js index d061e9de41e97..5876fcb942009 100644 --- a/src/javascript/app/base/client.js +++ b/src/javascript/app/base/client.js @@ -120,6 +120,8 @@ const Client = (() => { if (response.logout !== 1) return; removeCookies('login', 'loginid', 'loginid_list', 'email', 'residence', 'settings'); // backward compatibility removeCookies('reality_check', 'affiliate_token', 'affiliate_tracking', 'onfido_token', 'hide_guide'); + // clear local storage + localStorage.removeItem('readScamMessage'); // clear elev.io session storage sessionStorage.removeItem('_elevaddon-6app'); sessionStorage.removeItem('_elevaddon-6create'); diff --git a/src/javascript/app/base/page.js b/src/javascript/app/base/page.js index d7211c4895b12..15d208a74c418 100644 --- a/src/javascript/app/base/page.js +++ b/src/javascript/app/base/page.js @@ -27,6 +27,7 @@ const Url = require('../../_common/url'); const createElement = require('../../_common/utility').createElement; const isLoginPages = require('../../_common/utility').isLoginPages; const isProduction = require('../../config').isProduction; +const WarningScamMessage = require('../pages/user/warning_scam_message/warning_scam_message'); const ClosePopup = require('../common/game_close_popup'); const EuClosePopup = require('../common/eu_close_popup'); const EuCloseBanner = require('../common/eu_close_baner'); @@ -129,6 +130,8 @@ const Page = (() => { BinarySocket.wait('authorize', 'website_status', 'get_account_status').then(() => { RealityCheck.onLoad(); Menu.init(); + const is_at_brazil = State.getResponse('website_status.clients_country') === 'my'; + const read_scam_message = localStorage.getItem('readScamMessage') || false; const is_uk_residence = (Client.get('residence') === 'gb' || State.getResponse('website_status.clients_country') === 'gb'); const is_iom_client = (Client.get('residence') === 'im' || State.getResponse('website_status.clients_country') === 'im'); const is_be_client = (Client.get('residence') === 'be' || State.getResponse('website_status.clients_country') === 'be') && Client.hasAccountType('gaming'); @@ -136,6 +139,7 @@ const Page = (() => { const mlt_check = ClientBase.get('landing_company_shortcode') === 'malta'; const mf_check = ClientBase.get('landing_company_shortcode') === 'maltainvest'; const virtual_account = Client.get('landing_company_shortcode') === 'virtual'; + if (is_at_brazil && !read_scam_message) { WarningScamMessage.has_read_warning_scam_message(); } if (!is_iom_client || is_uk_residence && !Client.hasAccountType('gaming') || mf_check || mlt_check) RedirectBanner.loginOnLoad(); if (is_uk_residence && Client.hasAccountType('gaming')) { CloseBanner.onLoad(); diff --git a/src/javascript/app/pages/cashier/cashier.js b/src/javascript/app/pages/cashier/cashier.js index 418a503ba0371..c664e33a0fb61 100644 --- a/src/javascript/app/pages/cashier/cashier.js +++ b/src/javascript/app/pages/cashier/cashier.js @@ -329,8 +329,7 @@ const Cashier = (() => { }); } else { el_fiat_deposit.on('click', ()=>{ - Accounts.showWarningMessagePopUp() - // Accounts.showCurrencyPopUp('create', 'deposit', true); + Accounts.showCurrencyPopUp('create', 'deposit', true); return false; }); el_fiat_withdraw.on('click', ()=>{ diff --git a/src/javascript/app/pages/dashboard/dashboard.js b/src/javascript/app/pages/dashboard/dashboard.js index 41cdf0aa987fe..3b3b067a3c22b 100644 --- a/src/javascript/app/pages/dashboard/dashboard.js +++ b/src/javascript/app/pages/dashboard/dashboard.js @@ -5,7 +5,6 @@ const BinarySocket = require('../../base/socket'); const ServerTime = require('../../../_common/base/server_time'); const getLanguage = require('../../../_common/language').get; const urlForStatic = require('../../../_common/url').urlForStatic; -const Accounts = require('../user/accounts'); const Dashboard = (() => { let el_shadow_dom_dashboard; @@ -15,7 +14,6 @@ const Dashboard = (() => { const onUnload = () => ReactDOM.unmountComponentAtNode(el_shadow_dom_dashboard); const renderDashboard = (module) => { - Accounts.showWarningMessagePopUp(); const el_loading = document.getElementById('loading_dashboard'); const el_dashboard_container = document.getElementById('binary_dashboard'); diff --git a/src/javascript/app/pages/user/accounts.js b/src/javascript/app/pages/user/accounts.js index 67133446091d9..a202e5ea5e414 100644 --- a/src/javascript/app/pages/user/accounts.js +++ b/src/javascript/app/pages/user/accounts.js @@ -189,13 +189,6 @@ const Accounts = (() => { switch: 'switch_account', }; - const showWarningMessagePopUp = () => { - showPopup({ - url : urlFor('user/warning-scam-message'), - content_id: '#warning_scam_message', - }); - }; - const showCurrencyPopUp = (action, redirect_to, all_fiat, all_crypto) => { showPopup({ url : urlFor('user/set-currency'), @@ -342,7 +335,6 @@ const Accounts = (() => { onLoad, onUnload, showCurrencyPopUp, - showWarningMessagePopUp, populateMultiAccount, }; })(); diff --git a/src/javascript/app/pages/user/warning_scam_message/warning_scam_message.js b/src/javascript/app/pages/user/warning_scam_message/warning_scam_message.js index e69de29bb2d1d..48967fed95bf5 100644 --- a/src/javascript/app/pages/user/warning_scam_message/warning_scam_message.js +++ b/src/javascript/app/pages/user/warning_scam_message/warning_scam_message.js @@ -0,0 +1,43 @@ +const getElementById = require('../../../../_common/common_functions').getElementById; +const BinarySocket = require('../../../base/socket'); +const Client = require('../../../base/client'); +const State = require('../../../../_common/storage').State; + +const WarningScamMessage = (()=>{ + let warning_scam_message, warning_scam_message_button, warning_scam_message_checkbox; + + const has_read_warning_scam_message = () => { + BinarySocket.wait('authorize', 'website_status').then(()=> { + const is_logged_in = !!Client.isLoggedIn(); + const is_brazil = State.getResponse('website_status.clients_country') === 'my'; + const is_message_read = localStorage.getItem('readScamMessage') || false; + + if (is_logged_in && is_brazil && !is_message_read) { + warning_scam_message = getElementById('warning_scam_message'); + warning_scam_message_checkbox = getElementById('warning_scam_message_checkbox'); + } + warning_scam_message.setVisibility(1); + warning_scam_message_checkbox.addEventListener('change', acknowledgeMessage); + }); + }; + + const acknowledgeMessage = () => { + warning_scam_message_button = getElementById('warning_scam_message_button'); + if (warning_scam_message_button.classList.contains('button-disabled')) { + warning_scam_message_button.classList.remove('button-disabled'); + } else { + warning_scam_message_button.classList.add('button-disabled'); + } + + warning_scam_message_button.addEventListener('click',closePopup); + }; + + const closePopup = () => { + localStorage.setItem('readScamMessage', true); + warning_scam_message.setVisibility(0); + }; + + return { has_read_warning_scam_message, acknowledgeMessage, closePopup }; +})(); + +module.exports = WarningScamMessage; diff --git a/src/sass/static/pages.scss b/src/sass/static/pages.scss index bba3c4e0bdc9b..f29ee36f2686f 100644 --- a/src/sass/static/pages.scss +++ b/src/sass/static/pages.scss @@ -843,7 +843,7 @@ body #not_authenticated_financial ul.checked > li { } } -.lightbox #warning_scam_message { +.lightbox #warning_scam_message_content { padding: 25px; padding-bottom: 20px; @@ -853,7 +853,7 @@ body #not_authenticated_financial ul.checked > li { #warning_scam_message_text_secondary { font-size: 16px; } - .warning-scam-message--content__info--message { + .warning-scam-message-content-info-message { display: flex; margin-bottom: 24px; } @@ -861,7 +861,7 @@ body #not_authenticated_financial ul.checked > li { font-weight: 300; margin-bottom: 0; } - .warning_scam_message_correct_content { + .warning-scam-message-correct-content { display: flex; border: solid $COLOR_GREEN; border-radius: 4px; @@ -870,7 +870,7 @@ body #not_authenticated_financial ul.checked > li { flex-direction: column; justify-content: center; } - .warning_scam_message_wrong_content { + .warning-scam-message-wrong-content { display: flex; border: solid $COLOR_RED; border-radius: 4px; @@ -879,7 +879,7 @@ body #not_authenticated_financial ul.checked > li { flex-direction: column; justify-content: center; } - .warning_scam_message_link_container { + .warning-scam-message-link-container { display: flex; margin: 0 8px 0 32px; border-radius: 4px; @@ -888,12 +888,16 @@ body #not_authenticated_financial ul.checked > li { justify-content: center; align-items: center; } - #warning-scam-message-link { + #warning_scam_message_link { margin: 8px 0; } - .warning_scam_message_checkbox_container { + .warning-scam-message-checkbox-container { display: flex; } + .warning-scam-message-button-icon-container { + padding: 24px; + justify-content: space-between; + } } .lightbox #set_currency { diff --git a/src/templates/_common/_layout/layout.jsx b/src/templates/_common/_layout/layout.jsx index 8dae88046d7a5..9c05532addc43 100644 --- a/src/templates/_common/_layout/layout.jsx +++ b/src/templates/_common/_layout/layout.jsx @@ -13,6 +13,7 @@ import GameCloseBanner from '../components/game_close_banner.jsx'; import GameCloseBannerIom from '../components/game_close_banner_iom.jsx'; import EuCloseBanner from '../components/eu_close_banner.jsx'; import EuClosePopup from '../components/eu_close_popup.jsx'; +import WarningScamMessage from '../../app/user/warning_scam_message/warning_scam_message.jsx'; import RedirectBanner from '../components/EU_UK_redirect_banner.jsx'; export const CONTENT_PLACEHOLDER = 'CONTENT_PLACEHOLDER'; @@ -70,6 +71,7 @@ const Layout = () => { + ); diff --git a/src/templates/app/user/warning_scam_message/warning_scam_message.jsx b/src/templates/app/user/warning_scam_message/warning_scam_message.jsx index 246fd81500db9..2e02638867f95 100644 --- a/src/templates/app/user/warning_scam_message/warning_scam_message.jsx +++ b/src/templates/app/user/warning_scam_message/warning_scam_message.jsx @@ -2,37 +2,42 @@ import React from 'react'; const WarningScamMessage = () => ( -
-

{it.L('Beware of the fake links.')}

-

{it.L('A link can contain the word "Binary" and still be fake.')}

-

{it.L('Do not get lured to fake "Binary" pages!')}

-

{it.L('You may see links to websites with a fake Binary login page where you’ll get scammed for your money. ')}

-
-

{it.L('Do not trust and give away your credentials on fake websites, ads or emails.')}

-
-
-
-

- {it.L('Only log in to your account at this secure link, never elsewhere.')} -

+
+
+

{it.L('Beware of the fake links.')}

+

{it.L('A link can contain the word "Binary" and still be fake.')}

+

{it.L('Do not get lured to fake "Binary" pages!')}

+

{it.L('You may see links to websites with a fake Binary login page where you’ll get scammed for your money. ')}

+
+

{it.L('Do not trust and give away your credentials on fake websites, ads or emails.')}

-
- +
+
+

+ {it.L('Only log in to your account at this secure link, never elsewhere.')} +

+
+
+ +
-
-
-
-

- {it.L('Fake links often contain the word that looks like "Binary" but look out for these differences.')} -

+
+
+

+ {it.L('Fake links often contain the word that looks like "Binary" but look out for these differences.')} +

+
+
+ +
-
- +
+ + +
+
+
-
-
- -

{it.L('I\'ve read the above carefully.')}

diff --git a/src/templates/static/warning_scam_message/warning_scam_message.jsx b/src/templates/static/warning_scam_message/warning_scam_message.jsx deleted file mode 100644 index b28d7416997f7..0000000000000 --- a/src/templates/static/warning_scam_message/warning_scam_message.jsx +++ /dev/null @@ -1,13 +0,0 @@ -import React from 'react'; - -const WarningScamMessage = () => ( - -
-
- Hi -
-
-
-); - -export default WarningScamMessage; From 06036d6f55aafd4352b1dd9ccc6bfb304eece184 Mon Sep 17 00:00:00 2001 From: tay suisin Date: Tue, 13 Sep 2022 16:58:13 +0800 Subject: [PATCH 03/10] Update File Location --- src/javascript/app/base/page.js | 2 +- .../{warning_scam_message => }/warning_scam_message.js | 8 ++++---- src/templates/_common/_layout/layout.jsx | 2 +- .../{warning_scam_message => }/warning_scam_message.jsx | 0 4 files changed, 6 insertions(+), 6 deletions(-) rename src/javascript/app/pages/user/{warning_scam_message => }/warning_scam_message.js (84%) rename src/templates/app/user/{warning_scam_message => }/warning_scam_message.jsx (100%) diff --git a/src/javascript/app/base/page.js b/src/javascript/app/base/page.js index 15d208a74c418..673b0268d8695 100644 --- a/src/javascript/app/base/page.js +++ b/src/javascript/app/base/page.js @@ -27,7 +27,7 @@ const Url = require('../../_common/url'); const createElement = require('../../_common/utility').createElement; const isLoginPages = require('../../_common/utility').isLoginPages; const isProduction = require('../../config').isProduction; -const WarningScamMessage = require('../pages/user/warning_scam_message/warning_scam_message'); +const WarningScamMessage = require('../pages/user/warning_scam_message'); const ClosePopup = require('../common/game_close_popup'); const EuClosePopup = require('../common/eu_close_popup'); const EuCloseBanner = require('../common/eu_close_baner'); diff --git a/src/javascript/app/pages/user/warning_scam_message/warning_scam_message.js b/src/javascript/app/pages/user/warning_scam_message.js similarity index 84% rename from src/javascript/app/pages/user/warning_scam_message/warning_scam_message.js rename to src/javascript/app/pages/user/warning_scam_message.js index 48967fed95bf5..97d94efebc64d 100644 --- a/src/javascript/app/pages/user/warning_scam_message/warning_scam_message.js +++ b/src/javascript/app/pages/user/warning_scam_message.js @@ -1,7 +1,7 @@ -const getElementById = require('../../../../_common/common_functions').getElementById; -const BinarySocket = require('../../../base/socket'); -const Client = require('../../../base/client'); -const State = require('../../../../_common/storage').State; +const getElementById = require('../../../_common/common_functions').getElementById; +const BinarySocket = require('../../base/socket'); +const Client = require('../../base/client'); +const State = require('../../../_common/storage').State; const WarningScamMessage = (()=>{ let warning_scam_message, warning_scam_message_button, warning_scam_message_checkbox; diff --git a/src/templates/_common/_layout/layout.jsx b/src/templates/_common/_layout/layout.jsx index 9c05532addc43..ffd9716f41fa9 100644 --- a/src/templates/_common/_layout/layout.jsx +++ b/src/templates/_common/_layout/layout.jsx @@ -13,7 +13,7 @@ import GameCloseBanner from '../components/game_close_banner.jsx'; import GameCloseBannerIom from '../components/game_close_banner_iom.jsx'; import EuCloseBanner from '../components/eu_close_banner.jsx'; import EuClosePopup from '../components/eu_close_popup.jsx'; -import WarningScamMessage from '../../app/user/warning_scam_message/warning_scam_message.jsx'; +import WarningScamMessage from '../../app/user/warning_scam_message.jsx'; import RedirectBanner from '../components/EU_UK_redirect_banner.jsx'; export const CONTENT_PLACEHOLDER = 'CONTENT_PLACEHOLDER'; diff --git a/src/templates/app/user/warning_scam_message/warning_scam_message.jsx b/src/templates/app/user/warning_scam_message.jsx similarity index 100% rename from src/templates/app/user/warning_scam_message/warning_scam_message.jsx rename to src/templates/app/user/warning_scam_message.jsx From 600974b4bd725a38bdedf52e926c89215a5a1284 Mon Sep 17 00:00:00 2001 From: tay suisin Date: Wed, 14 Sep 2022 19:01:56 +0800 Subject: [PATCH 04/10] Update icons and scss for popup --- .../warning_scam_message/ic-account-cross.svg | 1 + .../ic-account-dont-get-scam.svg | 1 + .../warning_scam_message/ic-account-tick.svg | 1 + src/sass/static/pages.scss | 62 ++++++++++++++++++- .../app/user/warning_scam_message.jsx | 10 ++- 5 files changed, 69 insertions(+), 6 deletions(-) create mode 100644 src/images/pages/warning_scam_message/ic-account-cross.svg create mode 100644 src/images/pages/warning_scam_message/ic-account-dont-get-scam.svg create mode 100644 src/images/pages/warning_scam_message/ic-account-tick.svg diff --git a/src/images/pages/warning_scam_message/ic-account-cross.svg b/src/images/pages/warning_scam_message/ic-account-cross.svg new file mode 100644 index 0000000000000..81fa18c776a0e --- /dev/null +++ b/src/images/pages/warning_scam_message/ic-account-cross.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/images/pages/warning_scam_message/ic-account-dont-get-scam.svg b/src/images/pages/warning_scam_message/ic-account-dont-get-scam.svg new file mode 100644 index 0000000000000..fea9213e32c2d --- /dev/null +++ b/src/images/pages/warning_scam_message/ic-account-dont-get-scam.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/images/pages/warning_scam_message/ic-account-tick.svg b/src/images/pages/warning_scam_message/ic-account-tick.svg new file mode 100644 index 0000000000000..8b79910ac316f --- /dev/null +++ b/src/images/pages/warning_scam_message/ic-account-tick.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/sass/static/pages.scss b/src/sass/static/pages.scss index f29ee36f2686f..7d5c4bff3f465 100644 --- a/src/sass/static/pages.scss +++ b/src/sass/static/pages.scss @@ -847,41 +847,71 @@ body #not_authenticated_financial ul.checked > li { padding: 25px; padding-bottom: 20px; + #warning_scam_message_title { + @media (min-width: 320px) and (max-width: 767px) { + font-size: 20px; + margin-bottom: 8px; + } + } + #warning_scam_message_subtitle { + @media (min-width: 320px) and (max-width: 767px) { + font-size: 14px; + } + } #warning_scam_message_title_secondary { color: $COLOR_BLACK; + @media (min-width: 320px) and (max-width: 767px) { + font-size: 18px; + margin-bottom: 8px; + } } #warning_scam_message_text_secondary { font-size: 16px; + @media (min-width: 320px) and (max-width: 767px) { + font-size: 14px; + margin-bottom: 24px; + } } .warning-scam-message-content-info-message { display: flex; + padding-left: 8px; margin-bottom: 24px; } #warning_scam_message_scam_title_text { font-weight: 300; margin-bottom: 0; + color: $COLOR_BLACK; + @media (min-width: 320px) and (max-width: 767px) { + font-size: 16px; + } } .warning-scam-message-correct-content { display: flex; border: solid $COLOR_GREEN; border-radius: 4px; - padding: 16px 0; + padding: 16px 8px; margin-bottom: 24px; flex-direction: column; justify-content: center; + @media (min-width: 320px) and (max-width: 767px) { + padding: 22px 8px; + } } .warning-scam-message-wrong-content { display: flex; border: solid $COLOR_RED; border-radius: 4px; - padding: 16px 0; + padding: 16px 8px; margin-bottom: 24px; flex-direction: column; justify-content: center; + @media (min-width: 320px) and (max-width: 767px) { + padding: 22px 8px; + } } .warning-scam-message-link-container { display: flex; - margin: 0 8px 0 32px; + margin-left: 24px; border-radius: 4px; border: solid $COLOR_GRAY_SHADE; background-color: $COLOR_LIGHT_GRAY; @@ -890,13 +920,39 @@ body #not_authenticated_financial ul.checked > li { } #warning_scam_message_link { margin: 8px 0; + @media (min-width: 320px) and (max-width: 767px) { + font-size: 16px; + } } .warning-scam-message-checkbox-container { display: flex; } .warning-scam-message-button-icon-container { padding: 24px; + display: flex; justify-content: space-between; + @media (min-width: 320px) and (max-width: 767px) { + padding-top: 40px; + flex-direction: column-reverse; + align-items: center; + justify-content: center; + } + } + #warning_scam_message_button { + margin-bottom: 0; + @media (min-width: 320px) and (max-width: 767px) { + margin-bottom: 24px; + } + } + #warning_scam_message_acknowledge_message { + @media (min-width: 320px) and (max-width: 767px) { + font-size: 14px; + } + } + .icon-sm { + height: 16px; + width: 16px; + margin-right: 8px; } } diff --git a/src/templates/app/user/warning_scam_message.jsx b/src/templates/app/user/warning_scam_message.jsx index 2e02638867f95..13f2e968b1ac6 100644 --- a/src/templates/app/user/warning_scam_message.jsx +++ b/src/templates/app/user/warning_scam_message.jsx @@ -4,15 +4,17 @@ const WarningScamMessage = () => (
-

{it.L('Beware of the fake links.')}

-

{it.L('A link can contain the word "Binary" and still be fake.')}

+

{it.L('Beware of the fake links.')}

+

{it.L('A link can contain the word "Binary" and still be fake.')}

{it.L('Do not get lured to fake "Binary" pages!')}

{it.L('You may see links to websites with a fake Binary login page where you’ll get scammed for your money. ')}

+

{it.L('Do not trust and give away your credentials on fake websites, ads or emails.')}

+

{it.L('Only log in to your account at this secure link, never elsewhere.')}

@@ -23,6 +25,7 @@ const WarningScamMessage = () => (
+

{it.L('Fake links often contain the word that looks like "Binary" but look out for these differences.')}

@@ -33,9 +36,10 @@ const WarningScamMessage = () => (
- +
+
From 45c920e9d8cd965a1c7628a3343e62b0439295ea Mon Sep 17 00:00:00 2001 From: tay suisin Date: Thu, 15 Sep 2022 15:15:24 +0800 Subject: [PATCH 05/10] Update Logics for not displaying on New Sign Up Account --- src/javascript/app/base/client.js | 1 + src/javascript/app/base/page.js | 2 +- src/javascript/app/pages/user/warning_scam_message.js | 11 +++++++++-- src/sass/static/pages.scss | 9 +++++++-- src/templates/app/user/warning_scam_message.jsx | 2 +- 5 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/javascript/app/base/client.js b/src/javascript/app/base/client.js index 5876fcb942009..38e569dac5364 100644 --- a/src/javascript/app/base/client.js +++ b/src/javascript/app/base/client.js @@ -122,6 +122,7 @@ const Client = (() => { removeCookies('reality_check', 'affiliate_token', 'affiliate_tracking', 'onfido_token', 'hide_guide'); // clear local storage localStorage.removeItem('readScamMessage'); + localStorage.removeItem('isNewAccount'); // clear elev.io session storage sessionStorage.removeItem('_elevaddon-6app'); sessionStorage.removeItem('_elevaddon-6create'); diff --git a/src/javascript/app/base/page.js b/src/javascript/app/base/page.js index 673b0268d8695..29e2b59233516 100644 --- a/src/javascript/app/base/page.js +++ b/src/javascript/app/base/page.js @@ -130,7 +130,7 @@ const Page = (() => { BinarySocket.wait('authorize', 'website_status', 'get_account_status').then(() => { RealityCheck.onLoad(); Menu.init(); - const is_at_brazil = State.getResponse('website_status.clients_country') === 'my'; + const is_at_brazil = State.getResponse('website_status.clients_country') === 'br'; const read_scam_message = localStorage.getItem('readScamMessage') || false; const is_uk_residence = (Client.get('residence') === 'gb' || State.getResponse('website_status.clients_country') === 'gb'); const is_iom_client = (Client.get('residence') === 'im' || State.getResponse('website_status.clients_country') === 'im'); diff --git a/src/javascript/app/pages/user/warning_scam_message.js b/src/javascript/app/pages/user/warning_scam_message.js index 97d94efebc64d..81e0b6db981cd 100644 --- a/src/javascript/app/pages/user/warning_scam_message.js +++ b/src/javascript/app/pages/user/warning_scam_message.js @@ -4,15 +4,22 @@ const Client = require('../../base/client'); const State = require('../../../_common/storage').State; const WarningScamMessage = (()=>{ + const urlParams = new URLSearchParams(window.location.search); + const actionParams = urlParams.get('action'); let warning_scam_message, warning_scam_message_button, warning_scam_message_checkbox; + if (actionParams === 'signup') { + localStorage.setItem('isNewAccount', true); + } + const has_read_warning_scam_message = () => { BinarySocket.wait('authorize', 'website_status').then(()=> { const is_logged_in = !!Client.isLoggedIn(); - const is_brazil = State.getResponse('website_status.clients_country') === 'my'; + const is_brazil = State.getResponse('website_status.clients_country') === 'br'; const is_message_read = localStorage.getItem('readScamMessage') || false; + const is_new_account = localStorage.getItem('isNewAccount') || false; - if (is_logged_in && is_brazil && !is_message_read) { + if (is_logged_in && is_brazil && !is_message_read && !is_new_account) { warning_scam_message = getElementById('warning_scam_message'); warning_scam_message_checkbox = getElementById('warning_scam_message_checkbox'); } diff --git a/src/sass/static/pages.scss b/src/sass/static/pages.scss index 7d5c4bff3f465..598d98949bd96 100644 --- a/src/sass/static/pages.scss +++ b/src/sass/static/pages.scss @@ -867,11 +867,16 @@ body #not_authenticated_financial ul.checked > li { } #warning_scam_message_text_secondary { font-size: 16px; + margin-bottom: 24px; @media (min-width: 320px) and (max-width: 767px) { font-size: 14px; - margin-bottom: 24px; } } + .warning-scam-message-info-message { + display: flex; + padding-left: 16px; + margin-bottom: 24px; + } .warning-scam-message-content-info-message { display: flex; padding-left: 8px; @@ -952,7 +957,7 @@ body #not_authenticated_financial ul.checked > li { .icon-sm { height: 16px; width: 16px; - margin-right: 8px; + margin: 3px 8px 0 0; } } diff --git a/src/templates/app/user/warning_scam_message.jsx b/src/templates/app/user/warning_scam_message.jsx index 13f2e968b1ac6..42df1e9af0c5f 100644 --- a/src/templates/app/user/warning_scam_message.jsx +++ b/src/templates/app/user/warning_scam_message.jsx @@ -8,7 +8,7 @@ const WarningScamMessage = () => (

{it.L('A link can contain the word "Binary" and still be fake.')}

{it.L('Do not get lured to fake "Binary" pages!')}

{it.L('You may see links to websites with a fake Binary login page where you’ll get scammed for your money. ')}

-
+

{it.L('Do not trust and give away your credentials on fake websites, ads or emails.')}

From 3bf68998638b8175bd3708b6340665a716621b73 Mon Sep 17 00:00:00 2001 From: tay suisin Date: Mon, 19 Sep 2022 11:34:06 +0800 Subject: [PATCH 06/10] Update to a better naming and spacing --- src/javascript/app/base/client.js | 4 +- src/javascript/app/base/page.js | 74 +++++++++---------- .../app/pages/user/warning_scam_message.js | 8 +- 3 files changed, 43 insertions(+), 43 deletions(-) diff --git a/src/javascript/app/base/client.js b/src/javascript/app/base/client.js index 38e569dac5364..f7e5ed2df5a50 100644 --- a/src/javascript/app/base/client.js +++ b/src/javascript/app/base/client.js @@ -121,8 +121,8 @@ const Client = (() => { removeCookies('login', 'loginid', 'loginid_list', 'email', 'residence', 'settings'); // backward compatibility removeCookies('reality_check', 'affiliate_token', 'affiliate_tracking', 'onfido_token', 'hide_guide'); // clear local storage - localStorage.removeItem('readScamMessage'); - localStorage.removeItem('isNewAccount'); + localStorage.removeItem('read_scam_message'); + localStorage.removeItem('new_user_account'); // clear elev.io session storage sessionStorage.removeItem('_elevaddon-6app'); sessionStorage.removeItem('_elevaddon-6create'); diff --git a/src/javascript/app/base/page.js b/src/javascript/app/base/page.js index 4c22dd77de101..6e9af83da8d5f 100644 --- a/src/javascript/app/base/page.js +++ b/src/javascript/app/base/page.js @@ -1,39 +1,39 @@ -const Cookies = require('js-cookie'); -const moment = require('moment'); -const Client = require('./client'); -const Contents = require('./contents'); -const Header = require('./header'); -const Footer = require('./footer'); -const Menu = require('./menu'); -const BinarySocket = require('./socket'); -const TrafficSource = require('../common/traffic_source'); -const RealityCheck = require('../pages/user/reality_check/reality_check'); -const Elevio = require('../../_common/base/elevio'); -const Login = require('../../_common/base/login'); -const ClientBase = require('../../_common/base/client_base'); -const elementInnerHtml = require('../../_common/common_functions').elementInnerHtml; -const getElementById = require('../../_common/common_functions').getElementById; -const Crowdin = require('../../_common/crowdin'); -const GTM = require('../../_common/gtm'); -const Language = require('../../_common/language'); -const PushNotification = require('../../_common/lib/push_notification'); -const localize = require('../../_common/localize').localize; -const isMobile = require('../../_common/os_detect').isMobile; -const LocalStore = require('../../_common/storage').LocalStore; -const State = require('../../_common/storage').State; -const scrollToTop = require('../../_common/scroll').scrollToTop; -const toISOFormat = require('../../_common/string_util').toISOFormat; -const Url = require('../../_common/url'); -const createElement = require('../../_common/utility').createElement; -const isLoginPages = require('../../_common/utility').isLoginPages; -const isProduction = require('../../config').isProduction; -const WarningScamMessage = require('../pages/user/warning_scam_message'); -const ClosePopup = require('../common/game_close_popup'); -const EuClosePopup = require('../common/eu_close_popup'); -const EuCloseBanner = require('../common/eu_close_baner'); -const CloseBanner = require('../common/game_close_banner'); -const RedirectBanner = require('../common/redirect_banner'); -const DerivBanner = require('../common/deriv_banner'); +const Cookies = require('js-cookie'); +const moment = require('moment'); +const Client = require('./client'); +const Contents = require('./contents'); +const Header = require('./header'); +const Footer = require('./footer'); +const Menu = require('./menu'); +const BinarySocket = require('./socket'); +const TrafficSource = require('../common/traffic_source'); +const RealityCheck = require('../pages/user/reality_check/reality_check'); +const Elevio = require('../../_common/base/elevio'); +const Login = require('../../_common/base/login'); +const ClientBase = require('../../_common/base/client_base'); +const elementInnerHtml = require('../../_common/common_functions').elementInnerHtml; +const getElementById = require('../../_common/common_functions').getElementById; +const Crowdin = require('../../_common/crowdin'); +const GTM = require('../../_common/gtm'); +const Language = require('../../_common/language'); +const PushNotification = require('../../_common/lib/push_notification'); +const localize = require('../../_common/localize').localize; +const isMobile = require('../../_common/os_detect').isMobile; +const LocalStore = require('../../_common/storage').LocalStore; +const State = require('../../_common/storage').State; +const scrollToTop = require('../../_common/scroll').scrollToTop; +const toISOFormat = require('../../_common/string_util').toISOFormat; +const Url = require('../../_common/url'); +const createElement = require('../../_common/utility').createElement; +const isLoginPages = require('../../_common/utility').isLoginPages; +const isProduction = require('../../config').isProduction; +const WarningScamMessage = require('../pages/user/warning_scam_message'); +const ClosePopup = require('../common/game_close_popup'); +const EuClosePopup = require('../common/eu_close_popup'); +const EuCloseBanner = require('../common/eu_close_baner'); +const CloseBanner = require('../common/game_close_banner'); +const RedirectBanner = require('../common/redirect_banner'); +const DerivBanner = require('../common/deriv_banner'); const { removeLoadingImage } = require('../../_common/utility'); require('../../_common/lib/polyfills/array.includes'); require('../../_common/lib/polyfills/string.includes'); @@ -135,7 +135,7 @@ const Page = (() => { RealityCheck.onLoad(); Menu.init(); const is_at_brazil = State.getResponse('website_status.clients_country') === 'br'; - const read_scam_message = localStorage.getItem('readScamMessage') || false; + const read_scam_message = localStorage.getItem('read_scam_message') || false; const is_uk_residence = (Client.get('residence') === 'gb' || State.getResponse('website_status.clients_country') === 'gb'); const is_iom_client = (Client.get('residence') === 'im' || State.getResponse('website_status.clients_country') === 'im'); const is_be_client = (Client.get('residence') === 'be' || State.getResponse('website_status.clients_country') === 'be') && Client.hasAccountType('gaming'); diff --git a/src/javascript/app/pages/user/warning_scam_message.js b/src/javascript/app/pages/user/warning_scam_message.js index 81e0b6db981cd..daf5e82dd4297 100644 --- a/src/javascript/app/pages/user/warning_scam_message.js +++ b/src/javascript/app/pages/user/warning_scam_message.js @@ -9,15 +9,15 @@ const WarningScamMessage = (()=>{ let warning_scam_message, warning_scam_message_button, warning_scam_message_checkbox; if (actionParams === 'signup') { - localStorage.setItem('isNewAccount', true); + localStorage.setItem('new_user_account', true); } const has_read_warning_scam_message = () => { BinarySocket.wait('authorize', 'website_status').then(()=> { const is_logged_in = !!Client.isLoggedIn(); const is_brazil = State.getResponse('website_status.clients_country') === 'br'; - const is_message_read = localStorage.getItem('readScamMessage') || false; - const is_new_account = localStorage.getItem('isNewAccount') || false; + const is_message_read = localStorage.getItem('read_scam_message') || false; + const is_new_account = localStorage.getItem('new_user_account') || false; if (is_logged_in && is_brazil && !is_message_read && !is_new_account) { warning_scam_message = getElementById('warning_scam_message'); @@ -40,7 +40,7 @@ const WarningScamMessage = (()=>{ }; const closePopup = () => { - localStorage.setItem('readScamMessage', true); + localStorage.setItem('read_scam_message', true); warning_scam_message.setVisibility(0); }; From 80bd1f4a8a56b5a2266cd0520c9c5f5dfec8ce61 Mon Sep 17 00:00:00 2001 From: tay suisin Date: Mon, 19 Sep 2022 11:45:38 +0800 Subject: [PATCH 07/10] test --- src/sass/static/pages.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sass/static/pages.scss b/src/sass/static/pages.scss index 598d98949bd96..bdcc86db9317b 100644 --- a/src/sass/static/pages.scss +++ b/src/sass/static/pages.scss @@ -868,6 +868,7 @@ body #not_authenticated_financial ul.checked > li { #warning_scam_message_text_secondary { font-size: 16px; margin-bottom: 24px; + @media (min-width: 320px) and (max-width: 767px) { font-size: 14px; } From a296286851911541ff01ec65cd80805d9362805f Mon Sep 17 00:00:00 2001 From: tay suisin Date: Mon, 19 Sep 2022 11:46:04 +0800 Subject: [PATCH 08/10] revert --- src/sass/static/pages.scss | 1 - 1 file changed, 1 deletion(-) diff --git a/src/sass/static/pages.scss b/src/sass/static/pages.scss index bdcc86db9317b..598d98949bd96 100644 --- a/src/sass/static/pages.scss +++ b/src/sass/static/pages.scss @@ -868,7 +868,6 @@ body #not_authenticated_financial ul.checked > li { #warning_scam_message_text_secondary { font-size: 16px; margin-bottom: 24px; - @media (min-width: 320px) and (max-width: 767px) { font-size: 14px; } From d37eebead97dd35de02a188ac39541a649c77c4e Mon Sep 17 00:00:00 2001 From: tay suisin Date: Mon, 19 Sep 2022 11:58:45 +0800 Subject: [PATCH 09/10] rename is_at_brazil to is_brazil_client --- src/javascript/app/base/page.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/javascript/app/base/page.js b/src/javascript/app/base/page.js index 6e9af83da8d5f..63e661db8a402 100644 --- a/src/javascript/app/base/page.js +++ b/src/javascript/app/base/page.js @@ -134,7 +134,7 @@ const Page = (() => { }, 1000); RealityCheck.onLoad(); Menu.init(); - const is_at_brazil = State.getResponse('website_status.clients_country') === 'br'; + const is_brazil_client = State.getResponse('website_status.clients_country') === 'br'; const read_scam_message = localStorage.getItem('read_scam_message') || false; const is_uk_residence = (Client.get('residence') === 'gb' || State.getResponse('website_status.clients_country') === 'gb'); const is_iom_client = (Client.get('residence') === 'im' || State.getResponse('website_status.clients_country') === 'im'); @@ -143,7 +143,7 @@ const Page = (() => { const mlt_check = ClientBase.get('landing_company_shortcode') === 'malta'; const mf_check = ClientBase.get('landing_company_shortcode') === 'maltainvest'; const virtual_account = Client.get('landing_company_shortcode') === 'virtual'; - if (is_at_brazil && !read_scam_message) { WarningScamMessage.has_read_warning_scam_message(); } + if (is_brazil_client && !read_scam_message) { WarningScamMessage.has_read_warning_scam_message(); } if (!is_iom_client || is_uk_residence && !Client.hasAccountType('gaming') || mf_check || mlt_check) RedirectBanner.loginOnLoad(); if (is_uk_residence && Client.hasAccountType('gaming')) { CloseBanner.onLoad(); From d19343e232b572089a66f06a273c45bde8ae0359 Mon Sep 17 00:00:00 2001 From: tay suisin Date: Mon, 19 Sep 2022 16:21:02 +0800 Subject: [PATCH 10/10] Update ID and ClassName --- .../app/pages/user/warning_scam_message.js | 4 ++-- src/sass/static/pages.scss | 16 +++++++------- .../app/user/warning_scam_message.jsx | 22 +++++++++---------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/javascript/app/pages/user/warning_scam_message.js b/src/javascript/app/pages/user/warning_scam_message.js index daf5e82dd4297..c6df8dbde6b2c 100644 --- a/src/javascript/app/pages/user/warning_scam_message.js +++ b/src/javascript/app/pages/user/warning_scam_message.js @@ -16,8 +16,8 @@ const WarningScamMessage = (()=>{ BinarySocket.wait('authorize', 'website_status').then(()=> { const is_logged_in = !!Client.isLoggedIn(); const is_brazil = State.getResponse('website_status.clients_country') === 'br'; - const is_message_read = localStorage.getItem('read_scam_message') || false; - const is_new_account = localStorage.getItem('new_user_account') || false; + const is_message_read = !!localStorage.getItem('read_scam_message'); + const is_new_account = !!localStorage.getItem('new_user_account'); if (is_logged_in && is_brazil && !is_message_read && !is_new_account) { warning_scam_message = getElementById('warning_scam_message'); diff --git a/src/sass/static/pages.scss b/src/sass/static/pages.scss index 598d98949bd96..2d01435a7d9e6 100644 --- a/src/sass/static/pages.scss +++ b/src/sass/static/pages.scss @@ -843,29 +843,29 @@ body #not_authenticated_financial ul.checked > li { } } -.lightbox #warning_scam_message_content { +.lightbox .warning-scam-message-content { padding: 25px; padding-bottom: 20px; - #warning_scam_message_title { + .warning-scam-message-title { @media (min-width: 320px) and (max-width: 767px) { font-size: 20px; margin-bottom: 8px; } } - #warning_scam_message_subtitle { + .warning-scam-message-subtitle { @media (min-width: 320px) and (max-width: 767px) { font-size: 14px; } } - #warning_scam_message_title_secondary { + .warning-scam-message-title-secondary { color: $COLOR_BLACK; @media (min-width: 320px) and (max-width: 767px) { font-size: 18px; margin-bottom: 8px; } } - #warning_scam_message_text_secondary { + .warning-scam-message-text-secondary { font-size: 16px; margin-bottom: 24px; @media (min-width: 320px) and (max-width: 767px) { @@ -882,7 +882,7 @@ body #not_authenticated_financial ul.checked > li { padding-left: 8px; margin-bottom: 24px; } - #warning_scam_message_scam_title_text { + .warning-scam-message-scam-title-text { font-weight: 300; margin-bottom: 0; color: $COLOR_BLACK; @@ -923,7 +923,7 @@ body #not_authenticated_financial ul.checked > li { justify-content: center; align-items: center; } - #warning_scam_message_link { + .warning-scam-message-link { margin: 8px 0; @media (min-width: 320px) and (max-width: 767px) { font-size: 16px; @@ -949,7 +949,7 @@ body #not_authenticated_financial ul.checked > li { margin-bottom: 24px; } } - #warning_scam_message_acknowledge_message { + .warning-scam-message-acknowledge-message { @media (min-width: 320px) and (max-width: 767px) { font-size: 14px; } diff --git a/src/templates/app/user/warning_scam_message.jsx b/src/templates/app/user/warning_scam_message.jsx index 42df1e9af0c5f..c959cf4290122 100644 --- a/src/templates/app/user/warning_scam_message.jsx +++ b/src/templates/app/user/warning_scam_message.jsx @@ -3,40 +3,40 @@ import React from 'react'; const WarningScamMessage = () => (
-
-

{it.L('Beware of the fake links.')}

-

{it.L('A link can contain the word "Binary" and still be fake.')}

-

{it.L('Do not get lured to fake "Binary" pages!')}

-

{it.L('You may see links to websites with a fake Binary login page where you’ll get scammed for your money. ')}

+
+

{it.L('Beware of the fake links.')}

+

{it.L('A link can contain the word "Binary" and still be fake.')}

+

{it.L('Do not get lured to fake "Binary" pages!')}

+

{it.L('You may see links to websites with a fake Binary login page where you’ll get scammed for your money. ')}

-

{it.L('Do not trust and give away your credentials on fake websites, ads or emails.')}

+

{it.L('Do not trust and give away your credentials on fake websites, ads or emails.')}

-

+

{it.L('Only log in to your account at this secure link, never elsewhere.')}

- +

https://binary.com

-

+

{it.L('Fake links often contain the word that looks like "Binary" but look out for these differences.')}

- +

{it.L('Examples')}: https://binakyos.me

- +