@steedos/service-pages 3.0.0-beta.90 → 3.0.0-beta.92
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.
|
@@ -9,7 +9,7 @@ module.exports = {
|
|
|
9
9
|
// Steedos.openWindow();
|
|
10
10
|
var locale = Builder.settings.context?.user?.language || window.navigator.language;
|
|
11
11
|
if(locale === 'en' || locale.startsWith('en-')){
|
|
12
|
-
locale = 'en-
|
|
12
|
+
locale = 'en-US'
|
|
13
13
|
}
|
|
14
14
|
document.location = Steedos.absoluteUrl(`/api/pageDesign?pageId=${record_id}&assetUrls=${Builder.settings.assetUrls}&locale=${locale}`);
|
|
15
15
|
},
|
|
@@ -50,7 +50,10 @@
|
|
|
50
50
|
authToken: "<%=authToken%>",
|
|
51
51
|
pageId: "<%=pageId%>",
|
|
52
52
|
messageOnly: true,
|
|
53
|
-
useOpenAPI: useOpenAPI
|
|
53
|
+
useOpenAPI: useOpenAPI,
|
|
54
|
+
title: "<%=locale%>" === 'zh-CN' ? '微页面设计器': 'Page Designer',
|
|
55
|
+
saveText: "<%=locale%>" === 'zh-CN' ? '保存': 'Save',
|
|
56
|
+
deployText: "<%=locale%>" === 'zh-CN' ? '发布': 'Deploy',
|
|
54
57
|
};
|
|
55
58
|
|
|
56
59
|
let comp = document.querySelector("builder-fiddle");
|
|
@@ -37,7 +37,7 @@ router.get('/api/pageDesign', auth.requireAuthentication, async function (req, r
|
|
|
37
37
|
// authToken: userSession.authToken
|
|
38
38
|
// }
|
|
39
39
|
let locale = "zh-CN";
|
|
40
|
-
if (req.query.locale
|
|
40
|
+
if (req.query.locale?.startsWith('en')) {
|
|
41
41
|
locale = "en-US";
|
|
42
42
|
} else if (req.query.locale == "zh-cn") {
|
|
43
43
|
locale = "zh-CN";
|
|
@@ -57,7 +57,8 @@ router.get('/api/pageDesign', auth.requireAuthentication, async function (req, r
|
|
|
57
57
|
authToken: userSession.authToken,
|
|
58
58
|
pageId: req.query.pageId,
|
|
59
59
|
userSession: userSession,
|
|
60
|
-
useOpenAPI: process.env.STEEDOS_PUBLIC_USE_OPEN_API
|
|
60
|
+
useOpenAPI: process.env.STEEDOS_PUBLIC_USE_OPEN_API,
|
|
61
|
+
locale: locale
|
|
61
62
|
}
|
|
62
63
|
const options = {}
|
|
63
64
|
ejs.renderFile(filename, data, options, function(err, str){
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/service-pages",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.92",
|
|
4
4
|
"main": "package.service.js",
|
|
5
5
|
"scripts": {},
|
|
6
6
|
"license": "MIT",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"publishConfig": {
|
|
9
9
|
"access": "public"
|
|
10
10
|
},
|
|
11
|
-
"gitHead": "
|
|
11
|
+
"gitHead": "16a684ff645d0a9b745e4b49309f2c63d6a41395",
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"clone": "^2.1.2",
|
|
14
14
|
"ejs": "^3.1.8"
|