diff --git a/bff-sdk/sdk.ts b/bff-sdk/sdk.ts index 725cb33..cce9ef7 100644 --- a/bff-sdk/sdk.ts +++ b/bff-sdk/sdk.ts @@ -171,6 +171,8 @@ export type Network = { federation?: Maybe; /** 网络发起者(组织) */ initiator?: Maybe; + /** 更新时间 */ + lastHeartbeatTime?: Maybe; /** name */ name: Scalars['ID']; /** 引擎类型 */ @@ -362,7 +364,7 @@ export type QueryProposalsArgs = { /** IBPCR 状态 */ export enum StatusType { - /** Created is the status when component is created successfully */ + /** 正常 */ Created = 'Created', /** Deployed is the status when the component's deployment is done successfully */ Deployed = 'Deployed', @@ -380,7 +382,7 @@ export enum StatusType { FederationPending = 'FederationPending', /** Initializing is the status when a component is initializing */ Initializing = 'Initializing', - /** 运行中 */ + /** 正常 */ NetworkCreated = 'NetworkCreated', /** 已解散 */ NetworkDissolved = 'NetworkDissolved', @@ -449,6 +451,8 @@ export enum VotePhase { Created = 'Created', /** The proposal has been finished. */ Finished = 'Finished', + /** 未投票 */ + NotVoted = 'NotVoted', /** The organization administrator has vote for the proposal. */ Voted = 'Voted', } @@ -606,6 +610,7 @@ export type GetNetworksQuery = { __typename?: 'Network'; name: string; creationTimestamp?: string | null; + lastHeartbeatTime?: string | null; expiredTime?: string | null; federation?: string | null; clusterSize?: number | null; @@ -634,6 +639,7 @@ export type GetNetworkQuery = { __typename?: 'Network'; name: string; creationTimestamp?: string | null; + lastHeartbeatTime?: string | null; expiredTime?: string | null; federation?: string | null; clusterSize?: number | null; @@ -662,6 +668,7 @@ export type CreateNetworkMutation = { __typename?: 'Network'; name: string; creationTimestamp?: string | null; + lastHeartbeatTime?: string | null; expiredTime?: string | null; federation?: string | null; clusterSize?: number | null; @@ -977,6 +984,7 @@ export const GetNetworksDocument = gql` networks { name creationTimestamp + lastHeartbeatTime expiredTime federation clusterSize @@ -998,6 +1006,7 @@ export const GetNetworkDocument = gql` network(name: $name) { name creationTimestamp + lastHeartbeatTime expiredTime federation clusterSize @@ -1019,6 +1028,7 @@ export const CreateNetworkDocument = gql` networkCreate(network: $network) { name creationTimestamp + lastHeartbeatTime expiredTime federation clusterSize diff --git a/config/config.local.ts b/config/config.local.ts index 4d4eba3..3f37944 100644 --- a/config/config.local.ts +++ b/config/config.local.ts @@ -15,12 +15,12 @@ import { defineConfig } from '@umijs/max'; export default defineConfig({ proxy: { '/bff': { - target: 'https://bc.172.22.50.142.nip.io', + target: 'https://bc.172.22.96.209.nip.io', changeOrigin: true, secure: false, }, '/token': { - target: 'https://bc.172.22.50.142.nip.io', + target: 'https://bc.172.22.96.209.nip.io', changeOrigin: true, secure: false, }, diff --git a/package.json b/package.json index 49fad56..ef96a0c 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "@formily/core": "^2.1.4", "@formily/react": "^2.1.4", "@tenx-ui/icon": "^2.4.13", - "@tenx-ui/materials": "1.0.13", + "@tenx-ui/materials": "1.0.14", "@tenx-ui/utils": "^2.2.1", "@umijs/max": "^4.0.42", "antd": "^5.1.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 333c766..761e32f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,7 +13,7 @@ specifiers: '@formily/core': ^2.1.4 '@formily/react': ^2.1.4 '@tenx-ui/icon': ^2.4.13 - '@tenx-ui/materials': 1.0.13 + '@tenx-ui/materials': 1.0.14 '@tenx-ui/utils': ^2.2.1 '@testing-library/jest-dom': ^5.16.4 '@testing-library/react': ^13 @@ -72,7 +72,7 @@ dependencies: '@formily/core': 2.2.16 '@formily/react': 2.2.16_imsf4monu2ro3jsq722crax7fe '@tenx-ui/icon': 2.4.13_4wymetwju2f67kkws2jsebarle - '@tenx-ui/materials': 1.0.13_4wymetwju2f67kkws2jsebarle + '@tenx-ui/materials': 1.0.14_4wymetwju2f67kkws2jsebarle '@tenx-ui/utils': 2.2.1_v2m5e27vhdewzwhryxwfaorcca '@umijs/max': 4.0.44_zknumggqfl744whfmgwwnhtdda antd: 5.1.4_biqbaboplfbrettd7655fr4n2y @@ -3722,8 +3722,8 @@ packages: react-dom: 18.2.0_react@18.2.0 dev: false - /@tenx-ui/materials/1.0.13_4wymetwju2f67kkws2jsebarle: - resolution: {integrity: sha512-NWpaaU4orqhGpn1FcuTr/mCiIUivpTyXsF6ga0KjbuJLIQKIh+WKYbZiU/K+3vo46G75s7YwOYSOEJ83INXLPw==} + /@tenx-ui/materials/1.0.14_4wymetwju2f67kkws2jsebarle: + resolution: {integrity: sha512-48OFUUdmTbH4fhlFhyoaqXRySPXA3ry88i+wPVZ7UHoR6HQWTUQU4j5gVXC8lWNAiMAKeSgRo9Ry+2T/0hrr7w==} dependencies: '@tenx-ui/icon': 2.4.13_4wymetwju2f67kkws2jsebarle '@tenx-ui/utils': 2.2.1_v2m5e27vhdewzwhryxwfaorcca diff --git a/src/i18n.js b/src/i18n.js index a2bc5d9..d968364 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -6,9 +6,10 @@ const i18nConfig = { "i18n-0it28c04tx6": "Select a consensus algorithm", "i18n-0l8kit6a2d3": "My channel/Total channel", "i18n-0tsputxj615": "New administrator", + "i18n-0u5pwt0jtl4": + "The channel name contains 3 to 50 letters, digits, and underscores (_)", "i18n-1247x9lxlbkg": "Please enter description", "i18n-18ncsld69pu": "Organization number", - "i18n-1d5ai7x8ukw": "Warning", "i18n-1d5bt7sz4jb": "FederationPending", "i18n-1g6cw1w1uv4": "Real-name authentication", "i18n-1vangoko4yf": "Created", @@ -34,6 +35,8 @@ const i18nConfig = { "i18n-4m04opydvf9": "My node/total node", "i18n-4t70z9gdf8u": "View details", "i18n-54sfaqivd5i": "Organization management", + "i18n-5eitggraalr": + "The channel description consists of 0 to 200 characters", "i18n-5er0ayqzcp": "Last update time", "i18n-5jwxi1nlnsm": "I created", "i18n-5xl7aihzcuy": "total", @@ -47,7 +50,6 @@ const i18nConfig = { "i18n-6ojbq0y628y": "Expired", "i18n-6sh24mree": "Succeeded", "i18n-71sxvlf0d98": "refresh", - "i18n-7co6jrkxoa": "Initializing", "i18n-7s50z0jhy96": "cause", "i18n-85kkwp67i5u": "Channel creation failure", "i18n-8vybx9itd3n": "federation members", @@ -78,11 +80,15 @@ const i18nConfig = { "i18n-bko8c4ii1ad": "Please select a member", "i18n-bm3i5ksesut": "Version selection", "i18n-bpso2h286ae": "Please enter a display name", + "i18n-brvipauy4t4": + "The organization description consists of 0 to 200 characters", "i18n-bvuyqd393pj": "Enter the organization name or creator search", "i18n-c0d66z03kpk": "join time", "i18n-c3oheknv0lu": "The network will disband after the proposal is approved, whether to continue", "i18n-cbe4xaexa7q": "more", + "i18n-ch5wgxkhdhs": + "The user name contains 3 to 20 letters, digits, and underscores", "i18n-cj4k368h6p9": "Voting", "i18n-cj9hvn1xox5": "Please enter node configuration", "i18n-cprrxhrkty": "Configuration member", @@ -90,6 +96,8 @@ const i18nConfig = { "i18n-d3zo18q4hrn": "Proposed name", "i18n-d4bbvp00v5t": "New federation success", "i18n-d6xpwgoamdo": "Please enter an organization name", + "i18n-de6rhkx2m7v": + "The display name consists of 0 ~ 20 Chinese and English numbers", "i18n-dlxiuotq6z4": "affiliate", "i18n-dr1hx3bw3v": "The organization name must start with a letter and contain no more than 12 digits and letters. Only web start-ups can create multiple organizations", @@ -106,7 +114,6 @@ const i18nConfig = { "i18n-fifkprltibf": "Normal", "i18n-fpx7c35bovp": "Please select a proposed voting strategy", "i18n-fvcps4edx44": "name", - "i18n-fx1ig20n6wh": "Deploying", "i18n-g2ktwfqaf0g": "duration", "i18n-g8rbmvh04cd": "Proposal strategy", "i18n-gagifmv2uun": "Successful dissolution of federation", @@ -124,7 +131,6 @@ const i18nConfig = { "The administrator permission is transferred successfully. Procedure", "i18n-hlh9eenb9wn": "Disband network", "i18n-hpj9pfyfpq": "Network details", - "i18n-hruojjr57f": "NetworkCreated", "i18n-i69exda650e": "create federation", "i18n-i7slyi98o4e": "DissolveFederationProposal", "i18n-i94pxfwl0cb": "Failed", @@ -132,6 +138,8 @@ const i18nConfig = { "i18n-ibaeqidf0n": "Error", "i18n-ienrgm2j5p9": "Please enter a channel name", "i18n-ihfepbwjnv": "Name of the invited member/organization", + "i18n-iiub6ybv6ms": + "The organization name contains 3 to 10 uppercase and lowercase letters, digits, and underscores", "i18n-iku70tej4ja": "The last time a node was added", "i18n-inwcelhiing": "admin", "i18n-irf019z3fd": "Configuring the user Type", @@ -149,6 +157,7 @@ const i18nConfig = { "i18n-ks9tefvs1g": "Details of proposal", "i18n-kwbu3vyst6": "create network", "i18n-l0it3k61ec": "CreateFederationProposal", + "i18n-l0t1y311yy": "The cause description consists of 0 to 200 characters", "i18n-l8fybssesij": "Succeeded in creating a channel", "i18n-l8xumyvnlya": "cancel", "i18n-ldhfyodm92n": "Have voted", @@ -165,9 +174,10 @@ const i18nConfig = { "i18n-n5ny2k3khy": "New user", "i18n-n7pr8w2kqpn": "disagree", "i18n-nbke0i5upzc": "The recommended format is xxxOrg", + "i18n-neccml35hvq": + "It consists of uppercase and lowercase letters, numbers, and hyphens. The beginning and end can only be a letter or number", "i18n-nezb9wehqyh": "Select the initiator", "i18n-nfnc1vxid1": "Current state", - "i18n-nidprik2g7d": "NetworkDissolved", "i18n-nijfmnd2nf": "initiator", "i18n-nkfizmvwbzo": "Affiliated organization", "i18n-nm17suv2xhh": "Delete a user from", @@ -219,11 +229,14 @@ const i18nConfig = { "i18n-wbcc2febor": "all organization", "i18n-wctt13ld2x": "initiator", "i18n-wlgvrke3jz9": "introduce", + "i18n-wprl86g5wy": "The value contains 3 to 20 characters", "i18n-x26twb9oy0l": "Succeeded in adding a user", "i18n-xb2o10tue1m": "network", "i18n-xgyxfdl8q": "Consensus component", "i18n-xinrdc2qk1f": "Network member", "i18n-xlmv8ef2bsq": " Know the details>>", + "i18n-xr251ak8b2": + "The association description consists of 0 to 200 characters", "i18n-xtno2l9qqog": "Error", "i18n-y0o0zplhhom": "Network information", "i18n-y29rf6lwd8q": "Organization creation failure", @@ -233,7 +246,6 @@ const i18nConfig = { "i18n-z04apojz8aj": "After the union is dissolved, you still need to manually delete internal resources", "i18n-z0me61yhdpc": "Update vote failed", - "i18n-ze225i4koum": "Precreated", "i18n-zjmh7vtphh": "Node configuration", "i18n-zrowlr7zwx": "NetworkCreated", "i18n-zzu9mo73zo": "Description Failed to transfer administrator rights", @@ -245,12 +257,12 @@ const i18nConfig = { "i18n-0it28c04tx6": "请选择共识算法", "i18n-0l8kit6a2d3": "我的通道/总通道", "i18n-0tsputxj615": "新的管理员用户", + "i18n-0u5pwt0jtl4": "通道名称由 3 ~ 50 个大小写字母, 数字, 下划线组成", "i18n-1247x9lxlbkg": "请输入组织描述", "i18n-18ncsld69pu": "组织数", - "i18n-1d5ai7x8ukw": "Warning", "i18n-1d5bt7sz4jb": "组建中", "i18n-1g6cw1w1uv4": "实名认证", - "i18n-1vangoko4yf": "Created", + "i18n-1vangoko4yf": "正常", "i18n-1x4p2xt91ss": "创建组织成功", "i18n-21s244w63fc": "请输入原因", "i18n-21z9nbkoohk": "成员限制", @@ -272,6 +284,7 @@ const i18nConfig = { "i18n-4m04opydvf9": "我的节点/总节点", "i18n-4t70z9gdf8u": "查看详情", "i18n-54sfaqivd5i": "组织管理", + "i18n-5eitggraalr": "通道描述由 0 ~ 200 字符组成", "i18n-5er0ayqzcp": "最近更新时间", "i18n-5jwxi1nlnsm": "我创建的", "i18n-5xl7aihzcuy": "共计", @@ -285,7 +298,6 @@ const i18nConfig = { "i18n-6ojbq0y628y": "提议超时", "i18n-6sh24mree": "提议成功", "i18n-71sxvlf0d98": "刷新", - "i18n-7co6jrkxoa": "Initializing", "i18n-7s50z0jhy96": "原因", "i18n-85kkwp67i5u": "新建通道失败", "i18n-8vybx9itd3n": "联盟成员", @@ -315,10 +327,12 @@ const i18nConfig = { "i18n-bko8c4ii1ad": "请选择成员", "i18n-bm3i5ksesut": "版本选择", "i18n-bpso2h286ae": "请输入展示名", + "i18n-brvipauy4t4": "组织描述由 0 ~ 200 字符组成", "i18n-bvuyqd393pj": "输入组织名称或创建人搜索", "i18n-c0d66z03kpk": "加入时间", "i18n-c3oheknv0lu": "网络将在提议通过后解散,是否继续", "i18n-cbe4xaexa7q": "更多", + "i18n-ch5wgxkhdhs": "用户名称由 3 ~ 20 个大小写字母, 数字, 下划线组成", "i18n-cj4k368h6p9": "投票中", "i18n-cj9hvn1xox5": "请输入节点配置", "i18n-cprrxhrkty": "配置成员", @@ -326,6 +340,7 @@ const i18nConfig = { "i18n-d3zo18q4hrn": "提议名称", "i18n-d4bbvp00v5t": "新建联盟成功", "i18n-d6xpwgoamdo": "请输入组织名称", + "i18n-de6rhkx2m7v": "展示名由 0 ~ 20 个中英文、数字组成", "i18n-dlxiuotq6z4": "所属联盟", "i18n-dr1hx3bw3v": "组织名称须以字母开头,12 位以内数字和字母组成。只有网络初创者可以新建多个组织", @@ -342,7 +357,6 @@ const i18nConfig = { "i18n-fifkprltibf": "正常", "i18n-fpx7c35bovp": "请选择提议投票策略", "i18n-fvcps4edx44": "联盟名称", - "i18n-fx1ig20n6wh": "Deploying", "i18n-g2ktwfqaf0g": "时长", "i18n-g8rbmvh04cd": "提议策略", "i18n-gagifmv2uun": "解散联盟成功", @@ -358,7 +372,6 @@ const i18nConfig = { "i18n-hjonznxjara": "转移管理员权限成功", "i18n-hlh9eenb9wn": "解散网络", "i18n-hpj9pfyfpq": "网络详情", - "i18n-hruojjr57f": "NetworkCreated", "i18n-i69exda650e": "新建联盟", "i18n-i7slyi98o4e": "解散联盟", "i18n-i94pxfwl0cb": "提议失败", @@ -366,6 +379,7 @@ const i18nConfig = { "i18n-ibaeqidf0n": "提议异常", "i18n-ienrgm2j5p9": "请输入通道名称", "i18n-ihfepbwjnv": "被邀请的成员/组织名称", + "i18n-iiub6ybv6ms": "组织名称由 3 ~ 10 个大小写字母, 数字, 下划线组成", "i18n-iku70tej4ja": "节点最近加入时间", "i18n-inwcelhiing": "管理员Admin", "i18n-irf019z3fd": "配置用户类型", @@ -383,6 +397,7 @@ const i18nConfig = { "i18n-ks9tefvs1g": "提议详情", "i18n-kwbu3vyst6": "新建网络", "i18n-l0it3k61ec": "创建联盟", + "i18n-l0t1y311yy": "原因描述由 0 ~ 200 字符组成", "i18n-l8fybssesij": "新建通道成功", "i18n-l8xumyvnlya": "取消", "i18n-ldhfyodm92n": "已投票", @@ -399,9 +414,10 @@ const i18nConfig = { "i18n-n5ny2k3khy": "新增用户", "i18n-n7pr8w2kqpn": "不同意", "i18n-nbke0i5upzc": "组织名称,建议格式 xxxOrg", + "i18n-neccml35hvq": + "大小写字母, 数字, 中划线组成,开头和结尾只能是字母或数字", "i18n-nezb9wehqyh": "请选择发起者", "i18n-nfnc1vxid1": "当前状态", - "i18n-nidprik2g7d": "NetworkDissolved", "i18n-nijfmnd2nf": "发起人", "i18n-nkfizmvwbzo": "所属组织", "i18n-nm17suv2xhh": "中删除用户", @@ -452,11 +468,13 @@ const i18nConfig = { "i18n-wbcc2febor": "全部组织", "i18n-wctt13ld2x": "发起者", "i18n-wlgvrke3jz9": "介绍", + "i18n-wprl86g5wy": "字符长度为 3 ~ 20", "i18n-x26twb9oy0l": "新增用户成功", "i18n-xb2o10tue1m": "网络", "i18n-xgyxfdl8q": "共识组件", "i18n-xinrdc2qk1f": "网络成员", "i18n-xlmv8ef2bsq": " 了解详情>>", + "i18n-xr251ak8b2": "联盟描述由 0 ~ 200 字符组成", "i18n-xtno2l9qqog": "异常", "i18n-y0o0zplhhom": "网络信息", "i18n-y29rf6lwd8q": "创建组织失败", @@ -465,9 +483,8 @@ const i18nConfig = { "i18n-yyexdt18ora": "创建人", "i18n-z04apojz8aj": "解散联盟后,内部资源仍需要手动删除", "i18n-z0me61yhdpc": "更新投票失败", - "i18n-ze225i4koum": "Precreated", "i18n-zjmh7vtphh": "节点配置", - "i18n-zrowlr7zwx": "运行中", + "i18n-zrowlr7zwx": "正常", "i18n-zzu9mo73zo": "转移管理员权限失败", }, }; diff --git a/src/pages/Federation/index.jsx b/src/pages/Federation/index.jsx index 1d0e81b..05b5ee0 100644 --- a/src/pages/Federation/index.jsx +++ b/src/pages/Federation/index.jsx @@ -386,12 +386,21 @@ class Federation$$Page extends React.Component { }), "x-validator": [ { - message: "字符长度为 3 ~ 20", + message: this._i18nText({ + "en-US": "The value contains 3 to 20 characters", + key: "i18n-wprl86g5wy", + "zh-CN": "字符长度为 3 ~ 20", + }), pattern: "^[a-zA-Z0-9-\\u4e00-\\u9fa5]{3,20}$", }, { - message: - "大小写字母, 数字, 中划线组成,开头和结尾只能是字母或数字", + message: this._i18nText({ + "en-US": + "It consists of uppercase and lowercase letters, numbers, and hyphens. The beginning and end can only be a letter or number", + key: "i18n-neccml35hvq", + "zh-CN": + "大小写字母, 数字, 中划线组成,开头和结尾只能是字母或数字", + }), pattern: "^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?(\\.[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?)*$", }, @@ -568,7 +577,12 @@ class Federation$$Page extends React.Component { "x-component": "Input.TextArea", "x-validator": [ { - message: "联盟描述由 0 ~ 200 字符组成", + message: this._i18nText({ + "en-US": + "The association description consists of 0 to 200 characters", + key: "i18n-xr251ak8b2", + "zh-CN": "联盟描述由 0 ~ 200 字符组成", + }), pattern: "^.{0,200}$", }, ], @@ -1141,6 +1155,16 @@ class Federation$$Page extends React.Component { id: "FederationDissolved", type: "error", }, + { + children: this._i18nText({ + "en-US": "Error", + key: "i18n-xtno2l9qqog", + "zh-CN": "异常", + }), + icon: "CloseCircleFilled", + id: "Error", + type: "error", + }, ]} /> ))( diff --git a/src/pages/Network/index.jsx b/src/pages/Network/index.jsx index 50b8cb0..40ceb23 100644 --- a/src/pages/Network/index.jsx +++ b/src/pages/Network/index.jsx @@ -229,6 +229,7 @@ class Network$$Page extends React.Component { {this._i18nText({ "en-US": "network", key: "i18n-xb2o10tue1m", + use: "zh-CN", "zh-CN": "网络", })} @@ -274,6 +275,7 @@ class Network$$Page extends React.Component { {this._i18nText({ "en-US": "create network", key: "i18n-kwbu3vyst6", + use: "zh-CN", "zh-CN": "新建网络", })} @@ -347,6 +349,7 @@ class Network$$Page extends React.Component { placeholder={this._i18nText({ "en-US": "Please enter a name search", key: "i18n-94e6orcx5ms", + use: "zh-CN", "zh-CN": "请输入名称搜索", })} /> @@ -392,6 +395,7 @@ class Network$$Page extends React.Component { {this._i18nText({ "en-US": "refresh", key: "i18n-71sxvlf0d98", + use: "zh-CN", "zh-CN": "刷新", })} @@ -481,6 +485,7 @@ class Network$$Page extends React.Component { label: this._i18nText({ "en-US": "View details", key: "i18n-4t70z9gdf8u", + use: "zh-CN", "zh-CN": "查看详情", }), }, @@ -489,6 +494,7 @@ class Network$$Page extends React.Component { label: this._i18nText({ "en-US": "Disband network", key: "i18n-hlh9eenb9wn", + use: "zh-CN", "zh-CN": "解散网络", }), }, @@ -528,6 +534,7 @@ class Network$$Page extends React.Component { {this._i18nText({ "en-US": "more", key: "i18n-2b4dhrz51wu", + use: "zh-CN", "zh-CN": "更多", })} , @@ -606,6 +613,7 @@ class Network$$Page extends React.Component { {this._i18nText({ "en-US": "My node/total node", key: "i18n-4m04opydvf9", + use: "zh-CN", "zh-CN": "我的节点/总节点", })} @@ -662,6 +670,7 @@ class Network$$Page extends React.Component { {this._i18nText({ "en-US": "My channel/Total channel", key: "i18n-0l8kit6a2d3", + use: "zh-CN", "zh-CN": "我的通道/总通道", })} @@ -716,6 +725,7 @@ class Network$$Page extends React.Component { {this._i18nText({ "en-US": "Organization number", key: "i18n-18ncsld69pu", + use: "zh-CN", "zh-CN": "组织数", })} @@ -764,6 +774,7 @@ class Network$$Page extends React.Component { label: this._i18nText({ "en-US": "Network ID", key: "i18n-vxubih1pqa", + use: "zh-CN", "zh-CN": "网络 ID", }), span: 1, @@ -774,6 +785,7 @@ class Network$$Page extends React.Component { label: this._i18nText({ "en-US": "affiliate", key: "i18n-dlxiuotq6z4", + use: "zh-CN", "zh-CN": "所属联盟", }), span: 1, @@ -812,6 +824,7 @@ class Network$$Page extends React.Component { {this._i18nText({ "en-US": "expire", key: "i18n-9v1fm4itv3m", + use: "zh-CN", "zh-CN": "过期", })} @@ -822,6 +835,7 @@ class Network$$Page extends React.Component { label: this._i18nText({ "en-US": "Maturity time", key: "i18n-pra1gymtjol", + use: "zh-CN", "zh-CN": "到期时间", }), span: 1, @@ -862,6 +876,7 @@ class Network$$Page extends React.Component { children: this._i18nText({ "en-US": "NetworkCreated", key: "i18n-zrowlr7zwx", + use: "zh-CN", "zh-CN": "运行中", }), icon: "CheckCircleFilled", @@ -872,6 +887,7 @@ class Network$$Page extends React.Component { children: this._i18nText({ "en-US": "NetworkDissolved", key: "i18n-j3czm9su41", + use: "zh-CN", "zh-CN": "已解散", }), icon: "CloseCircleFilled", @@ -882,12 +898,24 @@ class Network$$Page extends React.Component { children: this._i18nText({ "en-US": "Error", key: "i18n-xtno2l9qqog", + use: "zh-CN", "zh-CN": "异常", }), icon: "CloseCircleFilled", id: "Error", type: "error", }, + { + children: this._i18nText({ + "en-US": "Created", + key: "i18n-1vangoko4yf", + use: "zh-CN", + "zh-CN": "正常", + }), + icon: "CheckCircleFilled", + id: "Created", + type: "success", + }, ]} /> @@ -900,6 +928,7 @@ class Network$$Page extends React.Component { label={this._i18nText({ "en-US": "Network ID", key: "i18n-vxubih1pqa", + use: "zh-CN", "zh-CN": "网络 ID", })} span={1} @@ -912,6 +941,7 @@ class Network$$Page extends React.Component { label={this._i18nText({ "en-US": "affiliate", key: "i18n-dlxiuotq6z4", + use: "zh-CN", "zh-CN": "所属联盟", })} span={1} @@ -924,6 +954,7 @@ class Network$$Page extends React.Component { label={this._i18nText({ "en-US": "Maturity time", key: "i18n-pra1gymtjol", + use: "zh-CN", "zh-CN": "到期时间", })} span={1} @@ -931,6 +962,7 @@ class Network$$Page extends React.Component { { @@ -1040,6 +1073,7 @@ class Network$$Page extends React.Component { title={this._i18nText({ "en-US": "Disband network", key: "i18n-hlh9eenb9wn", + use: "zh-CN", "zh-CN": "解散网络", })} > @@ -1050,6 +1084,7 @@ class Network$$Page extends React.Component { "en-US": "The network will disband after the proposal is approved, whether to continue", key: "i18n-c3oheknv0lu", + use: "zh-CN", "zh-CN": "网络将在提议通过后解散,是否继续", })} showIcon={true} diff --git a/src/pages/NetworkDetail/index.jsx b/src/pages/NetworkDetail/index.jsx index 1ec1dbb..b7007c9 100644 --- a/src/pages/NetworkDetail/index.jsx +++ b/src/pages/NetworkDetail/index.jsx @@ -259,6 +259,7 @@ class NetworkDetail$$Page extends React.Component { title={this._i18nText({ "en-US": "Network details", key: "i18n-hpj9pfyfpq", + use: "en-US", "zh-CN": "网络详情", })} type="simple" @@ -302,6 +303,7 @@ class NetworkDetail$$Page extends React.Component { label: this._i18nText({ "en-US": "creator", key: "i18n-yyexdt18ora", + use: "en-US", "zh-CN": "创建人", }), span: 1, @@ -326,6 +328,7 @@ class NetworkDetail$$Page extends React.Component { label: this._i18nText({ "en-US": "Number of members", key: "i18n-4btnh7pqt1m", + use: "en-US", "zh-CN": "成员个数", }), span: 1, @@ -347,6 +350,7 @@ class NetworkDetail$$Page extends React.Component { label: this._i18nText({ "en-US": "create time", key: "i18n-9ox4rx1wtwv", + use: "en-US", "zh-CN": "创建时间", }), span: 1, @@ -368,6 +372,7 @@ class NetworkDetail$$Page extends React.Component { label: this._i18nText({ "en-US": "Update time", key: "i18n-watjije0jk", + use: "en-US", "zh-CN": "更新时间", }), span: 1, @@ -382,6 +387,7 @@ class NetworkDetail$$Page extends React.Component { label: this._i18nText({ "en-US": "Version", key: "i18n-hbf63hki898", + use: "en-US", "zh-CN": "版本", }), span: 1, @@ -400,6 +406,7 @@ class NetworkDetail$$Page extends React.Component { label: this._i18nText({ "en-US": "Consensus algorithm", key: "i18n-twykcar3l6l", + use: "en-US", "zh-CN": "共识算法", }), span: 1, @@ -410,6 +417,7 @@ class NetworkDetail$$Page extends React.Component { label: this._i18nText({ "en-US": "Cluster size", key: "i18n-ax4swl3ryv7", + use: "en-US", "zh-CN": "集群大小", }), span: 1, @@ -420,6 +428,7 @@ class NetworkDetail$$Page extends React.Component { label: this._i18nText({ "en-US": "Node database", key: "i18n-kqc5q3s99wo", + use: "en-US", "zh-CN": "节点数据库", }), span: 1, @@ -436,6 +445,7 @@ class NetworkDetail$$Page extends React.Component { label={this._i18nText({ "en-US": "Consensus algorithm", key: "i18n-twykcar3l6l", + use: "en-US", "zh-CN": "共识算法", })} span={1} @@ -448,6 +458,7 @@ class NetworkDetail$$Page extends React.Component { label={this._i18nText({ "en-US": "Cluster size", key: "i18n-ax4swl3ryv7", + use: "en-US", "zh-CN": "集群大小", })} span={1} @@ -460,6 +471,7 @@ class NetworkDetail$$Page extends React.Component { label={this._i18nText({ "en-US": "Node database", key: "i18n-kqc5q3s99wo", + use: "en-US", "zh-CN": "节点数据库", })} span={1} @@ -472,6 +484,7 @@ class NetworkDetail$$Page extends React.Component { label: this._i18nText({ "en-US": "Consensus component", key: "i18n-xgyxfdl8q", + use: "en-US", "zh-CN": "共识组件", }), span: 1, @@ -490,6 +503,7 @@ class NetworkDetail$$Page extends React.Component { children: this._i18nText({ "en-US": "NetworkCreated", key: "i18n-zrowlr7zwx", + use: "en-US", "zh-CN": "运行中", }), icon: "CheckCircleFilled", @@ -500,6 +514,7 @@ class NetworkDetail$$Page extends React.Component { children: this._i18nText({ "en-US": "NetworkDissolved", key: "i18n-j3czm9su41", + use: "en-US", "zh-CN": "已解散", }), icon: "CloseCircleFilled", @@ -510,6 +525,7 @@ class NetworkDetail$$Page extends React.Component { children: this._i18nText({ "en-US": "Error", key: "i18n-xtno2l9qqog", + use: "en-US", "zh-CN": "异常", }), icon: "CloseCircleFilled", @@ -523,6 +539,7 @@ class NetworkDetail$$Page extends React.Component { label: this._i18nText({ "en-US": "status", key: "i18n-bik6xl952y6", + use: "en-US", "zh-CN": "状态", }), span: 1, @@ -541,6 +558,7 @@ class NetworkDetail$$Page extends React.Component { label={this._i18nText({ "en-US": "creator", key: "i18n-yyexdt18ora", + use: "en-US", "zh-CN": "创建人", })} span={1} @@ -558,6 +576,7 @@ class NetworkDetail$$Page extends React.Component { label={this._i18nText({ "en-US": "Number of members", key: "i18n-4btnh7pqt1m", + use: "en-US", "zh-CN": "成员个数", })} span={1} @@ -585,6 +604,7 @@ class NetworkDetail$$Page extends React.Component { label={this._i18nText({ "en-US": "create time", key: "i18n-9ox4rx1wtwv", + use: "en-US", "zh-CN": "创建时间", })} span={1} @@ -608,6 +628,7 @@ class NetworkDetail$$Page extends React.Component { label={this._i18nText({ "en-US": "Update time", key: "i18n-watjije0jk", + use: "en-US", "zh-CN": "更新时间", })} span={1} @@ -620,7 +641,7 @@ class NetworkDetail$$Page extends React.Component { time={__$$eval( () => this.props.useGetNetwork?.data?.network - ?.joinedAt + ?.lastHeartbeatTime )} /> } @@ -631,6 +652,7 @@ class NetworkDetail$$Page extends React.Component { label={this._i18nText({ "en-US": "Version", key: "i18n-hbf63hki898", + use: "en-US", "zh-CN": "版本", })} span={1} @@ -647,6 +669,7 @@ class NetworkDetail$$Page extends React.Component { label={this._i18nText({ "en-US": "Consensus component", key: "i18n-xgyxfdl8q", + use: "en-US", "zh-CN": "共识组件", })} span={1} @@ -659,21 +682,33 @@ class NetworkDetail$$Page extends React.Component { column={1} items={[ { - children: null, + children: __$$eval( + () => + this.props.useGetNetwork?.data?.network + ?.ordererType + ), key: "ufknvxft0u", label: this._i18nText({ "en-US": "Consensus algorithm", key: "i18n-twykcar3l6l", + use: "en-US", "zh-CN": "共识算法", }), span: 1, }, { - children: null, + _unsafe_MixedSetter_children_select: + "VariableSetter", + children: __$$eval( + () => + this.props.useGetNetwork?.data?.network + ?.clusterSize + ), key: "81dsq3cni9b", label: this._i18nText({ "en-US": "Cluster size", key: "i18n-ax4swl3ryv7", + use: "en-US", "zh-CN": "集群大小", }), span: 1, @@ -684,6 +719,7 @@ class NetworkDetail$$Page extends React.Component { label: this._i18nText({ "en-US": "Node database", key: "i18n-kqc5q3s99wo", + use: "en-US", "zh-CN": "节点数据库", }), span: 1, @@ -700,11 +736,16 @@ class NetworkDetail$$Page extends React.Component { label={this._i18nText({ "en-US": "Consensus algorithm", key: "i18n-twykcar3l6l", + use: "en-US", "zh-CN": "共识算法", })} span={1} > - {null} + {__$$eval( + () => + this.props.useGetNetwork?.data?.network + ?.ordererType + )} - {null} + {__$$eval( + () => + this.props.useGetNetwork?.data?.network + ?.clusterSize + )} } @@ -793,6 +855,7 @@ class NetworkDetail$$Page extends React.Component { label: this._i18nText({ "en-US": "Network information", key: "i18n-y0o0zplhhom", + use: "en-US", "zh-CN": "网络信息", }), }, @@ -864,6 +927,7 @@ class NetworkDetail$$Page extends React.Component { title: this._i18nText({ "en-US": "organization", key: "i18n-gmx7l7tolvj", + use: "en-US", "zh-CN": "成员组织", }), }, @@ -882,6 +946,7 @@ class NetworkDetail$$Page extends React.Component { {this._i18nText({ "en-US": "Real-name authentication", key: "i18n-1g6cw1w1uv4", + use: "en-US", "zh-CN": "实名认证", })} @@ -895,6 +960,7 @@ class NetworkDetail$$Page extends React.Component { title: this._i18nText({ "en-US": "infomation", key: "i18n-th9ag1qgsu", + use: "en-US", "zh-CN": "认证信息", }), }, @@ -904,6 +970,7 @@ class NetworkDetail$$Page extends React.Component { title: this._i18nText({ "en-US": "Number of added nodes", key: "i18n-rs16rywzo", + use: "en-US", "zh-CN": "加入节点个数", }), }, @@ -927,6 +994,7 @@ class NetworkDetail$$Page extends React.Component { title: this._i18nText({ "en-US": "The last time a node was added", key: "i18n-iku70tej4ja", + use: "en-US", "zh-CN": "节点最近加入时间", }), }, @@ -1001,6 +1069,7 @@ class NetworkDetail$$Page extends React.Component { label: this._i18nText({ "en-US": "Network member", key: "i18n-xinrdc2qk1f", + use: "en-US", "zh-CN": "网络成员", }), }, @@ -1060,6 +1129,7 @@ class NetworkDetail$$Page extends React.Component { {this._i18nText({ "en-US": "New channel", key: "i18n-snaon3b2fni", + use: "en-US", "zh-CN": "新建通道", })} @@ -1141,6 +1211,7 @@ class NetworkDetail$$Page extends React.Component { placeholder={this._i18nText({ "en-US": "Enter a channel name", key: "i18n-ajsvl5v284r", + use: "en-US", "zh-CN": "输入通道名称查询", })} /> @@ -1218,6 +1289,7 @@ class NetworkDetail$$Page extends React.Component { title: this._i18nText({ "en-US": "Channel name", key: "i18n-6oadzcxin7k", + use: "en-US", "zh-CN": "通道名称", }), }, @@ -1227,6 +1299,7 @@ class NetworkDetail$$Page extends React.Component { title: this._i18nText({ "en-US": "initiator", key: "i18n-wctt13ld2x", + use: "en-US", "zh-CN": "发起者", }), }, @@ -1254,6 +1327,7 @@ class NetworkDetail$$Page extends React.Component { title: this._i18nText({ "en-US": "Relevant proposal", key: "i18n-4idd49uxsod", + use: "en-US", "zh-CN": "相关提议", }), }, @@ -1263,6 +1337,7 @@ class NetworkDetail$$Page extends React.Component { title: this._i18nText({ "en-US": "Number of members", key: "i18n-4btnh7pqt1m", + use: "en-US", "zh-CN": "成员个数", }), }, @@ -1287,6 +1362,7 @@ class NetworkDetail$$Page extends React.Component { title: this._i18nText({ "en-US": "create time", key: "i18n-9ox4rx1wtwv", + use: "en-US", "zh-CN": "创建时间", }), }, @@ -1310,6 +1386,7 @@ class NetworkDetail$$Page extends React.Component { title: this._i18nText({ "en-US": "Number of nodes", key: "i18n-kh6e0jr0i7b", + use: "en-US", "zh-CN": "节点数量", }), }, @@ -1319,6 +1396,7 @@ class NetworkDetail$$Page extends React.Component { title: this._i18nText({ "en-US": "status", key: "i18n-bik6xl952y6", + use: "en-US", "zh-CN": "状态", }), }, @@ -1328,6 +1406,7 @@ class NetworkDetail$$Page extends React.Component { title: this._i18nText({ "en-US": "operation", key: "i18n-k5inn5jmnt9", + use: "en-US", "zh-CN": "操作", }), }, @@ -1483,6 +1562,7 @@ class NetworkDetail$$Page extends React.Component { title={this._i18nText({ "en-US": "New channel", key: "i18n-snaon3b2fni", + use: "en-US", "zh-CN": "新建通道", })} > @@ -1505,6 +1585,7 @@ class NetworkDetail$$Page extends React.Component { placeholder: this._i18nText({ "en-US": "Please enter a channel name", key: "i18n-ienrgm2j5p9", + use: "en-US", "zh-CN": "请输入通道名称", }), }, @@ -1515,11 +1596,19 @@ class NetworkDetail$$Page extends React.Component { title: this._i18nText({ "en-US": "Channel name", key: "i18n-6oadzcxin7k", + use: "en-US", "zh-CN": "通道名称", }), "x-validator": [ { - message: "通道名称由 3 ~ 50 个大小写字母, 数字, 下划线组成", + message: this._i18nText({ + "en-US": + "The channel name contains 3 to 50 letters, digits, and underscores (_)", + key: "i18n-0u5pwt0jtl4", + use: "en-US", + "zh-CN": + "通道名称由 3 ~ 50 个大小写字母, 数字, 下划线组成", + }), pattern: "^[a-zA-Z0-9_]{3,10}$", required: true, whitespace: true, @@ -1536,6 +1625,7 @@ class NetworkDetail$$Page extends React.Component { placeholder: this._i18nText({ "en-US": "Select the initiator", key: "i18n-nezb9wehqyh", + use: "en-US", "zh-CN": "请选择发起者", }), }, @@ -1546,6 +1636,7 @@ class NetworkDetail$$Page extends React.Component { title: this._i18nText({ "en-US": "Set initiator", key: "i18n-v6gmjbqnol", + use: "en-US", "zh-CN": "设置发起者", }), "x-validator": [], @@ -1560,6 +1651,7 @@ class NetworkDetail$$Page extends React.Component { placeholder: this._i18nText({ "en-US": "Please select a member", key: "i18n-bko8c4ii1ad", + use: "en-US", "zh-CN": "请选择成员", }), }, @@ -1570,6 +1662,7 @@ class NetworkDetail$$Page extends React.Component { title: this._i18nText({ "en-US": "Select member", key: "i18n-0bo5igd908x", + use: "en-US", "zh-CN": "选择成员", }), "x-validator": [], @@ -1582,6 +1675,7 @@ class NetworkDetail$$Page extends React.Component { placeholder: this._i18nText({ "en-US": "Please enter a discription", key: "i18n-rw0h41prk6", + use: "en-US", "zh-CN": "请输入描述", }), }, @@ -1593,13 +1687,20 @@ class NetworkDetail$$Page extends React.Component { title: this._i18nText({ "en-US": "Channel description", key: "i18n-k3l0vmchhq", + use: "en-US", "zh-CN": "通道描述", }), "x-component": "Input.TextArea", "x-validator": [ { - message: "组织描述由 0 ~ 200 字符组成", - pattern: "^[\\w]{0,200}$", + message: this._i18nText({ + "en-US": + "The channel description consists of 0 to 200 characters", + key: "i18n-5eitggraalr", + use: "en-US", + "zh-CN": "通道描述由 0 ~ 200 字符组成", + }), + pattern: "^.{0,200}$", }, ], }} diff --git a/src/pages/Organization/index.jsx b/src/pages/Organization/index.jsx index 545f97c..da6b9cd 100644 --- a/src/pages/Organization/index.jsx +++ b/src/pages/Organization/index.jsx @@ -834,7 +834,13 @@ class Organization$$Page extends React.Component { }), "x-validator": [ { - message: "组织名称由 3 ~ 10 个大小写字母, 数字, 下划线组成", + message: this._i18nText({ + "en-US": + "The organization name contains 3 to 10 uppercase and lowercase letters, digits, and underscores", + key: "i18n-iiub6ybv6ms", + "zh-CN": + "组织名称由 3 ~ 10 个大小写字母, 数字, 下划线组成", + }), pattern: "^[a-zA-Z0-9_]{3,10}$", required: true, whitespace: true, @@ -862,7 +868,12 @@ class Organization$$Page extends React.Component { }), "x-validator": [ { - message: "展示名由 0 ~ 20 个中英文、数字组成", + message: this._i18nText({ + "en-US": + "The display name consists of 0 ~ 20 Chinese and English numbers", + key: "i18n-de6rhkx2m7v", + "zh-CN": "展示名由 0 ~ 20 个中英文、数字组成", + }), pattern: "^[a-zA-Z0-9_\\u4e00-\\u9fa5]{0,20}$", }, ], @@ -889,7 +900,12 @@ class Organization$$Page extends React.Component { "x-component": "Input.TextArea", "x-validator": [ { - message: "组织描述由 0 ~ 200 字符组成", + message: this._i18nText({ + "en-US": + "The organization description consists of 0 to 200 characters", + key: "i18n-brvipauy4t4", + "zh-CN": "组织描述由 0 ~ 200 字符组成", + }), pattern: "^.{0,200}$", }, ], diff --git a/src/pages/OrganizationDetail/index.jsx b/src/pages/OrganizationDetail/index.jsx index 17407de..7b5881d 100644 --- a/src/pages/OrganizationDetail/index.jsx +++ b/src/pages/OrganizationDetail/index.jsx @@ -1194,7 +1194,13 @@ class OrganizationDetail$$Page extends React.Component { }), "x-validator": [ { - message: "用户名称由 3 ~ 20组成", + message: this._i18nText({ + "en-US": + "The user name contains 3 to 20 letters, digits, and underscores", + key: "i18n-ch5wgxkhdhs", + "zh-CN": + "用户名称由 3 ~ 20 个大小写字母, 数字, 下划线组成", + }), pattern: "^[a-zA-Z0-9_]{3,10}$", required: true, whitespace: true, @@ -1329,7 +1335,13 @@ class OrganizationDetail$$Page extends React.Component { }), "x-validator": [ { - message: "用户名称由 3 ~ 20 个大小写字母, 数字, 下划线组成", + message: this._i18nText({ + "en-US": + "The user name contains 3 to 20 letters, digits, and underscores", + key: "i18n-ch5wgxkhdhs", + "zh-CN": + "用户名称由 3 ~ 20 个大小写字母, 数字, 下划线组成", + }), pattern: "^[a-zA-Z0-9_]{3,10}$", required: true, whitespace: true, diff --git a/src/pages/Proposal/index.jsx b/src/pages/Proposal/index.jsx index 7f2365b..7200ca6 100644 --- a/src/pages/Proposal/index.jsx +++ b/src/pages/Proposal/index.jsx @@ -657,12 +657,7 @@ class Proposal$$Page extends React.Component { return true; } if (this.state.filter === "voted") { - return votes.some( - (vote) => - vote.organizationAdmin === - this.props.authData?.user?.name && - vote.status === "Voting" - ); + return item.voted === "NotVoted"; } return ( this.props.authData?.user?.name === diff --git a/src/pages/ProposalDetail/index.jsx b/src/pages/ProposalDetail/index.jsx index 8f1c9c1..e72e17e 100644 --- a/src/pages/ProposalDetail/index.jsx +++ b/src/pages/ProposalDetail/index.jsx @@ -715,7 +715,7 @@ class ProposalDetail$$Page extends React.Component { key: "i18n-tu47rri2uk", "zh-CN": "未投票", }), - value: "Created", + value: "NotVoted", }, ]} size="middle" @@ -1059,8 +1059,8 @@ class ProposalDetail$$Page extends React.Component { if (this.state.filter === "ALL") { return true; } - if (this.state.filter === "Created") { - return item.status === "Created"; + if (this.state.filter === "NotVoted") { + return item.status === "NotVoted"; } if (this.state.filter === "Voted") { return item.status === "Voted"; @@ -1115,8 +1115,8 @@ class ProposalDetail$$Page extends React.Component { if (this.state.filter === "ALL") { return true; } - if (this.state.filter === "Created") { - return item.status === "Created"; + if (this.state.filter === "NotVoted") { + return item.status === "NotVoted"; } if (this.state.filter === "Voted") { return item.status === "Voted"; @@ -1233,14 +1233,7 @@ class ProposalDetail$$Page extends React.Component { "zh-CN": "提议名称", }), "x-pattern": "disabled", - "x-validator": [ - { - message: "组织名称由 3 ~ 10 个大小写字母, 数字, 下划线组成", - pattern: "^[a-zA-Z0-9_]{3,10}$", - required: true, - whitespace: true, - }, - ], + "x-validator": [], }} />