From 29b7366727efddf8fa7079c9b2266fba0f7457fa Mon Sep 17 00:00:00 2001 From: TaurusXin Date: Wed, 24 Jul 2024 08:55:44 +0800 Subject: [PATCH] feat: complete text --- frontend/src/pages/Download.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/pages/Download.tsx b/frontend/src/pages/Download.tsx index 84333d1..68ce902 100644 --- a/frontend/src/pages/Download.tsx +++ b/frontend/src/pages/Download.tsx @@ -19,6 +19,8 @@ const Download = (props: { onFinish: () => void }) => { const [downloadProgress, setDownloadProgress] = useState(0.0) const [isDisabled, setIsDisabled] = useState(true) + const [title, setTitle] = useState('Downloading') + useEffect(() => { Close().then(res => { StartDownload().then(res => { @@ -28,6 +30,7 @@ const Download = (props: { onFinish: () => void }) => { setDownloadProgress(progress * 100) if (progress === 1) { props.onFinish() + setTitle('Completed') setIsDisabled(false) } }) @@ -38,7 +41,7 @@ const Download = (props: { onFinish: () => void }) => { - Downloading + {title}