@jetthai/cuora 1.1.300-dev-2 → 1.1.301
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 +1 -3
- package/package.json +1 -1
- package/src/api/common.js +0 -1
- package/src/machine/index.js +0 -2
- package/src/machine/user_sign_up.js +1 -17
- package/src/machine/navbar.js +0 -57
package/CHANGELOG.md
CHANGED
|
@@ -2,9 +2,7 @@
|
|
|
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.
|
|
6
|
-
|
|
7
|
-
### [1.1.300-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.300...v1.1.300-dev-1) (2024-08-28)
|
|
5
|
+
### [1.1.301](https://github.com/jetthai/cuora-module/compare/v1.1.300...v1.1.301) (2024-09-02)
|
|
8
6
|
|
|
9
7
|
### [1.1.300](https://github.com/jetthai/cuora-module/compare/v1.1.299...v1.1.300) (2024-08-27)
|
|
10
8
|
|
package/package.json
CHANGED
package/src/api/common.js
CHANGED
|
@@ -4,5 +4,4 @@ export default {
|
|
|
4
4
|
feeds: ({ appSecret }) => ({ url: 'feeds', method: 'get', params: { appSecret }, isPublic: true }),
|
|
5
5
|
broadcast: () => ({ url: 'broadcast', method: 'get', isPublic: true }),
|
|
6
6
|
getAnnouncements: ({ appSecret }) => ({ url: 'getAnnouncements', params: { appSecret }, method: 'get', isPublic: true }),
|
|
7
|
-
getNavbar: ({ appSecret } = {}) => ({ url: 'getNavbarSetting', params: { appSecret }, method: 'get', isPublic: true }),
|
|
8
7
|
}
|
package/src/machine/index.js
CHANGED
|
@@ -35,7 +35,6 @@ import promotions from './promotions.js'
|
|
|
35
35
|
import roulette_v2 from './roulette_v2.js'
|
|
36
36
|
import honor_board_cash from './honor_board_cash.js'
|
|
37
37
|
import user_photo from './user_photo.js'
|
|
38
|
-
import navbar from './navbar.js'
|
|
39
38
|
|
|
40
39
|
export default {
|
|
41
40
|
...activity,
|
|
@@ -74,6 +73,5 @@ export default {
|
|
|
74
73
|
roulette_v2,
|
|
75
74
|
honor_board_cash,
|
|
76
75
|
user_photo,
|
|
77
|
-
navbar,
|
|
78
76
|
...withdraw,
|
|
79
77
|
}
|
|
@@ -143,21 +143,7 @@ export default function (request) {
|
|
|
143
143
|
}
|
|
144
144
|
}),
|
|
145
145
|
setSignUpEmail: assign((context, event) => {
|
|
146
|
-
const {
|
|
147
|
-
email,
|
|
148
|
-
nick_name,
|
|
149
|
-
password,
|
|
150
|
-
channel,
|
|
151
|
-
subchannel,
|
|
152
|
-
bankCode,
|
|
153
|
-
bankAccount,
|
|
154
|
-
holderName,
|
|
155
|
-
branch,
|
|
156
|
-
branchCode,
|
|
157
|
-
affiliateCode,
|
|
158
|
-
countryCode,
|
|
159
|
-
phone,
|
|
160
|
-
} = event.data
|
|
146
|
+
const { email, nick_name, password, channel, subchannel, bankCode, bankAccount, holderName, branch, branchCode, affiliateCode } = event.data
|
|
161
147
|
return {
|
|
162
148
|
signUpData: {
|
|
163
149
|
provider: 'email',
|
|
@@ -170,8 +156,6 @@ export default function (request) {
|
|
|
170
156
|
branch,
|
|
171
157
|
branchCode,
|
|
172
158
|
affiliateCode,
|
|
173
|
-
countryCode,
|
|
174
|
-
phone,
|
|
175
159
|
},
|
|
176
160
|
channel,
|
|
177
161
|
subchannel,
|
package/src/machine/navbar.js
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { assign, createMachine } from 'xstate'
|
|
2
|
-
import common from '../api/common.js'
|
|
3
|
-
|
|
4
|
-
export default function (request) {
|
|
5
|
-
const { appSecret } = request.config
|
|
6
|
-
return createMachine(
|
|
7
|
-
{
|
|
8
|
-
id: 'navbar',
|
|
9
|
-
initial: 'fetching',
|
|
10
|
-
context: {
|
|
11
|
-
navbar: null,
|
|
12
|
-
},
|
|
13
|
-
states: {
|
|
14
|
-
fetching: {
|
|
15
|
-
invoke: {
|
|
16
|
-
src: 'fetchNavbar',
|
|
17
|
-
onDone: {
|
|
18
|
-
target: 'idle',
|
|
19
|
-
actions: 'setNavbar',
|
|
20
|
-
},
|
|
21
|
-
onError: {
|
|
22
|
-
target: 'idle',
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
idle: {},
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
actions: {
|
|
31
|
-
setNavbar: assign((context, event) => {
|
|
32
|
-
const { navbarConfig } = event.data
|
|
33
|
-
return {
|
|
34
|
-
navbar: navbarConfig.settings,
|
|
35
|
-
}
|
|
36
|
-
}),
|
|
37
|
-
},
|
|
38
|
-
services: {
|
|
39
|
-
fetchNavbar: async (context, event) => {
|
|
40
|
-
const navbar = await request.send(common.getNavbar({ appSecret }))
|
|
41
|
-
const base64Url = navbar.config.split('.')[0]
|
|
42
|
-
const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/')
|
|
43
|
-
const decodeResult = decodeURIComponent(
|
|
44
|
-
window
|
|
45
|
-
.atob(base64)
|
|
46
|
-
.split('')
|
|
47
|
-
.map((c) => {
|
|
48
|
-
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)
|
|
49
|
-
})
|
|
50
|
-
.join('')
|
|
51
|
-
)
|
|
52
|
-
return { navbarConfig: JSON.parse(decodeResult) }
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
}
|
|
56
|
-
)
|
|
57
|
-
}
|