@jetthai/cuora 1.1.225 → 1.1.226
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 +2 -0
- package/package.json +1 -1
- package/src/machine/common.js +16 -1
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.226](https://github.com/jetthai/cuora-module/compare/v1.1.225...v1.1.226) (2024-02-26)
|
|
6
|
+
|
|
5
7
|
### [1.1.225](https://github.com/jetthai/cuora-module/compare/v1.1.221-layout-1...v1.1.225) (2024-02-07)
|
|
6
8
|
|
|
7
9
|
### [1.1.224](https://github.com/jetthai/cuora-module/compare/v1.1.222...v1.1.224) (2024-02-02)
|
package/package.json
CHANGED
package/src/machine/common.js
CHANGED
|
@@ -162,9 +162,24 @@ export default function (request) {
|
|
|
162
162
|
setConfig: assign((context, event) => {
|
|
163
163
|
const { siteConfig, layoutConfig } = event.data
|
|
164
164
|
const { loginMethods = {}, registerMethods = {} } = siteConfig
|
|
165
|
+
let layoutConfigDecoded = ''
|
|
166
|
+
|
|
167
|
+
if (layoutConfig) {
|
|
168
|
+
const base64Url = layoutConfig.split('.')[0]
|
|
169
|
+
const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/')
|
|
170
|
+
layoutConfigDecoded = decodeURIComponent(
|
|
171
|
+
window
|
|
172
|
+
.atob(base64)
|
|
173
|
+
.split('')
|
|
174
|
+
.map((c) => {
|
|
175
|
+
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)
|
|
176
|
+
})
|
|
177
|
+
.join('')
|
|
178
|
+
)
|
|
179
|
+
}
|
|
165
180
|
return {
|
|
166
181
|
siteConfig: { ...siteConfig, loginMethods: pickBy(loginMethods), registerMethods: pickBy(registerMethods) },
|
|
167
|
-
layoutConfig,
|
|
182
|
+
layoutConfig: layoutConfigDecoded,
|
|
168
183
|
}
|
|
169
184
|
}),
|
|
170
185
|
setUA: assign((context, event) => {
|