Skip to content

Commit

Permalink
fix: Members' proposals can be deleted when the federation is not yet…
Browse files Browse the repository at this point in the history
… active (#12)
  • Loading branch information
Jandiasnow committed Feb 15, 2023
1 parent 94b58f7 commit c5d9bcc
Showing 1 changed file with 56 additions and 1 deletion.
57 changes: 56 additions & 1 deletion src/pages/FederationDetail/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ class FederationDetail$$Page extends React.Component {
title={this._i18nText({
"en-US": "federation detail",
key: "i18n-abe4gir44un",
use: "zh-CN",
"zh-CN": "联盟详情",
})}
type="simple"
Expand Down Expand Up @@ -342,6 +343,7 @@ class FederationDetail$$Page extends React.Component {
label: this._i18nText({
"en-US": "federation description",
key: "i18n-8weq4mfy9lf",
use: "zh-CN",
"zh-CN": "联盟描述",
}),
span: 1,
Expand All @@ -366,6 +368,7 @@ class FederationDetail$$Page extends React.Component {
label: this._i18nText({
"en-US": "creator",
key: "i18n-yyexdt18ora",
use: "zh-CN",
"zh-CN": "创建人",
}),
span: 1,
Expand All @@ -382,6 +385,7 @@ class FederationDetail$$Page extends React.Component {
{this._i18nText({
"en-US": "Real-name authentication",
key: "i18n-1g6cw1w1uv4",
use: "zh-CN",
"zh-CN": "实名认证",
})}
</Typography.Text>
Expand All @@ -390,6 +394,7 @@ class FederationDetail$$Page extends React.Component {
label: this._i18nText({
"en-US": "members",
key: "i18n-21z9nbkoohk",
use: "zh-CN",
"zh-CN": "成员限制",
}),
span: 1,
Expand All @@ -411,6 +416,7 @@ class FederationDetail$$Page extends React.Component {
label: this._i18nText({
"en-US": "create time",
key: "i18n-9ox4rx1wtwv",
use: "zh-CN",
"zh-CN": "创建时间",
}),
span: 1,
Expand All @@ -420,6 +426,7 @@ class FederationDetail$$Page extends React.Component {
<Typography.Time
__component_name="Typography.Time"
format=""
relativeTime={false}
time={__$$eval(
() =>
this.props.useGetFederation?.data
Expand All @@ -431,6 +438,7 @@ class FederationDetail$$Page extends React.Component {
label: this._i18nText({
"en-US": "join time",
key: "i18n-c0d66z03kpk",
use: "zh-CN",
"zh-CN": "加入时间",
}),
span: 1,
Expand All @@ -445,6 +453,7 @@ class FederationDetail$$Page extends React.Component {
label: this._i18nText({
"en-US": "propsoal",
key: "i18n-g8rbmvh04cd",
use: "zh-CN",
"zh-CN": "提议策略",
}),
span: 1,
Expand All @@ -465,6 +474,7 @@ class FederationDetail$$Page extends React.Component {
label={this._i18nText({
"en-US": "federation description",
key: "i18n-8weq4mfy9lf",
use: "zh-CN",
"zh-CN": "联盟描述",
})}
span={1}
Expand All @@ -482,6 +492,7 @@ class FederationDetail$$Page extends React.Component {
label={this._i18nText({
"en-US": "creator",
key: "i18n-yyexdt18ora",
use: "zh-CN",
"zh-CN": "创建人",
})}
span={1}
Expand Down Expand Up @@ -509,6 +520,7 @@ class FederationDetail$$Page extends React.Component {
label={this._i18nText({
"en-US": "members",
key: "i18n-21z9nbkoohk",
use: "zh-CN",
"zh-CN": "成员限制",
})}
span={1}
Expand All @@ -524,6 +536,7 @@ class FederationDetail$$Page extends React.Component {
{this._i18nText({
"en-US": "Real-name authentication",
key: "i18n-1g6cw1w1uv4",
use: "zh-CN",
"zh-CN": "实名认证",
})}
</Typography.Text>
Expand All @@ -535,6 +548,7 @@ class FederationDetail$$Page extends React.Component {
label={this._i18nText({
"en-US": "create time",
key: "i18n-9ox4rx1wtwv",
use: "zh-CN",
"zh-CN": "创建时间",
})}
span={1}
Expand All @@ -558,6 +572,7 @@ class FederationDetail$$Page extends React.Component {
label={this._i18nText({
"en-US": "join time",
key: "i18n-c0d66z03kpk",
use: "zh-CN",
"zh-CN": "加入时间",
})}
span={1}
Expand All @@ -581,6 +596,7 @@ class FederationDetail$$Page extends React.Component {
label={this._i18nText({
"en-US": "propsoal",
key: "i18n-g8rbmvh04cd",
use: "zh-CN",
"zh-CN": "提议策略",
})}
span={1}
Expand All @@ -598,6 +614,7 @@ class FederationDetail$$Page extends React.Component {
label: this._i18nText({
"en-US": "federation infomation",
key: "i18n-a7fnfkzqkks",
use: "zh-CN",
"zh-CN": "联盟信息",
}),
},
Expand Down Expand Up @@ -656,6 +673,7 @@ class FederationDetail$$Page extends React.Component {
{this._i18nText({
"en-US": "add member",
key: "i18n-gwumlhyv4ub",
use: "zh-CN",
"zh-CN": "邀请成员",
})}
</Button>
Expand Down Expand Up @@ -723,6 +741,7 @@ class FederationDetail$$Page extends React.Component {
title: this._i18nText({
"en-US": "organization",
key: "i18n-gmx7l7tolvj",
use: "zh-CN",
"zh-CN": "成员组织",
}),
},
Expand All @@ -741,6 +760,7 @@ class FederationDetail$$Page extends React.Component {
{this._i18nText({
"en-US": "Real-name authentication",
key: "i18n-1g6cw1w1uv4",
use: "zh-CN",
"zh-CN": "实名认证",
})}
</Typography.Text>
Expand All @@ -754,6 +774,7 @@ class FederationDetail$$Page extends React.Component {
title: this._i18nText({
"en-US": "infomation",
key: "i18n-th9ag1qgsu",
use: "zh-CN",
"zh-CN": "认证信息",
}),
},
Expand All @@ -777,6 +798,7 @@ class FederationDetail$$Page extends React.Component {
title: this._i18nText({
"en-US": "join time",
key: "i18n-c0d66z03kpk",
use: "zh-CN",
"zh-CN": "加入时间",
}),
},
Expand Down Expand Up @@ -809,8 +831,25 @@ class FederationDetail$$Page extends React.Component {
}}
block={false}
danger={false}
disabled={false}
disabled={__$$eval(() =>
[
"FederationPending",
"FederationDissolved",
].includes(
__$$context.props.useGetFederation
?.data?.federation?.status
)
)}
ghost={false}
icon={__$$eval(() =>
[
"FederationPending",
"FederationDissolved",
].includes(
__$$context.props.useGetFederation
?.data?.federation?.status
)
)}
onClick={function () {
this.openDeleteUserModal.apply(
this,
Expand All @@ -829,6 +868,7 @@ class FederationDetail$$Page extends React.Component {
{this._i18nText({
"en-US": "delete",
key: "i18n-ias68eipm18",
use: "zh-CN",
"zh-CN": "删除",
})}
</Button>
Expand All @@ -842,6 +882,7 @@ class FederationDetail$$Page extends React.Component {
title: this._i18nText({
"en-US": "operation",
key: "i18n-k5inn5jmnt9",
use: "zh-CN",
"zh-CN": "操作",
}),
width: 100,
Expand Down Expand Up @@ -928,6 +969,7 @@ class FederationDetail$$Page extends React.Component {
label: this._i18nText({
"en-US": "federation members",
key: "i18n-8vybx9itd3n",
use: "zh-CN",
"zh-CN": "联盟成员",
}),
},
Expand Down Expand Up @@ -964,6 +1006,7 @@ class FederationDetail$$Page extends React.Component {
{this._i18nText({
"en-US": "create network",
key: "i18n-kwbu3vyst6",
use: "zh-CN",
"zh-CN": "新建网络",
})}
</Button>
Expand Down Expand Up @@ -1045,6 +1088,7 @@ class FederationDetail$$Page extends React.Component {
placeholder={this._i18nText({
"en-US": "search",
key: "i18n-mrdb0wulhmc",
use: "zh-CN",
"zh-CN": "输入资源ID或网络名",
})}
/>
Expand Down Expand Up @@ -1122,6 +1166,7 @@ class FederationDetail$$Page extends React.Component {
title: this._i18nText({
"en-US": "id/name",
key: "i18n-03e0p0acqmaf",
use: "zh-CN",
"zh-CN": "资源ID/网络名称",
}),
},
Expand All @@ -1131,6 +1176,7 @@ class FederationDetail$$Page extends React.Component {
title: this._i18nText({
"en-US": "type",
key: "i18n-oi2oqdfkq6i",
use: "zh-CN",
"zh-CN": "引擎类型",
}),
},
Expand Down Expand Up @@ -1158,6 +1204,7 @@ class FederationDetail$$Page extends React.Component {
title: this._i18nText({
"en-US": "organization",
key: "i18n-18ncsld69pu",
use: "zh-CN",
"zh-CN": "组织数",
}),
},
Expand All @@ -1167,6 +1214,7 @@ class FederationDetail$$Page extends React.Component {
title: this._i18nText({
"en-US": "node number",
key: "i18n-fg85es7zp8",
use: "zh-CN",
"zh-CN": "我的节点总数",
}),
},
Expand All @@ -1191,6 +1239,7 @@ class FederationDetail$$Page extends React.Component {
title: this._i18nText({
"en-US": "create time",
key: "i18n-9ox4rx1wtwv",
use: "zh-CN",
"zh-CN": "创建时间",
}),
},
Expand All @@ -1214,6 +1263,7 @@ class FederationDetail$$Page extends React.Component {
title: this._i18nText({
"en-US": "time",
key: "i18n-scjygs4e08n",
use: "zh-CN",
"zh-CN": "过期时间",
}),
},
Expand Down Expand Up @@ -1368,6 +1418,7 @@ class FederationDetail$$Page extends React.Component {
title={this._i18nText({
"en-US": "add member",
key: "i18n-gwumlhyv4ub",
use: "zh-CN",
"zh-CN": "邀请成员",
})}
>
Expand Down Expand Up @@ -1396,6 +1447,7 @@ class FederationDetail$$Page extends React.Component {
placeholder: this._i18nText({
"en-US": "name",
key: "i18n-ihfepbwjnv",
use: "zh-CN",
"zh-CN": "被邀请的成员/组织名称",
}),
},
Expand All @@ -1408,6 +1460,7 @@ class FederationDetail$$Page extends React.Component {
title: this._i18nText({
"en-US": "Member organization",
key: "i18n-gmx7l7tolvj",
use: "zh-CN",
"zh-CN": "成员组织",
}),
"x-validator": [],
Expand Down Expand Up @@ -1476,6 +1529,7 @@ class FederationDetail$$Page extends React.Component {
title={this._i18nText({
"en-US": "Delete a user",
key: "i18n-h52hay1ld2s",
use: "zh-CN",
"zh-CN": "删除用户",
})}
>
Expand All @@ -1485,6 +1539,7 @@ class FederationDetail$$Page extends React.Component {
message={this._i18nText({
"en-US": "Confirm user deletion",
key: "i18n-mmk8cikrrw",
use: "zh-CN",
"zh-CN": "确定删除用户",
})}
showIcon={true}
Expand Down

0 comments on commit c5d9bcc

Please sign in to comment.