|
|
@ -39,7 +39,7 @@ export default function UploadList() { |
|
|
|
key: 'clear', |
|
|
|
onClick: () => { |
|
|
|
setShowMenu(false); |
|
|
|
if (!context.syncProgress.finish) { |
|
|
|
if (context.syncProgress.status === 'uploading') { |
|
|
|
Dialog.confirm({ |
|
|
|
content: '存在未完成的任务,确定清空?', |
|
|
|
onConfirm: () => { |
|
|
@ -128,6 +128,16 @@ export default function UploadList() { |
|
|
|
</div> |
|
|
|
); |
|
|
|
|
|
|
|
const statusText = () => { |
|
|
|
if (context.syncProgress.status === 'finished') { |
|
|
|
return '完成'; |
|
|
|
} else if (context.syncProgress.status === 'paused') { |
|
|
|
return '暂停'; |
|
|
|
} else if (context.syncProgress.status === 'uploading') { |
|
|
|
return '上传中'; |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
return ( |
|
|
|
<div> |
|
|
|
<NavBar className="bg-white" onBack={back} right={right}> |
|
|
@ -138,7 +148,7 @@ export default function UploadList() { |
|
|
|
<span>剩余任务{context.syncProgress.remaining}个</span> |
|
|
|
<i className="border-l border-[#999] h-3 mx-2" /> |
|
|
|
<span>失败{context.syncProgress.fail}个</span> |
|
|
|
<p className="ml-auto text-primary">{context.syncProgress.finish ? '完成' : '上传中'}</p> |
|
|
|
<p className="ml-auto text-primary">{statusText()}</p> |
|
|
|
</header> |
|
|
|
<main |
|
|
|
className="relative overflow-x-hidden overflow-y-auto" |
|
|
|