@everymatrix/player-account-gaming-limits 0.0.162 → 0.0.166
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/dist/player-account-gaming-limits.js +1193 -1134
- package/dist/player-account-gaming-limits.js.map +1 -1
- package/package.json +2 -2
- package/src/PlayerAccountGamingLimits.svelte +18 -21
- package/src/i18n.js +27 -0
- package/src/translations.js +22 -0
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.166",
|
|
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": "cc5cea8f5d4ed68bf0b052d98cc82ce69e97fc45"
|
|
40
40
|
}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
<script lang="typescript">
|
|
3
3
|
import { getDevice } from 'rvhelper';
|
|
4
4
|
import { onMount, tick } from "svelte";
|
|
5
|
+
import { _, addNewMessages } from './i18n';
|
|
6
|
+
import { PlayerGamingLimitsCardTranslations } from './translations';
|
|
5
7
|
import '@everymatrix/player-account-gaming-limits-info-card';
|
|
6
8
|
|
|
7
9
|
export let depositlimit:string = '';
|
|
@@ -11,23 +13,23 @@
|
|
|
11
13
|
export let showdeletenotification:boolean = false;
|
|
12
14
|
export let showsuccessnotification:boolean = false;
|
|
13
15
|
|
|
16
|
+
Object.keys(PlayerGamingLimitsCardTranslations).forEach((item) => {
|
|
17
|
+
addNewMessages(item, PlayerGamingLimitsCardTranslations[item]);
|
|
18
|
+
});
|
|
19
|
+
|
|
14
20
|
let isLoading:boolean = false;
|
|
15
21
|
let userAgent:String = window.navigator.userAgent;
|
|
16
22
|
let isMobile = (getDevice(userAgent) === 'PC') ? false : true;
|
|
17
23
|
let playercurrency:string = '';
|
|
18
24
|
|
|
19
|
-
|
|
20
|
-
let infoname:string = "Info";
|
|
21
|
-
let infocontent:string = "Nulla ornare pulvinar dui. Nullam viverra, lacus vel consectetur euismod, ante lorem aliquam nisi, non faucibus nulla lacus sed sapien. Sed imperdiet tristique tincidunt.";
|
|
22
|
-
let removelimitstext:string = "Selected limits have been removed.";
|
|
23
25
|
let editLimitData:any;
|
|
24
26
|
let editLimitName:string = '';
|
|
25
27
|
let limitsGroupView:boolean = true;
|
|
26
28
|
|
|
27
|
-
let depositLimitName = '
|
|
28
|
-
let wageringLimitName =
|
|
29
|
-
let lossLimitName =
|
|
30
|
-
let timeLimitName =
|
|
29
|
+
let depositLimitName = $_('gamingLimits.depositLimit');
|
|
30
|
+
let wageringLimitName = $_('gamingLimits.wageringLimit');
|
|
31
|
+
let lossLimitName = $_('gamingLimits.lossLimit');
|
|
32
|
+
let timeLimitName = $_('gamingLimits.timeLimit');
|
|
31
33
|
|
|
32
34
|
const mediaQuery = window.matchMedia('(min-width: 768px)');
|
|
33
35
|
|
|
@@ -91,26 +93,21 @@
|
|
|
91
93
|
C52.942,116.507,52.942,124.327,57.633,129.007z"/>
|
|
92
94
|
</g>
|
|
93
95
|
</svg>
|
|
94
|
-
<span>
|
|
96
|
+
<span>{$_('gamingLimits.returnToMenu')}</span>
|
|
95
97
|
</div>
|
|
96
98
|
{/if}
|
|
97
99
|
<div class="PlayerAccountGamingLimitsHeader">
|
|
98
|
-
<h3 class="PlayerAccountGamingLimitsTitle {isMobile ? "PlayerAccountGamingLimitsMobileTitle" : ''}">
|
|
100
|
+
<h3 class="PlayerAccountGamingLimitsTitle {isMobile ? "PlayerAccountGamingLimitsMobileTitle" : ''}">{$_('gamingLimits.gamingLimitsText')}</h3>
|
|
99
101
|
</div>
|
|
100
|
-
{#if showdeletenotification}
|
|
101
|
-
<div class="PlayerAccountSuccessfulRemoveContainer">
|
|
102
|
-
<p>{removelimitstext}</p>
|
|
103
|
-
</div>
|
|
104
|
-
{/if}
|
|
105
102
|
<div class="PlayerAccountGamingLimitsContainer">
|
|
106
|
-
<player-account-gaming-limits-info-card limitsdata={depositlimit} limitname={depositLimitName} {
|
|
107
|
-
<player-account-gaming-limits-info-card limitsdata={wageringlimit} limitname={wageringLimitName} {
|
|
108
|
-
<player-account-gaming-limits-info-card limitsdata={losslimit} limitname={lossLimitName} {
|
|
109
|
-
<player-account-gaming-limits-info-card limitsdata={timelimit} limitname={timeLimitName} {
|
|
103
|
+
<player-account-gaming-limits-info-card limitsdata={depositlimit} limitname={depositLimitName} {playercurrency}></player-account-gaming-limits-info-card>
|
|
104
|
+
<player-account-gaming-limits-info-card limitsdata={wageringlimit} limitname={wageringLimitName} {playercurrency}></player-account-gaming-limits-info-card>
|
|
105
|
+
<player-account-gaming-limits-info-card limitsdata={losslimit} limitname={lossLimitName} {playercurrency}></player-account-gaming-limits-info-card>
|
|
106
|
+
<player-account-gaming-limits-info-card limitsdata={timelimit} limitname={timeLimitName} {playercurrency}></player-account-gaming-limits-info-card>
|
|
110
107
|
</div>
|
|
111
108
|
</div>
|
|
112
109
|
{:else}
|
|
113
|
-
<player-account-gaming-limits-group-edit limitsdata={editLimitData} limitname={editLimitName} {
|
|
110
|
+
<player-account-gaming-limits-group-edit limitsdata={editLimitData} limitname={editLimitName} {showsuccessnotification} {showdeletenotification} {playercurrency}></player-account-gaming-limits-group-edit>
|
|
114
111
|
{/if}
|
|
115
112
|
{/if}
|
|
116
113
|
|
|
@@ -129,7 +126,7 @@
|
|
|
129
126
|
.PlayerAccountGamingLimitsHeader {
|
|
130
127
|
h3 {
|
|
131
128
|
font-size: ttp(1.5);
|
|
132
|
-
font-weight:
|
|
129
|
+
font-weight: 400;
|
|
133
130
|
text-transform: capitalize;
|
|
134
131
|
}
|
|
135
132
|
.PlayerAccountGamingLimitsMobileTitle {
|
package/src/i18n.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {
|
|
2
|
+
dictionary,
|
|
3
|
+
locale,
|
|
4
|
+
addMessages,
|
|
5
|
+
_
|
|
6
|
+
} from 'svelte-i18n';
|
|
7
|
+
|
|
8
|
+
function setupI18n({ withLocale: _locale, translations }) {
|
|
9
|
+
locale.subscribe((data) => {
|
|
10
|
+
if (data == null) {
|
|
11
|
+
dictionary.set(translations);
|
|
12
|
+
locale.set(_locale);
|
|
13
|
+
}
|
|
14
|
+
}); // maybe we will need this to make sure that the i18n is set up only once
|
|
15
|
+
/*dictionary.set(translations);
|
|
16
|
+
locale.set(_locale);*/
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function addNewMessages(lang, dict) {
|
|
20
|
+
addMessages(lang, dict);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function setLocale(_locale) {
|
|
24
|
+
locale.set(_locale);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { _, setupI18n, addNewMessages, setLocale };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const PlayerGamingLimitsCardTranslations = {
|
|
2
|
+
en: {
|
|
3
|
+
gamingLimits: {
|
|
4
|
+
returnToMenu: `Return to menu`,
|
|
5
|
+
gamingLimitsText: `Gaming limits`,
|
|
6
|
+
depositLimit: `Deposit Limit`,
|
|
7
|
+
timeLimit: `Time Limit`,
|
|
8
|
+
wageringLimit: `Wagering Limit`,
|
|
9
|
+
lossLimit: `Loss Limit`
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
ro: {
|
|
13
|
+
gamingLimits: {
|
|
14
|
+
returnToMenu: `Return to menu`,
|
|
15
|
+
gamingLimitsText: `Gaming limits`,
|
|
16
|
+
depositLimit: `Deposit Limit`,
|
|
17
|
+
timeLimit: `Time Limit`,
|
|
18
|
+
wageringLimit: `Wagering Limit`,
|
|
19
|
+
lossLimit: `Loss Limit`
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|