@everymatrix/player-account-gaming-limits 0.0.285 → 0.0.286
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@everymatrix/player-account-gaming-limits",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.286",
|
|
4
4
|
"main": "dist/player-account-gaming-limits.js",
|
|
5
5
|
"svelte": "src/index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"publishConfig": {
|
|
37
37
|
"access": "public"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "34a92e6b2196b6bd4e523795acca4f2e87762571"
|
|
40
40
|
}
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
import { PlayerGamingLimitsCardTranslations } from './translations';
|
|
7
7
|
import '@everymatrix/player-account-gaming-limits-info-card';
|
|
8
8
|
|
|
9
|
-
export let depositlimit:
|
|
10
|
-
export let wageringlimit:
|
|
11
|
-
export let losslimit:
|
|
12
|
-
export let timelimit:
|
|
9
|
+
export let depositlimit:any;
|
|
10
|
+
export let wageringlimit:any;
|
|
11
|
+
export let losslimit:any;
|
|
12
|
+
export let timelimit:any;
|
|
13
13
|
export let showdeletenotification:boolean = false;
|
|
14
14
|
export let showsuccessnotification:boolean = false;
|
|
15
15
|
export let lang:string = 'en';
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
addNewMessages(item, PlayerGamingLimitsCardTranslations[item]);
|
|
20
20
|
});
|
|
21
21
|
|
|
22
|
-
let isLoading:boolean =
|
|
22
|
+
let isLoading:boolean = true;
|
|
23
23
|
let userAgent:String = window.navigator.userAgent;
|
|
24
24
|
let isMobile = (getDevice(userAgent) === 'PC') ? false : true;
|
|
25
25
|
|
|
@@ -38,19 +38,27 @@
|
|
|
38
38
|
window.postMessage({type: 'PlayerAccountMenuActive', isMobile}, window.location.href);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
const
|
|
41
|
+
const setActiveLanguage = () => {
|
|
42
42
|
setLocale(lang);
|
|
43
|
-
tick(); // trying to send the initial data to the widget below (group edit) when the user discards the changes
|
|
44
43
|
}
|
|
45
44
|
|
|
46
45
|
const messageHandler = (e:any) => {
|
|
47
46
|
if (e.data) {
|
|
48
47
|
switch(e.data.type) {
|
|
48
|
+
case 'PlayerLimitsData':
|
|
49
|
+
lang = e.data.limits.lang
|
|
50
|
+
depositlimit = e.data.limits.depositlimit;
|
|
51
|
+
wageringlimit = e.data.limits.wageringlimit;
|
|
52
|
+
losslimit = e.data.limits.losslimit;
|
|
53
|
+
timelimit = e.data.limits.timelimit;
|
|
54
|
+
isLoading = false;
|
|
55
|
+
break;
|
|
56
|
+
|
|
49
57
|
case 'EditPlayerAccountGamingLimits':
|
|
50
58
|
editLimitData = e.data.edit;
|
|
51
59
|
editLimitName = e.data.name;
|
|
52
60
|
limitsGroupView = false;
|
|
53
|
-
|
|
61
|
+
break;
|
|
54
62
|
|
|
55
63
|
case 'PlayerAccountBackToLimitsView':
|
|
56
64
|
limitsGroupView = true;
|
|
@@ -60,22 +68,19 @@
|
|
|
60
68
|
let profileDetails:any = e.data.profileDetails;
|
|
61
69
|
playercurrency = profileDetails.currency;
|
|
62
70
|
break;
|
|
63
|
-
|
|
64
|
-
default:
|
|
65
|
-
// do nothing
|
|
66
|
-
break;
|
|
67
71
|
}
|
|
68
72
|
}
|
|
69
73
|
}
|
|
70
74
|
|
|
71
|
-
onMount(() => {
|
|
75
|
+
onMount(() => {
|
|
72
76
|
window.addEventListener('message', messageHandler, false);
|
|
73
77
|
|
|
74
78
|
return () => {
|
|
75
79
|
window.removeEventListener('message', messageHandler);
|
|
76
80
|
}
|
|
77
81
|
});
|
|
78
|
-
|
|
82
|
+
|
|
83
|
+
$: lang && setActiveLanguage();
|
|
79
84
|
</script>
|
|
80
85
|
|
|
81
86
|
|
|
@@ -96,7 +101,6 @@
|
|
|
96
101
|
{/if}
|
|
97
102
|
<h2 class="PlayerGamingLimitsTitle {isMobile ? 'PlayerGamingLimitsTitleNone' : ''}" part="PlayerGamingLimitsTitle {isMobile ? 'PlayerGamingLimitsTitleNone' : ''}">{$_('gamingLimits.gamingLimitsText')}</h2>
|
|
98
103
|
|
|
99
|
-
|
|
100
104
|
<div class="PlayerAccountGamingLimitsContainer" part="PlayerAccountGamingLimitsContainer">
|
|
101
105
|
<player-account-gaming-limits-info-card limitsdata={depositlimit} limitname={depositLimitName} {playercurrency} {lang}></player-account-gaming-limits-info-card>
|
|
102
106
|
<player-account-gaming-limits-info-card limitsdata={wageringlimit} limitname={wageringLimitName} {playercurrency} {lang}></player-account-gaming-limits-info-card>
|