@jetthai/cuora 1.1.185 → 1.1.187
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/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/src/machine/game_v2_1.js +14 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.1.187](https://github.com/jetthai/cuora-module/compare/v1.1.186...v1.1.187) (2023-10-03)
|
|
6
|
+
|
|
7
|
+
### [1.1.186](https://github.com/jetthai/cuora-module/compare/v1.1.185...v1.1.186) (2023-09-23)
|
|
8
|
+
|
|
5
9
|
### [1.1.185](https://github.com/jetthai/cuora-module/compare/v1.1.184...v1.1.185) (2023-09-22)
|
|
6
10
|
|
|
7
11
|
### [1.1.184](https://github.com/jetthai/cuora-module/compare/v1.1.183...v1.1.184) (2023-09-21)
|
package/package.json
CHANGED
package/src/machine/game_v2_1.js
CHANGED
|
@@ -37,6 +37,7 @@ export default function (request) {
|
|
|
37
37
|
mappingId: null,
|
|
38
38
|
portrait: null,
|
|
39
39
|
gameCode: null,
|
|
40
|
+
name: null,
|
|
40
41
|
},
|
|
41
42
|
lang: 'en_US',
|
|
42
43
|
isMobile: new UAParser().getResult().device.type,
|
|
@@ -140,9 +141,11 @@ export default function (request) {
|
|
|
140
141
|
src: 'disconnectGame',
|
|
141
142
|
onDone: {
|
|
142
143
|
target: 'idle',
|
|
144
|
+
actions: 'setGameURL',
|
|
143
145
|
},
|
|
144
146
|
onError: {
|
|
145
147
|
target: 'idle',
|
|
148
|
+
actions: 'setGameURL',
|
|
146
149
|
},
|
|
147
150
|
},
|
|
148
151
|
},
|
|
@@ -328,6 +331,15 @@ export default function (request) {
|
|
|
328
331
|
}
|
|
329
332
|
}),
|
|
330
333
|
setGameURL: assign({
|
|
334
|
+
type: (context, event) => {
|
|
335
|
+
return event.data.type
|
|
336
|
+
},
|
|
337
|
+
gameToken: (context, event) => {
|
|
338
|
+
return event.data.game_token
|
|
339
|
+
},
|
|
340
|
+
content: (context, event) => {
|
|
341
|
+
return event.data.content
|
|
342
|
+
},
|
|
331
343
|
gameURL: (context, event) => {
|
|
332
344
|
return event.data.gameURL
|
|
333
345
|
},
|
|
@@ -336,8 +348,8 @@ export default function (request) {
|
|
|
336
348
|
return { game: { providerId: null, gameId: null, gameTypeId: null, mappingId: null } }
|
|
337
349
|
}),
|
|
338
350
|
setGameInfo: assign((context, event) => {
|
|
339
|
-
const { providerId, gameId, gameTypeId, mappingId, portrait, gameCode } = event.data.game
|
|
340
|
-
return { game: { providerId, gameId, gameTypeId, mappingId, portrait: portrait ? 1 : 0, gameCode } }
|
|
351
|
+
const { providerId, gameId, gameTypeId, mappingId, portrait, gameCode, name } = event.data.game
|
|
352
|
+
return { game: { providerId, gameId, gameTypeId, mappingId, portrait: portrait ? 1 : 0, gameCode, name } }
|
|
341
353
|
}),
|
|
342
354
|
setLang: assign((context, event) => {
|
|
343
355
|
const lang = event.data.locale.replace('-', '_')
|