@jetthai/cuora 1.1.221-layout-1 → 1.1.221
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 +0 -4
- package/package.json +1 -1
- package/src/api/common.js +0 -1
- package/src/machine/common.js +8 -11
package/CHANGELOG.md
CHANGED
|
@@ -2,10 +2,6 @@
|
|
|
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.221-layout-1](https://github.com/jetthai/cuora-module/compare/v1.1.221-layout...v1.1.221-layout-1) (2024-02-06)
|
|
6
|
-
|
|
7
|
-
### [1.1.221-layout](https://github.com/jetthai/cuora-module/compare/v1.1.221...v1.1.221-layout) (2024-02-02)
|
|
8
|
-
|
|
9
5
|
### [1.1.221](https://github.com/jetthai/cuora-module/compare/v1.1.220...v1.1.221) (2024-01-23)
|
|
10
6
|
|
|
11
7
|
### Bug Fixes
|
package/package.json
CHANGED
package/src/api/common.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
getConfig: ({ appSecret }) => ({ url: 'getConfig', method: 'get', params: { appSecret }, isPublic: true }),
|
|
3
|
-
getLayoutConfig: ({ appSecret }) => ({ url: 'getQuickLayout', method: 'get', params: { appSecret }, isPublic: true }),
|
|
4
3
|
feeds: ({ appSecret }) => ({ url: 'feeds', method: 'get', params: { appSecret }, isPublic: true }),
|
|
5
4
|
broadcast: () => ({ url: 'broadcast', method: 'get', isPublic: true }),
|
|
6
5
|
getAnnouncements: ({ appSecret }) => ({ url: 'getAnnouncements', params: { appSecret }, method: 'get', isPublic: true }),
|
package/src/machine/common.js
CHANGED
|
@@ -29,7 +29,6 @@ export default function (request) {
|
|
|
29
29
|
},
|
|
30
30
|
paymentMethods: {},
|
|
31
31
|
},
|
|
32
|
-
layoutConfig: null,
|
|
33
32
|
userAgent: '',
|
|
34
33
|
isMobile: false,
|
|
35
34
|
announcementList: null,
|
|
@@ -57,10 +56,10 @@ export default function (request) {
|
|
|
57
56
|
fetching: {
|
|
58
57
|
entry: ['setUA', 'setAgent', 'setPixel', 'setKPixel'],
|
|
59
58
|
invoke: {
|
|
60
|
-
src: '
|
|
59
|
+
src: 'fetchSiteConfig',
|
|
61
60
|
onDone: {
|
|
62
61
|
target: 'idle',
|
|
63
|
-
actions: '
|
|
62
|
+
actions: 'setSiteConfig',
|
|
64
63
|
},
|
|
65
64
|
onError: {
|
|
66
65
|
target: 'idle',
|
|
@@ -159,12 +158,10 @@ export default function (request) {
|
|
|
159
158
|
},
|
|
160
159
|
},
|
|
161
160
|
actions: {
|
|
162
|
-
|
|
163
|
-
const {
|
|
164
|
-
const { loginMethods = {}, registerMethods = {} } = siteConfig
|
|
161
|
+
setSiteConfig: assign((context, event) => {
|
|
162
|
+
const { loginMethods = {}, registerMethods = {} } = event.data
|
|
165
163
|
return {
|
|
166
|
-
siteConfig: { ...
|
|
167
|
-
layoutConfig,
|
|
164
|
+
siteConfig: { ...event.data, loginMethods: pickBy(loginMethods), registerMethods: pickBy(registerMethods) },
|
|
168
165
|
}
|
|
169
166
|
}),
|
|
170
167
|
setUA: assign((context, event) => {
|
|
@@ -268,9 +265,9 @@ export default function (request) {
|
|
|
268
265
|
}),
|
|
269
266
|
},
|
|
270
267
|
services: {
|
|
271
|
-
|
|
272
|
-
const
|
|
273
|
-
return
|
|
268
|
+
fetchSiteConfig: async (context, event) => {
|
|
269
|
+
const { config } = await request.send(api.getConfig({ appSecret }))
|
|
270
|
+
return JSON.parse(window.atob(config))
|
|
274
271
|
},
|
|
275
272
|
fetchFeeds: async (context, event) => {
|
|
276
273
|
return await request.send(api.feeds({ appSecret }))
|