@everymatrix/player-profile-info 1.27.3 → 1.27.6
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@everymatrix/player-profile-info",
|
3
|
-
"version": "1.27.
|
3
|
+
"version": "1.27.6",
|
4
4
|
"main": "dist/player-profile-info.js",
|
5
5
|
"svelte": "src/index.ts",
|
6
6
|
"scripts": {
|
@@ -35,5 +35,5 @@
|
|
35
35
|
"publishConfig": {
|
36
36
|
"access": "public"
|
37
37
|
},
|
38
|
-
"gitHead": "
|
38
|
+
"gitHead": "2f583e2260a753f1dc3591b8b5b122a6684bf76f"
|
39
39
|
}
|
@@ -6,10 +6,6 @@
|
|
6
6
|
import { _, addNewMessages, setLocale } from './i18n';
|
7
7
|
import { TRANSLATIONS } from './translations';
|
8
8
|
|
9
|
-
// Native bridge
|
10
|
-
import { isNative, call as callNative, registerEventListener as registerNativeEventListener } from 'js-native-bridge';
|
11
|
-
|
12
|
-
|
13
9
|
export let endpoint:string = '';
|
14
10
|
export let lang:string = 'en';
|
15
11
|
export let countrycode:string = 'IR';
|
@@ -53,9 +49,6 @@
|
|
53
49
|
|
54
50
|
let showConfirmSave:boolean = false;
|
55
51
|
|
56
|
-
// Native bridge
|
57
|
-
let isOnNative:boolean = false;
|
58
|
-
|
59
52
|
let regexValidators:any = {
|
60
53
|
document: /^(?=.*[a-zA-Z0-9])[a-zA-Z0-9\s]+$/
|
61
54
|
}
|
@@ -180,25 +173,6 @@
|
|
180
173
|
break;
|
181
174
|
|
182
175
|
case 'ConfirmProfileInfoSave':
|
183
|
-
if (isOnNative) {
|
184
|
-
registerNativeEventListener(
|
185
|
-
'BIOMETRICS_ENABLED',
|
186
|
-
(biometricsEnabled) => {
|
187
|
-
if (biometricsEnabled !== biometricsSelection) {
|
188
|
-
biometricsSelection = biometricsEnabled;
|
189
|
-
}
|
190
|
-
},
|
191
|
-
);
|
192
|
-
|
193
|
-
const methodFound = callNative(
|
194
|
-
biometricsSelection ? 'ENABLE_BIOMETRICS' : 'DISABLE_BIOMETRICS',
|
195
|
-
);
|
196
|
-
|
197
|
-
if (!methodFound) {
|
198
|
-
// Nothing to do here yet
|
199
|
-
}
|
200
|
-
}
|
201
|
-
|
202
176
|
differencesExist = false;
|
203
177
|
|
204
178
|
showConfirmMessage();
|
@@ -447,19 +421,6 @@
|
|
447
421
|
onMount(() => {
|
448
422
|
window.addEventListener('message', messageHandler, false);
|
449
423
|
|
450
|
-
isOnNative = !!isNative(userAgent);
|
451
|
-
|
452
|
-
if (isOnNative) {
|
453
|
-
registerNativeEventListener(
|
454
|
-
'BIOMETRICS_ENABLED',
|
455
|
-
(biometricsEnabled) => {
|
456
|
-
biometricsSelection = !!biometricsEnabled
|
457
|
-
},
|
458
|
-
);
|
459
|
-
|
460
|
-
callNative('BIOMETRICS_ENABLED');
|
461
|
-
}
|
462
|
-
|
463
424
|
return () => {
|
464
425
|
window.removeEventListener('message', messageHandler);
|
465
426
|
}
|
@@ -614,20 +575,6 @@
|
|
614
575
|
{/if}
|
615
576
|
</section>
|
616
577
|
{/if}
|
617
|
-
{#if isOnNative}
|
618
|
-
<div class="PlayerNotificationsHeader">
|
619
|
-
<h3>{$_('userAppSettings')}</h3>
|
620
|
-
</div>
|
621
|
-
<section class="PlayerNotificationsCheckboxArea">
|
622
|
-
<div class="PlayerNotificationBox">
|
623
|
-
<label for="Biometrics">
|
624
|
-
<input bind:checked={biometricsSelection} on:change={checkForChanges} type="checkbox" id="BiometricsEnabled" name="Biometric Enabled" />
|
625
|
-
<span class="Checkmark"></span>
|
626
|
-
<span>{$_('userBiometrics')}</span>
|
627
|
-
</label>
|
628
|
-
</div>
|
629
|
-
</section>
|
630
|
-
{/if}
|
631
578
|
<section class="PlayerDetailsButtonsArea {isMobile ? 'PlayerDetailsButtonsAreaMobile' : ''}" >
|
632
579
|
<button class="PlayerDetailsSaveButton {differencesExist && isValid ? '' : 'PlayerButtonDisabled'}" on:click={(e) => updatePlayerInfo(e)}>{$_('userProfileSaveChanges')}</button>
|
633
580
|
</section>
|