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 })} + + +