From e6f7bee2d1e6ae80cb23448060f47fb97b0428ab Mon Sep 17 00:00:00 2001 From: Amam Mustofa Date: Wed, 17 Apr 2019 17:07:06 +0800 Subject: [PATCH 01/11] add message --- src/selfexclusion/selfexclusion.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/selfexclusion/selfexclusion.html b/src/selfexclusion/selfexclusion.html index f736bdf5bf..d2ad520c48 100644 --- a/src/selfexclusion/selfexclusion.html +++ b/src/selfexclusion/selfexclusion.html @@ -101,8 +101,22 @@
+
+
+

{it.L('To self-exclude from all online gambling companies licensed in Great Britain, go to [_1].', 'www.gamstop.co.uk')}

+
+
+
+
+
+

{it.L('Self-exclusion on this website only applies to your [_1] account and does not include other companies or websites.', it.website_name)}

+

{it.L('Since you feel the need to self-exclude, we strongly encourage you to exclude yourself from similar services that you may have signed up for.')}

+

{it.L('To self-exclude from all online gambling companies licensed in Great Britain, you may go to [_1].', 'www.gamstop.co.uk')}

+
+
+
From d28f0a9658eeb793378be3c21bac1e48cbb3cb83 Mon Sep 17 00:00:00 2001 From: Amam Mustofa Date: Wed, 17 Apr 2019 17:15:15 +0800 Subject: [PATCH 02/11] fix it l undefined --- src/selfexclusion/selfexclusion.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/selfexclusion/selfexclusion.html b/src/selfexclusion/selfexclusion.html index d2ad520c48..efbf001a8c 100644 --- a/src/selfexclusion/selfexclusion.html +++ b/src/selfexclusion/selfexclusion.html @@ -103,7 +103,7 @@
-

{it.L('To self-exclude from all online gambling companies licensed in Great Britain, go to [_1].', 'www.gamstop.co.uk')}

+

To self-exclude from all online gambling companies licensed in Great Britain, go to www.gamstop.co.uk

@@ -112,9 +112,9 @@
-

{it.L('Self-exclusion on this website only applies to your [_1] account and does not include other companies or websites.', it.website_name)}

-

{it.L('Since you feel the need to self-exclude, we strongly encourage you to exclude yourself from similar services that you may have signed up for.')}

-

{it.L('To self-exclude from all online gambling companies licensed in Great Britain, you may go to [_1].', 'www.gamstop.co.uk')}

+

Self-exclusion on this website only applies to your Binary.com account and does not include other companies or websites.

+

Since you feel the need to self-exclude, we strongly encourage you to exclude yourself from similar services that you may have signed up for.

+

To self-exclude from all online gambling companies licensed in Great Britain, you may go to www.gamstop.co.uk.

From a6e275483e6088eecff6b9c58ebc237854e8a486 Mon Sep 17 00:00:00 2001 From: Amam Mustofa Date: Thu, 18 Apr 2019 14:00:21 +0800 Subject: [PATCH 03/11] add styling --- src/selfexclusion/selfexclusion.css | 8 ++++++++ src/selfexclusion/selfexclusion.html | 18 ++++++------------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/selfexclusion/selfexclusion.css b/src/selfexclusion/selfexclusion.css index 9d3ac885b6..a0a4cb8e5e 100644 --- a/src/selfexclusion/selfexclusion.css +++ b/src/selfexclusion/selfexclusion.css @@ -42,3 +42,11 @@ text-align: center; margin-top: 5px; } + +.selfexclusion_notice { + margin: 10px auto; + color: #000; + background-color: #fef1cf; + padding: 10px; + overflow: hidden; +} \ No newline at end of file diff --git a/src/selfexclusion/selfexclusion.html b/src/selfexclusion/selfexclusion.html index efbf001a8c..a74e0cbebb 100644 --- a/src/selfexclusion/selfexclusion.html +++ b/src/selfexclusion/selfexclusion.html @@ -101,22 +101,16 @@
-
-
-

To self-exclude from all online gambling companies licensed in Great Britain, go to www.gamstop.co.uk

-
+
-
-
-
-

Self-exclusion on this website only applies to your Binary.com account and does not include other companies or websites.

-

Since you feel the need to self-exclude, we strongly encourage you to exclude yourself from similar services that you may have signed up for.

-

To self-exclude from all online gambling companies licensed in Great Britain, you may go to www.gamstop.co.uk.

-
-
+
From 3e3ec4ed4907ff7be06bbd5c45387ef45c0397cb Mon Sep 17 00:00:00 2001 From: Amam Mustofa Date: Thu, 18 Apr 2019 14:15:31 +0800 Subject: [PATCH 04/11] change to scss --- src/selfexclusion/selfexclusion.css | 52 ----------- src/selfexclusion/selfexclusion.html | 130 +++++++++++++-------------- src/selfexclusion/selfexclusion.scss | 47 ++++++++++ 3 files changed, 112 insertions(+), 117 deletions(-) delete mode 100644 src/selfexclusion/selfexclusion.css create mode 100644 src/selfexclusion/selfexclusion.scss diff --git a/src/selfexclusion/selfexclusion.css b/src/selfexclusion/selfexclusion.css deleted file mode 100644 index a0a4cb8e5e..0000000000 --- a/src/selfexclusion/selfexclusion.css +++ /dev/null @@ -1,52 +0,0 @@ -.self-exclusion .webtrader-dialog { - width: auto !important; -} - -.selfexclusion { - padding-bottom: 20px; -} - -.selfexclusion_headerContent { - padding: 10px; -} - -.selfexclusion_bodyContent { - margin: auto; - padding: 10px; - border: solid 1px #E5E5E5; - display: table; -} - -.selfexclusion_row { - display: table-row; -} - -.selfexclusion_col { - display: table-cell; - padding: 5px 5px 10px 5px; -} - -.selfexclusion_inputHint { - font-size: 11px; -} - -.selfexclusion .text-vertical-align { - line-height:2em; -} - -.selfexclusion_input { - width : 270px; -} - -.selfexclusion_updateBtnContainer { - text-align: center; - margin-top: 5px; -} - -.selfexclusion_notice { - margin: 10px auto; - color: #000; - background-color: #fef1cf; - padding: 10px; - overflow: hidden; -} \ No newline at end of file diff --git a/src/selfexclusion/selfexclusion.html b/src/selfexclusion/selfexclusion.html index a74e0cbebb..f3eed398b7 100644 --- a/src/selfexclusion/selfexclusion.html +++ b/src/selfexclusion/selfexclusion.html @@ -1,113 +1,113 @@ -
-
+
+
Online trading can become addictive. Fill in the form below to limit your participation on the website or send a signed letter or fax to our customer support team. Once set, you can only tighten your limits. Limits - will only be removed or loosened after 7 days with the exception of the self- + will only be removed or loosened after 7 days with the exception of the self-- exclusion date, which cannot be removed or altered once you have confirmed it. To remove or increase your limits, please contact customer support.
-
-
-
Maximum account cash balance
-
- +
+
+
Maximum account cash balance
+
+
- Once this limit is reached, you may no longer deposit. + Once this limit is reached, you may no longer deposit.
-
-
Daily turnover limit
-
- +
+
Daily turnover limit
+
+
- Maximum aggregate contract purchases per day + Maximum aggregate contract purchases per day
-
-
Daily limit on losses
-
- +
+
Daily limit on losses
+
+
- Maximum aggregate loss per day + Maximum aggregate loss per day
-
-
7-day turnover limit
-
- +
+
7-day turnover limit
+
+
- Maximum aggregate contract purchases over a 7-day period + Maximum aggregate contract purchases over a 7-day period
-
-
7-day limit on losses
-
- +
+
7-day limit on losses
+
+
- Maximum aggregate contract purchases over a 7-day period + Maximum aggregate contract purchases over a 7-day period
-
-
30-day turnover limit
-
- +
+
30-day turnover limit
+
+
- Maximum aggregate contract purchases over a 30-day period + Maximum aggregate contract purchases over a 30-day period
-
-
30-day limit on losses
-
- +
+
30-day limit on losses
+
+
- Maximum aggregate loss over a 30-day period + Maximum aggregate loss over a 30-day period
-
-
Maximum number of open positions
-
- +
+
Maximum number of open positions
+
+
-
-
Session duration limit, in minutes
-
- +
+
Session duration limit, in minutes
+
+
- You will be automatically logged out after such time + You will be automatically logged out after such time
-
-
Time out until
-
- +
+
Time out until
+
+
- Please enter date in the format YYYY-MM-DD + Please enter date in the format YYYY-MM-DD
-
- - Please enter time in the format HH:MM +
+ + Please enter time in the format HH:MM
-
-
Exclude me from the website until
-
- +
+
Exclude me from the website until
+
+
- Please enter date in the format YYYY-MM-DD + Please enter date in the format YYYY-MM-DD
-
-
+
-
+

Self-exclusion on this website only applies to your Binary.com account and does not include other companies or websites.

Since you feel the need to self-exclude, we strongly encourage you to exclude yourself from similar services that you may have signed up for.

To self-exclude from all online gambling companies licensed in Great Britain, you may go to www.gamstop.co.uk.

From 7bff6ce5da8e643afbfb5366f9c0797a17ce1951 Mon Sep 17 00:00:00 2001 From: Amam Mustofa Date: Thu, 18 Apr 2019 17:29:27 +0800 Subject: [PATCH 07/11] fix website status issue and refresh on update --- src/selfexclusion/selfexclusion.es6 | 8 ++++++-- src/selfexclusion/selfexclusion.html | 12 ++++++------ src/websitestatus/websitestatus.es6 | 2 -- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/selfexclusion/selfexclusion.es6 b/src/selfexclusion/selfexclusion.es6 index 050c51141b..a67887355b 100644 --- a/src/selfexclusion/selfexclusion.es6 +++ b/src/selfexclusion/selfexclusion.es6 @@ -85,6 +85,7 @@ const settingsData = { max_open_bets: null, session_duration_limit: null, exclude_until: null, + has_exclude_until: null, is_gamstop_client: null, timeout_until_date: null, timeout_until_time: null, @@ -172,6 +173,7 @@ const settingsData = { $.growl.notice({ message: 'Your changes have been updated'.i18n() }); logoutBasedOnExcludeDateAndTimeOut(); setOrRefreshTimer(); + refreshData(); }) .catch(function(err) { $.growl.error({ message: err.message }); @@ -245,7 +247,8 @@ const refreshData = function() { limits[index].set = true; } }); - + settingsData.has_exclude_until = response.get_self_exclusion.exclude_until; + settingsData.is_gamstop_client = isGamstopClient(); logoutBasedOnExcludeDateAndTimeOut(); } }) @@ -256,7 +259,8 @@ const refreshData = function() { }; const isGamstopClient = function() { - + const authorize = local_storage.get('authorize'); + return /gb/.test(authorize.country) && /iom|malta/.test(authorize.landing_company_name); } const setOrRefreshTimer = function() { diff --git a/src/selfexclusion/selfexclusion.html b/src/selfexclusion/selfexclusion.html index 7a3687cbce..60f1ddd697 100644 --- a/src/selfexclusion/selfexclusion.html +++ b/src/selfexclusion/selfexclusion.html @@ -3,12 +3,12 @@ Online trading can become addictive. Fill in the form below to limit your participation on the website or send a signed letter or fax to our customer support team. Once set, you can only tighten your limits. Limits - will only be removed or loosened after 7 days with the exception of the self-- - exclusion date, which cannot be removed or altered once you have confirmed it. + will only be removed or loosened after 7 days with the exception of the + self-exclusion date, which cannot be removed or altered once you have confirmed it. To remove or increase your limits, please contact customer support.
-
+

If you are considering self-exclusion, you may wish to register with GAMSTOP.

GAMSTOP is a free service that enables you to self-exclude from all online gambling companies licensed in Great Britain.

To find out more and to sign up with GAMSTOP, please visit www.gamstop.co.uk.

@@ -106,13 +106,13 @@
-
+
-
+

Self-exclusion on this website only applies to your Binary.com account and does not include other companies or websites.

Since you feel the need to self-exclude, we strongly encourage you to exclude yourself from similar services that you may have signed up for.

-

To self-exclude from all online gambling companies licensed in Great Britain, you may go to www.gamstop.co.uk.

+

To self-exclude from all online gambling companies licensed in Great Britain, you may go to www.gamstop.co.uk.

diff --git a/src/websitestatus/websitestatus.es6 b/src/websitestatus/websitestatus.es6 index 1859d8ecf2..b4f7708692 100644 --- a/src/websitestatus/websitestatus.es6 +++ b/src/websitestatus/websitestatus.es6 @@ -31,5 +31,3 @@ const set_currency_config = (website_status) => { } }; -liveapi.events.on('website_status', website_status); -liveapi.cached.send({ website_status: 1, subscribe: 1 }).then(website_status); From 1f50e01ced09ae4fc3afd8306874f311701c4673 Mon Sep 17 00:00:00 2001 From: Amam Mustofa Date: Fri, 19 Apr 2019 15:23:43 +0800 Subject: [PATCH 08/11] prolong the message display --- src/selfexclusion/selfexclusion.es6 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/selfexclusion/selfexclusion.es6 b/src/selfexclusion/selfexclusion.es6 index a67887355b..2188335a0f 100644 --- a/src/selfexclusion/selfexclusion.es6 +++ b/src/selfexclusion/selfexclusion.es6 @@ -176,8 +176,10 @@ const settingsData = { refreshData(); }) .catch(function(err) { - $.growl.error({ message: err.message }); - console.error(err); + $.growl.error({ + message: err.message, + duration: 7000, + }); }); } }; From 876bbdc2eb85cb1bfbc6dc09b95dd59057380df1 Mon Sep 17 00:00:00 2001 From: Amam Mustofa Date: Mon, 22 Apr 2019 17:12:19 +0800 Subject: [PATCH 09/11] fixed growl --- src/selfexclusion/selfexclusion.es6 | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/selfexclusion/selfexclusion.es6 b/src/selfexclusion/selfexclusion.es6 index 2188335a0f..c9230da76f 100644 --- a/src/selfexclusion/selfexclusion.es6 +++ b/src/selfexclusion/selfexclusion.es6 @@ -157,7 +157,7 @@ const settingsData = { if (message.length > 0) { message.forEach(function(msg, i) { - $.growl.error({ message: msg }); + $.growl.error({ message: msg, fixed: true }); }) return; } @@ -176,10 +176,7 @@ const settingsData = { refreshData(); }) .catch(function(err) { - $.growl.error({ - message: err.message, - duration: 7000, - }); + $.growl.error({ message: err.message, fixed: true }); }); } }; @@ -255,7 +252,7 @@ const refreshData = function() { } }) .catch(function(err) { - $.growl.error({ message: err.message }); + $.growl.error({ message: err.message, fixed: true }); console.error(err); }); }; From 7e2e1a975f64078137ba7c68670f0eb5759e4394 Mon Sep 17 00:00:00 2001 From: Amam Mustofa Date: Mon, 22 Apr 2019 17:14:08 +0800 Subject: [PATCH 10/11] add deploy branch script --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 81424dd959..08677ddea7 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "node-sass": "^4.11.0" }, "scripts": { + "deploy-branch": "grunt deploy-branch", "deploy-gh-pages": "grunt deploy", "start": "grunt && concurrently -k \"grunt watch\" \"grunt connect\"", "watch": "grunt watch", From 998c4af485482c045bfcee85a3e5dc8786f66055 Mon Sep 17 00:00:00 2001 From: Amam Mustofa Date: Mon, 22 Apr 2019 20:25:08 +0800 Subject: [PATCH 11/11] add getcountry status --- src/selfexclusion/selfexclusion.es6 | 12 +++++++++--- src/selfexclusion/selfexclusion.html | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/selfexclusion/selfexclusion.es6 b/src/selfexclusion/selfexclusion.es6 index c9230da76f..35c0f2b3ca 100644 --- a/src/selfexclusion/selfexclusion.es6 +++ b/src/selfexclusion/selfexclusion.es6 @@ -86,6 +86,7 @@ const settingsData = { session_duration_limit: null, exclude_until: null, has_exclude_until: null, + is_iom_malta: null, is_gamstop_client: null, timeout_until_date: null, timeout_until_time: null, @@ -247,7 +248,9 @@ const refreshData = function() { } }); settingsData.has_exclude_until = response.get_self_exclusion.exclude_until; - settingsData.is_gamstop_client = isGamstopClient(); + const country_status = getCountryStatus(); + settingsData.is_iom_malta = country_status.has_iom_malta; + settingsData.is_gamstop_client = country_status.has_uk && country_status.has_iom_malta; logoutBasedOnExcludeDateAndTimeOut(); } }) @@ -257,9 +260,12 @@ const refreshData = function() { }); }; -const isGamstopClient = function() { +const getCountryStatus = function() { const authorize = local_storage.get('authorize'); - return /gb/.test(authorize.country) && /iom|malta/.test(authorize.landing_company_name); + return { + has_iom_malta: /iom|malta/.test(authorize.landing_company_name), + has_uk: /gb/.test(authorize.country), + }; } const setOrRefreshTimer = function() { diff --git a/src/selfexclusion/selfexclusion.html b/src/selfexclusion/selfexclusion.html index 60f1ddd697..1408880d94 100644 --- a/src/selfexclusion/selfexclusion.html +++ b/src/selfexclusion/selfexclusion.html @@ -109,7 +109,7 @@
-
+

Self-exclusion on this website only applies to your Binary.com account and does not include other companies or websites.

Since you feel the need to self-exclude, we strongly encourage you to exclude yourself from similar services that you may have signed up for.

To self-exclude from all online gambling companies licensed in Great Britain, you may go to www.gamstop.co.uk.