@steedos/service-core-objects 3.0.0-beta.90 → 3.0.0-beta.93

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.
Files changed (36) hide show
  1. package/main/default/objectTranslations/base.en/base.en.objectTranslation.yml +4 -0
  2. package/main/default/objectTranslations/base.zh-CN/base.zh-CN.objectTranslation.yml +4 -0
  3. package/main/default/objectTranslations/cms_files.en/cms_files.en.objectTranslation.yml +7 -1
  4. package/main/default/objectTranslations/cms_files.zh-CN/cms_files.zh-CN.objectTranslation.yml +7 -1
  5. package/main/default/objectTranslations/company.en/company.en.objectTranslation.yml +5 -0
  6. package/main/default/objectTranslations/company.zh-CN/company.zh-CN.objectTranslation.yml +5 -0
  7. package/main/default/objectTranslations/object_actions.en/object_actions.en.objectTranslation.yml +2 -0
  8. package/main/default/objectTranslations/object_actions.zh-CN/object_actions.zh-CN.objectTranslation.yml +2 -0
  9. package/main/default/objectTranslations/object_triggers.en/object_triggers.en.objectTranslation.yml +9 -0
  10. package/main/default/objectTranslations/object_triggers.zh-CN/object_triggers.zh-CN.objectTranslation.yml +9 -0
  11. package/main/default/objectTranslations/object_webhooks.en/object_webhooks.en.objectTranslation.yml +8 -6
  12. package/main/default/objectTranslations/object_webhooks.zh-CN/object_webhooks.zh-CN.objectTranslation.yml +8 -6
  13. package/main/default/objectTranslations/objects.en/objects.en.objectTranslation.yml +5 -1
  14. package/main/default/objectTranslations/objects.zh-CN/objects.zh-CN.objectTranslation.yml +5 -1
  15. package/main/default/objectTranslations/settings.en/settings.en.objectTranslation.yml +9 -0
  16. package/main/default/objectTranslations/settings.zh-CN/settings.zh-CN.objectTranslation.yml +9 -0
  17. package/main/default/objectTranslations/space_users.en/space_users.en.objectTranslation.yml +17 -0
  18. package/main/default/objectTranslations/space_users.zh-CN/space_users.zh-CN.objectTranslation.yml +17 -1
  19. package/main/default/objects/api_keys/buttons/copy.button.yml +1 -1
  20. package/main/default/objects/apps/buttons/disable.button.js +6 -6
  21. package/main/default/objects/apps/buttons/enable.button.js +6 -6
  22. package/main/default/objects/cms_files/buttons/download.button.yml +1 -1
  23. package/main/default/objects/cms_files/cms_files.object.yml +4 -4
  24. package/main/default/objects/company/buttons/updateOrgs.button.yml +3 -6
  25. package/main/default/objects/object_actions/fields/is_system.field.yml +1 -1
  26. package/main/default/objects/objects/buttons/custom.button.yml +1 -5
  27. package/main/default/objects/objects/buttons/design_fields_layout.button.js +5 -2
  28. package/main/default/objects/space_users/buttons/clear_login_tokens.button.yml +3 -6
  29. package/main/default/objects/space_users/buttons/disable.button.yml +3 -7
  30. package/main/default/objects/space_users/buttons/enable.button.yml +3 -7
  31. package/main/default/objects/space_users/buttons/lockout.button.yml +3 -7
  32. package/main/default/objects/space_users/buttons/unlock.button.yml +3 -7
  33. package/main/default/pages/cms_files_preview.page.amis.json +4 -4
  34. package/main/default/routes/object_fields_design.ejs +4 -1
  35. package/main/default/routes/object_fields_design.router.js +4 -3
  36. package/package.json +3 -3
@@ -2,6 +2,10 @@ name: base
2
2
  label:
3
3
  description:
4
4
  fields:
5
+ external_id:
6
+ label: External Id
7
+ help:
8
+ description:
5
9
  owner:
6
10
  label: Owner
7
11
  help:
@@ -2,6 +2,10 @@ name: base
2
2
  label: base
3
3
  description:
4
4
  fields:
5
+ external_id:
6
+ label: 外部ID
7
+ help:
8
+ description:
5
9
  owner:
6
10
  label: 所有者
7
11
  help:
@@ -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: 评论
@@ -48,3 +48,8 @@ listviews:
48
48
  actions:
49
49
  updateOrgs:
50
50
  label: Update The Whole Company
51
+ CustomLabels:
52
+ company_actions_updateOrgs_confirmText_prefix: Update the company「
53
+ company_actions_updateOrgs_confirmText_suffix: 」info?
54
+ company_actions_updateOrgs_success: The company has updated successfully
55
+ company_actions_updateOrgs_failed: The company failed to update. Please try again later
@@ -48,3 +48,8 @@ listviews:
48
48
  actions:
49
49
  updateOrgs:
50
50
  label: 更新组织
51
+ CustomLabels:
52
+ company_actions_updateOrgs_confirmText_prefix: 更新「
53
+ company_actions_updateOrgs_confirmText_suffix: 」组织信息?
54
+ company_actions_updateOrgs_success: 更新组织信息成功
55
+ company_actions_updateOrgs_failed: 更新组织信息失败,请稍后再试
@@ -66,6 +66,8 @@ fields:
66
66
  label: Execute Script
67
67
  help:
68
68
  description:
69
+ is_system:
70
+ label: System
69
71
  listviews:
70
72
  all:
71
73
  label: All
@@ -63,6 +63,8 @@ fields:
63
63
  label: 执行的脚本
64
64
  help:
65
65
  description:
66
+ is_system:
67
+ label: 系统
66
68
  listviews:
67
69
  all:
68
70
  label: 所有
@@ -44,6 +44,15 @@ fields:
44
44
  label: System
45
45
  help:
46
46
  description:
47
+ type:
48
+ label: Type
49
+ help:
50
+ description:
51
+ options:
52
+ - label: Code
53
+ value: code
54
+ - label: Url
55
+ value: url
47
56
  listviews:
48
57
  all:
49
58
  label: All Triggers
@@ -41,6 +41,15 @@ fields:
41
41
  label: 系统
42
42
  help:
43
43
  description:
44
+ type:
45
+ label: 类型
46
+ help:
47
+ description:
48
+ options:
49
+ - label: 代码
50
+ value: code
51
+ - label: 接口
52
+ value: url
44
53
  listviews:
45
54
  all:
46
55
  label: 所有
@@ -10,21 +10,23 @@ fields:
10
10
  label: Object
11
11
  help:
12
12
  description:
13
- events:
14
- label: Events
13
+ event:
14
+ label: When to trigger
15
15
  help:
16
16
  options:
17
- - label: create
17
+ - label: The record has been created.
18
18
  value: create
19
- - label: update
19
+ - label: The record has been updated.
20
20
  value: update
21
- - label: delete
21
+ - label: The record has been created or updated
22
+ value: createAndUpdate
23
+ - label: The record has been deleted.
22
24
  value: delete
23
25
  description:
24
26
  fields:
25
27
  label: Fields
26
28
  help:
27
- description:
29
+ description: If not configured, push all fields
28
30
  payload_url:
29
31
  label: Payload URL
30
32
  help:
@@ -10,21 +10,23 @@ fields:
10
10
  label: 对象
11
11
  help:
12
12
  description:
13
- events:
14
- label: 事件
13
+ event:
14
+ label: 何时触发
15
15
  help:
16
16
  options:
17
- - label: 新增
17
+ - label: 记录已创建
18
18
  value: create
19
- - label: 修改
19
+ - label: 记录已更新
20
20
  value: update
21
- - label: 删除
21
+ - label: 记录已创建或已更新
22
+ value: createAndUpdate
23
+ - label: 记录已删除
22
24
  value: delete
23
25
  description:
24
26
  fields:
25
27
  label: 推送字段
26
28
  help:
27
- description:
29
+ description: 如果未配置, 则推送所有字段
28
30
  payload_url:
29
31
  label: URL
30
32
  help:
@@ -194,6 +194,8 @@ actions:
194
194
  label: Reset
195
195
  delete_object:
196
196
  label: Delete
197
+ custom:
198
+ label: Customize
197
199
  CustomLabels:
198
200
  objects_field_datasource_defaultValue: Default data source
199
201
  objects_field_datasource_meteor: Meteor
@@ -204,4 +206,6 @@ CustomLabels:
204
206
  objects_actions_delete_object_dialog_title_prefix: "Delete Object:"
205
207
  objects_actions_delete_object_dialog_content: "<div>\n<div style=\"text-align: left;\">To delete a custom object, perform the following operations:</div>\n<ul>\n<li style=\"text-align: left;\">Delete the fields and buttons of the object</li>\n<li style=\"text-align: left;\">Delete the tabs and list views of the object</li>\n<li style=\"text-align: left;\">Delete the page layouts of the object</li>\n<li style=\"text-align: left;\">Delete the permission of the object</li>\n<li style=\"text-align: left;\">Delete the validation rules of the object</li>\n<li style=\"text-align: left;\">Delete the restriction rules of the object</li>\n<li style=\"text-align: left;\">Delete the sharing rules of the object</li>\n<li style=\"text-align: left;\">Delete the workflow mapping that uses this object</li>\n<li style=\"text-align: left;\">Delete the open processes that use this object</li>\n<li style=\"text-align: left;\">Delete the pages that uses this object</li>\n</ul>\n</div>"
206
208
  objects_actions_reset_dialog_title_prefix: "Reset Object:"
207
- objects_actions_reset_dialog_content: "<div>\n<div style=\"text-align: left;\">Reset a custom object by performing the following operations:</div>\n<ul>\n<li style=\"text-align: left;\">Delete the custom object</li>\n<li style=\"text-align: left;\">Delete the fields of the custom object</li>\n</ul>\n</div>"
209
+ objects_actions_reset_dialog_content: "<div>\n<div style=\"text-align: left;\">Reset a custom object by performing the following operations:</div>\n<ul>\n<li style=\"text-align: left;\">Delete the custom object</li>\n<li style=\"text-align: left;\">Delete the fields of the custom object</li>\n</ul>\n</div>"
210
+ objects_actions_custom_success: The object has been customized.
211
+ objects_actions_custom_failed: Custom failed====
@@ -199,6 +199,8 @@ actions:
199
199
  label: 重置
200
200
  delete_object:
201
201
  label: 删除
202
+ custom:
203
+ label: 自定义
202
204
  CustomLabels:
203
205
  objects_field_datasource_defaultValue: 默认数据源
204
206
  objects_field_datasource_meteor: Meteor
@@ -209,4 +211,6 @@ CustomLabels:
209
211
  objects_actions_delete_object_dialog_title_prefix: "删除对象:"
210
212
  objects_actions_delete_object_dialog_content: "<div>\n<div style=\"text-align: left;\">删除一个自定义对象进行以下操作:</div>\n<ul>\n<li style=\"text-align: left;\">删除对象的字段和按钮</li>\n<li style=\"text-align: left;\">删除对象的选项卡和列表视图</li>\n<li style=\"text-align: left;\">删除对象的页面布局</li>\n<li style=\"text-align: left;\">删除对象的权限</li>\n<li style=\"text-align: left;\">删除对象的验证规则</li>\n<li style=\"text-align: left;\">删除对象的限制规则</li>\n<li style=\"text-align: left;\">删除对象的共享规则</li>\n<li style=\"text-align: left;\">删除使用该对象的流程映射</li>\n<li style=\"text-align: left;\">删除使用该对象的开放流程</li>\n<li style=\"text-align: left;\">删除使用该对象的页面</li>\n</ul>\n</div>"
211
213
  objects_actions_reset_dialog_title_prefix: "重置对象: "
212
- objects_actions_reset_dialog_content: "<div>\n<div style=\"text-align: left;\">重置一个自定义对象进行以下操作:</div>\n<ul>\n<li style=\"text-align: left;\">删除自定义的对象</li>\n<li style=\"text-align: left;\">删除自定义对象的字段</li>\n</ul>\n</div>"
214
+ objects_actions_reset_dialog_content: "<div>\n<div style=\"text-align: left;\">重置一个自定义对象进行以下操作:</div>\n<ul>\n<li style=\"text-align: left;\">删除自定义的对象</li>\n<li style=\"text-align: left;\">删除自定义对象的字段</li>\n</ul>\n</div>"
215
+ objects_actions_custom_success: 对象已自定义。
216
+ objects_actions_custom_failed: 自定义失败
@@ -18,3 +18,12 @@ fields:
18
18
  label: Settings
19
19
  help:
20
20
  description:
21
+ is_public:
22
+ label: Public
23
+ help: Accessible at the front end
24
+ description:
25
+ listviews:
26
+ all:
27
+ label: All
28
+ recent:
29
+ label: Recent
@@ -18,3 +18,12 @@ fields:
18
18
  label: 设置
19
19
  help:
20
20
  description:
21
+ is_public:
22
+ label: 前端可访问
23
+ help: 在前端可访问
24
+ description:
25
+ listviews:
26
+ all:
27
+ label: 全部
28
+ recent:
29
+ label: 最近查看
@@ -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: 注销成功
@@ -9,7 +9,7 @@ amis_schema: |-
9
9
  "type": "service",
10
10
  "body": [
11
11
  {
12
- "label": "复制API Key",
12
+ "label": "${'CustomAction.api_keys.copy' | t}",
13
13
  "type": "button",
14
14
  "actionType": "copy",
15
15
  "content": "${api_key}"
@@ -1,20 +1,20 @@
1
1
  /*
2
2
  * @Author: baozhoutao@steedos.com
3
3
  * @Date: 2024-03-30 11:37:53
4
- * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2024-04-15 10:43:38
4
+ * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
5
+ * @LastEditTime: 2025-09-01 20:52:46
6
6
  * @Description:
7
7
  */
8
8
  module.exports = {
9
9
  disable: function (object_name, record_id, record_permissions, data) {
10
10
  Steedos.sobject(object_name).retrieve(record_id).then((record)=>{
11
11
  if(!record){
12
- return SteedosUI.notification.error({message: '未找到应用'})
12
+ return SteedosUI.notification.error({message: t('apps_not_found')})
13
13
  }
14
14
  SteedosUI.Modal.confirm({
15
- title: '停用',
16
- content: `确定要停用「${record.name}」应用?`,
17
- okText: '停用',
15
+ title: t('apps_actions_disable_dialog_title'),
16
+ content: `${t('apps_actions_disable_dialog_content_prefix')}${record.name}${t('apps_actions_disable_dialog_content_suffix')}`,
17
+ okText: t('CustomAction.apps.disable'),
18
18
  cancelText: t('Cancel'),
19
19
  onOk: function(){
20
20
  Steedos.authRequest(Steedos.absoluteUrl(`/api/v1/apps/${record_id}`), {type: 'put', async: false, data: JSON.stringify({
@@ -1,20 +1,20 @@
1
1
  /*
2
2
  * @Author: baozhoutao@steedos.com
3
3
  * @Date: 2024-03-30 11:37:53
4
- * @LastEditors: baozhoutao@steedos.com
5
- * @LastEditTime: 2024-04-15 10:43:45
4
+ * @LastEditors: 殷亮辉 yinlianghui@hotoa.com
5
+ * @LastEditTime: 2025-09-01 20:52:51
6
6
  * @Description:
7
7
  */
8
8
  module.exports = {
9
9
  enable: function (object_name, record_id) {
10
10
  Steedos.sobject(object_name).retrieve(record_id).then((record)=>{
11
11
  if(!record){
12
- return SteedosUI.notification.error({message: '未找到应用'})
12
+ return SteedosUI.notification.error({message: t('apps_not_found')})
13
13
  }
14
14
  SteedosUI.Modal.confirm({
15
- title: '启用',
16
- content: `确定要启用「${record.name}」应用?`,
17
- okText: '启用',
15
+ title: t('apps_actions_enable_dialog_title'),
16
+ content: `${t('apps_actions_enable_dialog_content_prefix')}${record.name}${t('apps_actions_enable_dialog_content_suffix')}`,
17
+ okText: t('CustomAction.apps.enable'),
18
18
  cancelText: t('Cancel'),
19
19
  onOk: function(){
20
20
  Steedos.authRequest(Steedos.absoluteUrl(`/api/v1/apps/${record_id}`), {type: 'put', async: false, data: JSON.stringify({
@@ -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
  },
@@ -5,10 +5,10 @@ amis_schema: |-
5
5
  "body": [
6
6
  {
7
7
  "type": "button",
8
- "label": "更新组织",
8
+ "label": "${'CustomAction.company.updateOrgs' | t}",
9
9
  "id": "u:updateOrgs",
10
10
  "editorState": "default",
11
- "confirmText": "更新「${record.name}」组织信息?",
11
+ "confirmText": "${'CustomLabels.company_actions_updateOrgs_confirmText_prefix' | t}${name}${'CustomLabels.company_actions_updateOrgs_confirmText_suffix' | t}",
12
12
  "onEvent": {
13
13
  "click": {
14
14
  "weight": 0,
@@ -23,10 +23,7 @@ amis_schema: |-
23
23
  "method": "post",
24
24
  "requestAdaptor": "api.data = {\n companyId: context.recordId\n}\nreturn api;",
25
25
  "adaptor": "",
26
- "messages": {
27
- "success": "更新组织信息成功",
28
- "failed": "更新组织信息失败"
29
- },
26
+ "adaptor": "return payload.updatedOrgs ? {data: {...payload}, status: 0, msg: t('CustomLabels.company_actions_updateOrgs_success')} : {...payload, status: 1, msg: t('CustomLabels.company_actions_updateOrgs_failed')};",
30
27
  "dataType": "json"
31
28
  }
32
29
  }
@@ -1,6 +1,6 @@
1
1
  name: is_system
2
2
  type: boolean
3
- label: 系统
3
+ label: System
4
4
  readonly: true
5
5
  visible_on: '{{global.mode ===''read'' ? true : false}}'
6
6
  disabled: true
@@ -32,11 +32,7 @@ amis_schema: |-
32
32
  "method": "post",
33
33
  "sendOn": "docForCustomize",
34
34
  "requestAdaptor": "var doc = context.docForCustomize;\ndoc.is_customize = true;\ndoc.is_enable = true;\ndoc.in_development = \"0\";\n// delete doc.is_system;\ndelete doc.record_permissions;\ndelete doc.NAME_FIELD_KEY;\ndelete doc.idFieldName;\ndelete doc.idFieldNames;\ndelete doc.table_name;\ndelete doc.originalFields;\ndelete doc.extend;\ndelete doc.listeners;\ndelete doc.responseData;\ndelete doc.responseNsg;\ndelete doc.responseStatus;\ndelete doc.__filename;\ndelete doc.__timestamp;\nvar data = {\n query: `mutation{objects__upsert(id: \"${doc.name}\", doc: ${JSON.stringify(JSON.stringify(doc))}){_id,name}}`\n};\nreturn {\n ...api,\n data\n};",
35
- "adaptor": "",
36
- "messages": {
37
- "success": "对象已自定义。",
38
- "failed": "${msg}"
39
- }
35
+ "adaptor": "return payload.data.objects__upsert ? {...payload, status: 0, msg: t('CustomLabels.objects_actions_custom_success')} : {...payload, status: 1, msg: t('CustomLabels.objects_actions_custom_failed')};"
40
36
  }
41
37
  },
42
38
  {
@@ -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.93",
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.93",
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": "676b116f1701dcdba8a665c4e7930f43242dd22f"
21
21
  }