From 03c1e7d648a5f1ffe5813e74ca839d6909ce380a Mon Sep 17 00:00:00 2001 From: Noah Lee Date: Mon, 27 May 2024 11:00:09 +0900 Subject: [PATCH 1/2] feat: Add refresh button for deploy (#531) --- ui/src/views/repoDeploy/index.tsx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/ui/src/views/repoDeploy/index.tsx b/ui/src/views/repoDeploy/index.tsx index 8ed773d1..d14c3016 100644 --- a/ui/src/views/repoDeploy/index.tsx +++ b/ui/src/views/repoDeploy/index.tsx @@ -228,8 +228,17 @@ function RepoDeploy({ env, onClickOk, }: RepoDeployProps): JSX.Element { + const [refreshing, setRefreshing] = useState(false); const [payloadModalVisible, setPayloadModalVisible] = useState(false); + const _onClickRefresh = () => { + setRefreshing(true); + onClickRefresh(); + setTimeout(() => { + setRefreshing(false); + }, 1000); + }; + const _onClickDeploy = () => { if (env?.dynamicPayload?.enabled) { setPayloadModalVisible(true); @@ -257,9 +266,10 @@ function RepoDeploy({ key="1" type="text" shape="circle" - size="large" + size="middle" + loading={refreshing} icon={} - onClick={onClickRefresh} + onClick={_onClickRefresh} />, ]} /> From 37643d4a4ef018a6b19075202a37087cef0c3f8e Mon Sep 17 00:00:00 2001 From: Noah Lee Date: Mon, 27 May 2024 11:00:58 +0900 Subject: [PATCH 2/2] refactor: Update DynamicPayloadModal to use Input.TextArea for multiline input (#532) --- ui/src/views/repoDeploy/DynamicPayloadModal.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/src/views/repoDeploy/DynamicPayloadModal.tsx b/ui/src/views/repoDeploy/DynamicPayloadModal.tsx index 6397424e..a541858b 100644 --- a/ui/src/views/repoDeploy/DynamicPayloadModal.tsx +++ b/ui/src/views/repoDeploy/DynamicPayloadModal.tsx @@ -103,7 +103,7 @@ function DynamicItem({ name, input }: DynamicItemProps): JSX.Element { tooltip={description} rules={rules} > - + ); case DynamicPayloadInputTypeEnum.Number: