mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-13 18:36:37 +08:00
[优化] 更新版本升级模态框的上传状态提示,改善用户体验
This commit is contained in:
@@ -80,6 +80,10 @@ export function VersionUpgradeModal({
|
|||||||
}: VersionUpgradeModalProps) {
|
}: VersionUpgradeModalProps) {
|
||||||
const upgradeBadge = getUpgradeBadge(release);
|
const upgradeBadge = getUpgradeBadge(release);
|
||||||
const [selectedBinary, setSelectedBinary] = useState<File | null>(null);
|
const [selectedBinary, setSelectedBinary] = useState<File | null>(null);
|
||||||
|
const uploadPhaseLabel =
|
||||||
|
uploadProgress >= 100
|
||||||
|
? '已上传,正在服务端校验版本...'
|
||||||
|
: '上传中...';
|
||||||
const selectedChannelLabel =
|
const selectedChannelLabel =
|
||||||
selectedChannel === 'preview' ? '预览版' : '正式版';
|
selectedChannel === 'preview' ? '预览版' : '正式版';
|
||||||
const toggleChannel = () => {
|
const toggleChannel = () => {
|
||||||
@@ -285,7 +289,11 @@ export function VersionUpgradeModal({
|
|||||||
isConfirmingManualUpgrade
|
isConfirmingManualUpgrade
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{isUploadingBinary ? '上传检查中...' : '上传并检查'}
|
{isUploadingBinary
|
||||||
|
? uploadProgress >= 100
|
||||||
|
? '服务端校验中...'
|
||||||
|
: '上传中...'
|
||||||
|
: '上传并检查'}
|
||||||
</PrimaryButton>
|
</PrimaryButton>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
@@ -293,7 +301,7 @@ export function VersionUpgradeModal({
|
|||||||
{isUploadingBinary ? (
|
{isUploadingBinary ? (
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
<div className="flex items-center justify-between text-xs text-[var(--foreground-secondary)]">
|
<div className="flex items-center justify-between text-xs text-[var(--foreground-secondary)]">
|
||||||
<span>上传中...</span>
|
<span>{uploadPhaseLabel}</span>
|
||||||
<span>{uploadProgress}%</span>
|
<span>{uploadProgress}%</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="h-2 w-full overflow-hidden rounded-full bg-[var(--border-default)]">
|
<div className="h-2 w-full overflow-hidden rounded-full bg-[var(--border-default)]">
|
||||||
|
|||||||
Reference in New Issue
Block a user