Skip to content

Commit

Permalink
fix: User experience
Browse files Browse the repository at this point in the history
  • Loading branch information
songyg committed Nov 15, 2023
1 parent 0cf98e5 commit fc4abf4
Show file tree
Hide file tree
Showing 11 changed files with 6,665 additions and 6,313 deletions.
26 changes: 0 additions & 26 deletions src/components/AddOrEditGroup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,32 +264,6 @@ export default class EditGroupName extends PureComponent {
]
})(<Input placeholder={formatMessage({id:'popover.newApp.appEngName.placeholder'})} disabled={!isDisabled} />)}
</FormItem>
{/* 应用Logo */}
<FormItem
{...is_language}
label={formatMessage({id:'popover.newApp.logo'})}
extra={formatMessage({id:'popover.newApp.upload_pictures.extra'})}
>
<Upload
action={apiconfig.imageUploadUrl}
listType="picture-card"
accept="image/jpg,image/jpeg,image/png"
fileList={fileList}
onPreview={this.handlePreview}
onChange={this.handleChange}
onRemove={this.handleRemove}
>
{fileList.length > 0 ? null : uploadButton}
</Upload>
<Modal
visible={previewVisible}
title={previewTitle}
footer={null}
onCancel={this.handleCancel}
>
<img alt="example" style={{ width: '100%' }} src={previewImage} />
</Modal>
</FormItem>

<FormItem {...is_language
} label={formatMessage({id:'popover.newApp.appRemark'})}>
Expand Down
3 changes: 0 additions & 3 deletions src/components/CreateTeam/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,6 @@ class CreateTeam extends PureComponent {
}
]
})(<Input placeholder={formatMessage({ id: 'popover.enterpriseOverview.setUpTeam.placeholder.name' })} />)}
{/* <div className={styles.conformDesc}>
<FormattedMessage id='popover.enterpriseOverview.setUpTeam.conformDesc.name'/>
</div> */}
</FormItem>
{/* 团队的命名空间 */}
<FormItem {...formItemLayout} label={<FormattedMessage id='popover.enterpriseOverview.setUpTeam.label.englishName' />}
Expand Down
2 changes: 1 addition & 1 deletion src/components/CreateTeam/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
}

.conformDesc {
font-size: 10px;
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(153, 153, 153, 1);
Expand Down
11 changes: 6 additions & 5 deletions src/components/HttpTable/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,17 +160,20 @@ export default class HttpTable extends PureComponent {
handleClose = () => {
this.setState({ drawerVisible: false, editInfo: '' });
};
handleOk = (values, group_name, routingConfiguration, obj) => {
handleOk = (values, group_name, obj) => {
const { dispatch, groups } = this.props;
const { editInfo, gateWayInfo } = this.state;
if (obj && obj.whether_open) {
values.whether_open = true;
}
// 新增网关策略
if (!editInfo) {
dispatch({
type: 'gateWay/addHttpStrategy',
payload: {
values,
group_name,
team_name: globalUtil.getCurrTeamName()
team_name: globalUtil.getCurrTeamName(),
},
callback: data => {
if (data && data.bean.is_outer_service === false) {
Expand Down Expand Up @@ -213,9 +216,6 @@ export default class HttpTable extends PureComponent {
values.the_weight = data.bean.the_weight || '';
values.certificate_id = data.bean.certificate_id || '';
}
if (obj && obj.whether_open) {
values.whether_open = true;
}

dispatch({
type: 'gateWay/editHttpStrategy',
Expand Down Expand Up @@ -249,6 +249,7 @@ export default class HttpTable extends PureComponent {
});
};
resolveOk = () => {
console.log('进来了')
this.setState(
{
whetherOpenForm: false
Expand Down
8 changes: 4 additions & 4 deletions src/components/OauthForm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@ class CreateOAuthForm extends PureComponent {
rules: [
{ required: true, message: formatMessage({id:'placeholder.oauth.client_id'}) },
{
max: 64,
message: formatMessage({id:'placeholder.appShare.max64'})
max: 255,
message: formatMessage({id:'placeholder.appShare.max255'})
}
]
})(<Input disabled={edit} placeholder={formatMessage({id:'placeholder.oauth.client_id'})} />)}
Expand All @@ -207,8 +207,8 @@ class CreateOAuthForm extends PureComponent {
rules: [
{ required: true, message: formatMessage({id:'placeholder.oauth.client_secret'}) },
{
max: 64,
message: formatMessage({id:'placeholder.appShare.max64'})
max: 255,
message: formatMessage({id:'placeholder.appShare.max255'})
}
]
})(<Input disabled={edit} placeholder={formatMessage({id:'placeholder.oauth.client_secret'})} />)}
Expand Down
2 changes: 1 addition & 1 deletion src/components/ThirdList/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ class Index extends React.Component {
})(
<Select
getPopupContainer={triggerNode => triggerNode.parentNode}
placeholder="请选择要所属应用"
placeholder="请选择所属应用"
style={{
display: 'inline-block',
width: ServiceComponent ? '' : 251,
Expand Down
1 change: 1 addition & 0 deletions src/locales/en-US/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,7 @@
'placeholder.appShare.selectAppTemplate':'Select the published application template',
'placeholder.appShare.version':'Please fill in the version number',
'placeholder.appShare.max64':'Maximum length: 64 bits',
'placeholder.appShare.max255':'Maximum length: 255 bits',
'placeholder.appShare.version_alias':'Set version alias, such as advanced version',
'placeholder.appShare.describe':'Please enter the Version Description',
'placeholder.appShare.retain':'Please keep at least one component',
Expand Down
2 changes: 1 addition & 1 deletion src/locales/zh-CN/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,7 @@ const otherAppAssembly = {
'otherApp.UploadYaml.only':'只支持小写字母、数字或“-”,并且必须以字母开始、以数字或字母结尾',
'otherApp.UploadYaml.max':'不能大于32个字符',
'otherApp.UploadYaml.name':'应用名称',
'otherApp.UploadYaml.app':'请选择要所属应用',
'otherApp.UploadYaml.app':'请选择所属应用',
'otherApp.UploadYaml.up':'上传文件',
'otherApp.UploadYaml.yaml':'支持yaml、yml格式上传文件',
'otherApp.UploadYaml.placese_up':'请上传文件',
Expand Down
3 changes: 2 additions & 1 deletion src/locales/zh-CN/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@

}
const placeholder = {
'placeholder.appName':'请选择要所属应用',
'placeholder.appName':'请选择所属应用',
'placeholder.service_cname':'请为创建的组件起个名字吧',
'placeholder.k8s_component_name':'请输入组件的英文名称',
'placeholder.appEngName':'请输入应用的英文名称',
Expand Down Expand Up @@ -761,6 +761,7 @@
'placeholder.appShare.selectAppTemplate':'选择发布的应用模版',
'placeholder.appShare.version':'请填写版本号',
'placeholder.appShare.max64':'最大长度64位',
'placeholder.appShare.max255':'最大长度255位',
'placeholder.appShare.version_alias':'设置版本别名,比如高级版',
'placeholder.appShare.describe':'请输入版本说明',
'placeholder.appShare.retain':'请至少保留一个组件',
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Guide/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ export default class Index extends PureComponent {
getPopupContainer={triggerNode =>
triggerNode.parentNode
}
placeholder="请选择要所属应用"
placeholder="请选择所属应用"
style={{
display: 'inline-block',
width: 270,
Expand Down
Loading

0 comments on commit fc4abf4

Please sign in to comment.