@jetthai/cuora 1.1.387-dev-2 → 1.1.387-dev-3

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 CHANGED
@@ -2,6 +2,8 @@
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.387-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.387-dev-2...v1.1.387-dev-3) (2025-10-01)
6
+
5
7
  ### [1.1.387-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.387-dev-1...v1.1.387-dev-2) (2025-10-01)
6
8
 
7
9
  ### [1.1.387-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.387-dev...v1.1.387-dev-1) (2025-09-26)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.387-dev-2",
3
+ "version": "1.1.387-dev-3",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -42,6 +42,7 @@ export default function (request) {
42
42
  defaultAffiliateCode: null,
43
43
  friendCode: null,
44
44
  isPlaying: false,
45
+ isLogin: false,
45
46
  },
46
47
  states: {
47
48
  config: {
@@ -89,8 +90,20 @@ export default function (request) {
89
90
  },
90
91
  },
91
92
  feed: {
92
- initial: 'updating',
93
+ initial: 'idle',
93
94
  states: {
95
+ idle: {
96
+ on: {
97
+ LOGIN_REFRESH: {
98
+ target: 'updating',
99
+ actions: 'login',
100
+ },
101
+ LEAVE_GAME_REFRESH: {
102
+ target: 'updating',
103
+ actions: 'leaveGame',
104
+ },
105
+ },
106
+ },
94
107
  updating: {
95
108
  invoke: {
96
109
  src: 'fetchFeeds',
@@ -111,11 +124,12 @@ export default function (request) {
111
124
  },
112
125
  on: {
113
126
  ENTER_GAME_PAUSE: {
127
+ target: '.idle',
114
128
  actions: 'resetByEnterGame',
115
129
  },
116
- LEAVE_GAME_REFRESH: {
117
- target: '.updating',
118
- actions: 'leaveGame',
130
+ LOGOUT_PAUSE: {
131
+ target: '.idle',
132
+ actions: 'resetByLogout',
119
133
  },
120
134
  },
121
135
  },
@@ -347,6 +361,19 @@ export default function (request) {
347
361
  isPlaying: false,
348
362
  }
349
363
  }),
364
+ resetByLogout: assign((context, event) => {
365
+ return {
366
+ isLogin: false,
367
+ broadcastList: null,
368
+ mailBoxInfo: null,
369
+ promotions: null,
370
+ }
371
+ }),
372
+ login: assign((context, event) => {
373
+ return {
374
+ isLogin: true,
375
+ }
376
+ }),
350
377
  },
351
378
  guards: {
352
379
  isAffiliateCodeInstructionsEnable: (context, event) => {