@steedos/service-core-objects 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.
@@ -35,7 +35,7 @@ listviews:
35
35
  label: all
36
36
  actions:
37
37
  standard_new:
38
- label: New
38
+ label: Upload
39
39
  standard_open_view:
40
40
  label: Open View
41
41
  online_preview:
@@ -48,3 +48,9 @@ actions:
48
48
  label: Download
49
49
  new_version:
50
50
  label: Upgrade
51
+ CustomLabels:
52
+ cms_files_upload_success: Uploaded successfully
53
+ cms_files_pagedetail_tab_preview: Preview
54
+ cms_files_pagedetail_tab_detail: Details
55
+ cms_files_pagedetail_tab_historical_versions: Historical Versions
56
+ cms_files_pagedetail_tab_chatter: Comments
@@ -35,7 +35,7 @@ listviews:
35
35
  label: 所有
36
36
  actions:
37
37
  standard_new:
38
- label: 新建
38
+ label: 上传
39
39
  standard_open_view:
40
40
  label: 查看
41
41
  online_preview:
@@ -48,3 +48,9 @@ actions:
48
48
  label: 下载
49
49
  new_version:
50
50
  label: 上传新版本
51
+ CustomLabels:
52
+ cms_files_upload_success: 上传成功
53
+ cms_files_pagedetail_tab_preview: 预览
54
+ cms_files_pagedetail_tab_detail: 详细
55
+ cms_files_pagedetail_tab_historical_versions: 历史版本
56
+ cms_files_pagedetail_tab_chatter: 评论
@@ -167,8 +167,25 @@ actions:
167
167
  label: Verify Email
168
168
  verify_mobile:
169
169
  label: Verify Mobile
170
+ clear_login_tokens:
171
+ label: Log out all logins
170
172
  CustomLabels:
171
173
  space_users_field_profile_def_options_admin: Administrator
172
174
  space_users_field_profile_def_options_user: Employee
173
175
  space_users_field_profile_def_options_supplier: Supplier
174
176
  space_users_field_profile_def_options_customer: Customer
177
+ space_users_actions_disable_confirmText: Are you sure you want to disable this user?
178
+ space_users_actions_disable_success: The user has disabled successfully
179
+ space_users_actions_disable_failed: The user failed to disable. Please try again later
180
+ space_users_actions_enable_confirmText: Are you sure you want to enable this user?
181
+ space_users_actions_enable_success: The user has enabled successfully
182
+ space_users_actions_enable_failed: The user failed to enable. Please try again later
183
+ space_users_actions_lockout_confirmText: Are you sure you want to lockout this user?
184
+ space_users_actions_lockout_success: The user has lockouted successfully
185
+ space_users_actions_lockout_failed: The user failed to lockout. Please try again later
186
+ space_users_actions_unlock_confirmText: Are you sure you want to unlock this user?
187
+ space_users_actions_unlock_success: The user has unlocked successfully
188
+ space_users_actions_unlock_failed: The user failed to unlock. Please try again later
189
+ space_users_actions_clear_login_tokens_confirmText: After logging out of all logins, all the logged-in flowers and clients of the user need to log in again. Are you sure you want to clean it up?
190
+ space_users_actions_clear_login_tokens_success: Logging out successfully
191
+
@@ -156,7 +156,7 @@ actions:
156
156
  setPassword:
157
157
  label: 修改密码
158
158
  disable:
159
- label: 停用
159
+ label: 禁用
160
160
  enable:
161
161
  label: 启用
162
162
  lockout:
@@ -167,8 +167,24 @@ actions:
167
167
  label: 验证邮箱
168
168
  verify_mobile:
169
169
  label: 验证手机
170
+ clear_login_tokens:
171
+ label: 注销所有登录
170
172
  CustomLabels:
171
173
  space_users_field_profile_def_options_admin: 管理员
172
174
  space_users_field_profile_def_options_user: 员工
173
175
  space_users_field_profile_def_options_supplier: 供应商
174
176
  space_users_field_profile_def_options_customer: 客户
177
+ space_users_actions_disable_confirmText: 确定要禁用此用户吗?
178
+ space_users_actions_disable_success: 用户已禁用
179
+ space_users_actions_disable_failed: 用户禁用失败,请稍后再试
180
+ space_users_actions_enable_confirmText: 确定要启用此用户吗?
181
+ space_users_actions_enable_success: 用户已启用
182
+ space_users_actions_enable_failed: 用户启用失败,请稍后再试
183
+ space_users_actions_lockout_confirmText: 确定要锁定此用户吗?
184
+ space_users_actions_lockout_success: 用户已锁定
185
+ space_users_actions_lockout_failed: 用户锁定失败,请稍后再试
186
+ space_users_actions_unlock_confirmText: 确定要解锁此用户吗?
187
+ space_users_actions_unlock_success: 用户已解锁
188
+ space_users_actions_unlock_failed: 用户解锁失败,请稍后再试
189
+ space_users_actions_clear_login_tokens_confirmText: 注销所有登录后,用户所有已登录的流程器、客户端都需要重新登录。 确定要清理吗?
190
+ space_users_actions_clear_login_tokens_success: 注销成功
@@ -6,7 +6,7 @@ amis_schema: |-
6
6
  {
7
7
  "id": "u:download",
8
8
  "type": "button",
9
- "label": "下载",
9
+ "label": "${'CustomAction.cms_files.download' | t}",
10
10
  "onEvent": {
11
11
  "click": {
12
12
  "actions": [
@@ -164,7 +164,7 @@ actions:
164
164
  "label": "",
165
165
  "name": "__file",
166
166
  "id": "u:a58d02614e04",
167
- "btnLabel": "上传新版本",
167
+ "btnLabel": "${'CustomAction.cms_files.new_version' | t}",
168
168
  "btnClassName": "m-0",
169
169
  "className": "p-0",
170
170
  "multiple": false,
@@ -202,7 +202,7 @@ actions:
202
202
  "position": "top-right",
203
203
  "closeButton": true,
204
204
  "showIcon": true,
205
- "msg": "上传成功"
205
+ "msg": "${'CustomLabels.cms_files_upload_success' | t}"
206
206
  },
207
207
  "actionType": "toast"
208
208
  },
@@ -265,7 +265,7 @@ actions:
265
265
  "label": "",
266
266
  "name": "__file",
267
267
  "id": "u:a58d02614e04",
268
- "btnLabel": "上传",
268
+ "btnLabel": "${'CustomAction.cms_files.standard_new' | t}",
269
269
  "btnClassName": "m-0",
270
270
  "className": "p-0",
271
271
  "multiple": false,
@@ -303,7 +303,7 @@ actions:
303
303
  "position": "top-right",
304
304
  "closeButton": true,
305
305
  "showIcon": true,
306
- "msg": "${'cms_files.upload.message_success' | t}"
306
+ "msg": "${'CustomLabels.cms_files_upload_success' | t}"
307
307
  },
308
308
  "actionType": "toast"
309
309
  },
@@ -15,8 +15,11 @@ module.exports = {
15
15
  if (!record) {
16
16
  return toastr.error("未找到记录");
17
17
  }
18
-
19
- window.open(Steedos.getRelativeUrl("/api/amisObjectFieldsDesign?oid=" + record_id+`&assetUrls=${Builder.settings.assetUrls}`));
18
+ var locale = Builder.settings.context?.user?.language || window.navigator.language;
19
+ if(locale === 'en' || locale.startsWith('en-')){
20
+ locale = 'en-US'
21
+ }
22
+ window.open(Steedos.getRelativeUrl("/api/amisObjectFieldsDesign?oid=" + record_id+`&assetUrls=${Builder.settings.assetUrls}&locale=${locale}`));
20
23
  },
21
24
  design_fields_layoutVisible: function(object_name, record_id, record_permissions, data) {
22
25
  var record = data && data.record;
@@ -5,10 +5,10 @@ amis_schema: |-
5
5
  "body": [
6
6
  {
7
7
  "type": "button",
8
- "label": "注销所有登录",
8
+ "label": "${'CustomAction.space_users.clear_login_tokens' | t}",
9
9
  "id": "u:clear_login_tokens",
10
10
  "editorState": "default",
11
- "confirmText": "注销所有登录后, 用户所有已登录的流程器、客户端都需要重新登录. 确定要清理吗?",
11
+ "confirmText": "${'CustomLabels.space_users_actions_clear_login_tokens_confirmText' | t}",
12
12
  "hiddenOn": "context.user.is_space_admin != true || Steedos.settings.public.enable_saas == true",
13
13
  "onEvent": {
14
14
  "click": {
@@ -23,10 +23,7 @@ amis_schema: |-
23
23
  "url": "${context.rootUrl}/api/users/${record.user}/clear_login_tokens",
24
24
  "method": "get",
25
25
  "requestAdaptor": "",
26
- "adaptor": "",
27
- "messages": {
28
- "success": "注销成功"
29
- }
26
+ "adaptor": "return payload.success ? {data: {...payload}, status: 0, msg: t('CustomLabels.space_users_actions_clear_login_tokens_success')} : {...payload, status: 1};"
30
27
  }
31
28
  }
32
29
  }
@@ -8,9 +8,9 @@ amis_schema: |-
8
8
  "body": [
9
9
  {
10
10
  "type": "button",
11
- "label": "禁用",
11
+ "label": "${'CustomAction.space_users.disable' | t}",
12
12
  "id": "u:disable",
13
- "confirmText": "确定要禁用此用户吗?",
13
+ "confirmText": "${'CustomLabels.space_users_actions_disable_confirmText' | t}",
14
14
  "onEvent": {
15
15
  "click": {
16
16
  "weight": 0,
@@ -21,11 +21,7 @@ amis_schema: |-
21
21
  "url": "/service/api/space_users/disable",
22
22
  "method": "post",
23
23
  "requestAdaptor": "api.data={suId: context.recordId}\n\n\nreturn api;",
24
- "adaptor": "",
25
- "messages": {
26
- "success": "用户已禁用",
27
- "failed": "用户禁用失败,请稍后再试"
28
- }
24
+ "adaptor": "return payload.success ? {data: {...payload}, status: 0, msg: t('CustomLabels.space_users_actions_disable_success')} : {...payload, status: 1, msg: t('CustomLabels.space_users_actions_disable_failed')};"
29
25
  }
30
26
  },
31
27
  {
@@ -8,9 +8,9 @@ amis_schema: |-
8
8
  "body": [
9
9
  {
10
10
  "type": "button",
11
- "label": "启用",
11
+ "label": "${'CustomAction.space_users.enable' | t}",
12
12
  "id": "u:enable",
13
- "confirmText": "确定要启用此用户吗?",
13
+ "confirmText": "${'CustomLabels.space_users_actions_enable_confirmText' | t}",
14
14
  "onEvent": {
15
15
  "click": {
16
16
  "weight": 0,
@@ -21,11 +21,7 @@ amis_schema: |-
21
21
  "url": "/service/api/space_users/enable",
22
22
  "method": "post",
23
23
  "requestAdaptor": "api.data={suId: context.recordId}\n\n\nreturn api;",
24
- "adaptor": "",
25
- "messages": {
26
- "success": "用户已启用",
27
- "failed": "用户启用失败,请稍后再试"
28
- }
24
+ "adaptor": "return payload.success ? {data: {...payload}, status: 0, msg: t('CustomLabels.space_users_actions_enable_success')} : {...payload, status: 1, msg: t('CustomLabels.space_users_actions_enable_failed')};"
29
25
  }
30
26
  },
31
27
  {
@@ -19,9 +19,9 @@ amis_schema: |-
19
19
  "body": [
20
20
  {
21
21
  "type": "button",
22
- "label": "锁定",
22
+ "label": "${'CustomAction.space_users.lockout' | t}",
23
23
  "id": "u:lockout",
24
- "confirmText": "确定要锁定此用户吗?",
24
+ "confirmText": "${'CustomLabels.space_users_actions_lockout_confirmText' | t}",
25
25
  "onEvent": {
26
26
  "click": {
27
27
  "weight": 0,
@@ -32,11 +32,7 @@ amis_schema: |-
32
32
  "url": "/service/api/space_users/lockout",
33
33
  "method": "post",
34
34
  "requestAdaptor": "api.data={suId: context.recordId}\n\n\nreturn api;",
35
- "adaptor": "",
36
- "messages": {
37
- "success": "用户已锁定",
38
- "failed": "用户锁定失败,请稍后再试"
39
- }
35
+ "adaptor": "return payload.success ? {data: {...payload}, status: 0, msg: t('CustomLabels.space_users_actions_lockout_success')} : {...payload, status: 1, msg: t('CustomLabels.space_users_actions_lockout_failed')};"
40
36
  }
41
37
  },
42
38
  {
@@ -20,9 +20,9 @@ amis_schema: |-
20
20
  "body": [
21
21
  {
22
22
  "type": "button",
23
- "label": "解锁",
23
+ "label": "${'CustomAction.space_users.unlock' | t}",
24
24
  "id": "u:lockout",
25
- "confirmText": "确定要解锁此用户吗?",
25
+ "confirmText": "${'CustomLabels.space_users_actions_unlock_confirmText' | t}",
26
26
  "onEvent": {
27
27
  "click": {
28
28
  "weight": 0,
@@ -33,11 +33,7 @@ amis_schema: |-
33
33
  "url": "/service/api/space_users/unlock",
34
34
  "method": "post",
35
35
  "requestAdaptor": "api.data={suId: context.recordId}\n\n\nreturn api;",
36
- "adaptor": "",
37
- "messages": {
38
- "success": "用户已解锁",
39
- "failed": "用户解锁失败,请稍后再试"
40
- }
36
+ "adaptor": "return payload.success ? {data: {...payload}, status: 0, msg: t('CustomLabels.space_users_actions_unlock_success')} : {...payload, status: 1, msg: t('CustomLabels.space_users_actions_unlock_failed')};"
41
37
  }
42
38
  },
43
39
  {
@@ -13,7 +13,7 @@
13
13
  "className": "steedos-record-tabs bg-white p-4 sm:m-4 sm:border sm:rounded",
14
14
  "tabs": [
15
15
  {
16
- "title": "预览",
16
+ "title": "${'CustomLabels.cms_files_pagedetail_tab_preview' | t}",
17
17
  "className": "tab-container-office-preview",
18
18
  "body": [
19
19
  {
@@ -119,7 +119,7 @@
119
119
  "visibleOn": "${ARRAYINCLUDES(['docx', 'xlsx', 'pdf', 'png', 'jpg', 'jpeg', 'bmp', 'gif', 'webp', 'psd', 'svg', 'tiff'],${extention})}"
120
120
  },
121
121
  {
122
- "title": "详细",
122
+ "title": "${'CustomLabels.cms_files_pagedetail_tab_detail' | t}",
123
123
  "body": [
124
124
  {
125
125
  "type": "steedos-object-form",
@@ -134,7 +134,7 @@
134
134
  "id": "u:5d4e7e3f6ecc"
135
135
  },
136
136
  {
137
- "title": "历史版本",
137
+ "title": "${'CustomLabels.cms_files_pagedetail_tab_historical_versions' | t}",
138
138
  "body": [
139
139
  {
140
140
  "type": "steedos-object-related-lists",
@@ -149,7 +149,7 @@
149
149
  "id": "u:f2f42d8195ab"
150
150
  },
151
151
  {
152
- "title": "评论",
152
+ "title": "${'CustomLabels.cms_files_pagedetail_tab_chatter' | t}",
153
153
  "body": [
154
154
  {
155
155
  "type": "rooms-provider",
@@ -59,7 +59,10 @@
59
59
  useOpenAPI: useOpenAPI,
60
60
  oid: "<%=id%>",
61
61
  pageId: "<%=id%>",
62
- hiddenDeploy: true
62
+ hiddenDeploy: true,
63
+ title: "<%=locale%>" === 'zh-CN' ? '对象设计器': 'Object Designer',
64
+ saveText: "<%=locale%>" === 'zh-CN' ? '保存': 'Save',
65
+ deployText: "<%=locale%>" === 'zh-CN' ? '发布': 'Deploy',
63
66
  };
64
67
 
65
68
  let comp = document.querySelector("builder-fiddle");
@@ -37,9 +37,9 @@ router.get('/api/amisObjectFieldsDesign', auth.requireAuthentication, async func
37
37
  // authToken: userSession.authToken
38
38
  // }
39
39
  let locale = "zh-CN";
40
- if (req.query.locale == "en-us") {
40
+ if (req.query.locale?.startsWith('en')) {
41
41
  locale = "en-US";
42
- } else if (req.query.locale == "zh-cn") {
42
+ } else if (req.query?.locale == "zh-cn") {
43
43
  locale = "zh-CN";
44
44
  }
45
45
  const retUrl = req.query.retUrl || process.env.ROOT_URL + '/app/admin/objects/view/' + req.query.oid
@@ -56,7 +56,8 @@ router.get('/api/amisObjectFieldsDesign', auth.requireAuthentication, async func
56
56
  authToken: userSession.authToken,
57
57
  userSession: userSession,
58
58
  id: req.query.oid,
59
- useOpenAPI: process.env.STEEDOS_PUBLIC_USE_OPEN_API
59
+ useOpenAPI: process.env.STEEDOS_PUBLIC_USE_OPEN_API,
60
+ locale: locale
60
61
  }
61
62
  const options = {}
62
63
  ejs.renderFile(filename, data, options, function(err, str){
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/service-core-objects",
3
- "version": "3.0.0-beta.90",
3
+ "version": "3.0.0-beta.92",
4
4
  "main": "package.service.js",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -10,12 +10,12 @@
10
10
  "steedos"
11
11
  ],
12
12
  "dependencies": {
13
- "@steedos/service-package-loader": "3.0.0-beta.90",
13
+ "@steedos/service-package-loader": "3.0.0-beta.92",
14
14
  "json2xls": "^0.1.2",
15
15
  "lodash": "^4.17.21"
16
16
  },
17
17
  "description": "steedos package",
18
18
  "repository": {},
19
19
  "license": "MIT",
20
- "gitHead": "196645f156c4c4cf4d07f288117c5e5d271bba0f"
20
+ "gitHead": "16a684ff645d0a9b745e4b49309f2c63d6a41395"
21
21
  }