From 4085677c5a108214317cf7b7327577800e6ccd6c Mon Sep 17 00:00:00 2001 From: dushixiang <798148596@qq.com> Date: Tue, 9 Feb 2021 15:28:58 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E5=A2=9E=E5=8A=A0=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E5=A4=87=E6=B3=A8=E5=8A=9F=E8=83=BD=20-=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=85=A8=E9=83=A8=E5=BC=B9=E7=AA=97=E5=B1=85=E4=B8=AD=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/api/asset.go | 4 ++++ web/src/components/Login.js | 1 + web/src/components/access/Access.js | 1 + web/src/components/asset/Asset.js | 2 ++ web/src/components/asset/AssetModal.js | 9 +++++++-- web/src/components/command/DynamicCommand.js | 3 +++ web/src/components/command/DynamicCommandModal.js | 1 + web/src/components/credential/Credential.js | 2 ++ web/src/components/credential/CredentialModal.js | 2 +- web/src/components/session/OfflineSession.js | 3 +-- web/src/components/session/OnlineSession.js | 2 +- web/src/components/user/User.js | 2 ++ web/src/components/user/UserGroup.js | 1 + web/src/components/user/UserGroupModal.js | 1 + web/src/components/user/UserModal.js | 1 + 15 files changed, 29 insertions(+), 6 deletions(-) diff --git a/pkg/api/asset.go b/pkg/api/asset.go index ed2074c..9032014 100644 --- a/pkg/api/asset.go +++ b/pkg/api/asset.go @@ -97,6 +97,10 @@ func AssetUpdateEndpoint(c echo.Context) error { item.Tags = "-" } + if item.Description == "" { + item.Description = "-" + } + model.UpdateAssetById(&item, id) return Success(c, nil) diff --git a/web/src/components/Login.js b/web/src/components/Login.js index d0314c0..49db17c 100644 --- a/web/src/components/Login.js +++ b/web/src/components/Login.js @@ -128,6 +128,7 @@ class LoginForm extends Component { { this.formRef.current .validateFields() diff --git a/web/src/components/access/Access.js b/web/src/components/access/Access.js index 907cdb6..76115fe 100644 --- a/web/src/components/access/Access.js +++ b/web/src/components/access/Access.js @@ -621,6 +621,7 @@ class Access extends Component { title="剪贴板" maskClosable={false} visible={this.state.clipboardVisible} + centered={true} onOk={() => { this.clipboardFormRef.current .validateFields() diff --git a/web/src/components/asset/Asset.js b/web/src/components/asset/Asset.js index f90f1a3..499de28 100644 --- a/web/src/components/asset/Asset.js +++ b/web/src/components/asset/Asset.js @@ -709,6 +709,7 @@ class Asset extends Component { } visible={this.state.changeOwnerModalVisible} confirmLoading={this.state.changeOwnerConfirmLoading} + centered={true} onOk={() => { this.setState({ changeOwnerConfirmLoading: true @@ -771,6 +772,7 @@ class Asset extends Component { } visible={this.state.changeSharerModalVisible} confirmLoading={this.state.changeSharerConfirmLoading} + centered={true} onOk={async () => { this.setState({ changeSharerConfirmLoading: true diff --git a/web/src/components/asset/AssetModal.js b/web/src/components/asset/AssetModal.js index 920ae9c..5eff2fe 100644 --- a/web/src/components/asset/AssetModal.js +++ b/web/src/components/asset/AssetModal.js @@ -98,6 +98,7 @@ const AssetModal = function ({title, visible, handleOk, handleCancel, confirmLoa title={title} visible={visible} maskClosable={false} + centered={true} onOk={() => { form .validateFields() @@ -137,7 +138,7 @@ const AssetModal = function ({title, visible, handleOk, handleCancel, confirmLoa - + @@ -198,7 +199,7 @@ const AssetModal = function ({title, visible, handleOk, handleCancel, confirmLoa } - {tags.map(tag => { if (tag === '-') { return undefined; @@ -207,6 +208,10 @@ const AssetModal = function ({title, visible, handleOk, handleCancel, confirmLoa })} + + +