From 12ec5e6fc3790372edd363a8d2dc744afaeab51d Mon Sep 17 00:00:00 2001 From: Developer Date: Wed, 3 Dec 2025 08:17:02 -0800 Subject: [PATCH] =?UTF-8?q?fix(mobile-upgrade):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=A7=A3=E6=9E=90=E5=A4=B1=E8=B4=A5=E6=97=B6=E7=9A=84=E5=8F=8B?= =?UTF-8?q?=E5=A5=BD=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 当 APK/IPA 解析失败时,显示黄色警告提示用户手动填写版本信息 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../src/presentation/components/upload-modal.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/frontend/mobile-upgrade/src/presentation/components/upload-modal.tsx b/frontend/mobile-upgrade/src/presentation/components/upload-modal.tsx index 5ed200ae..5e89f279 100644 --- a/frontend/mobile-upgrade/src/presentation/components/upload-modal.tsx +++ b/frontend/mobile-upgrade/src/presentation/components/upload-modal.tsx @@ -26,6 +26,7 @@ export function UploadModal({ onClose, onSuccess }: UploadModalProps) { }) const [file, setFile] = useState(null) const [error, setError] = useState(null) + const [parseWarning, setParseWarning] = useState(null) const handleFileChange = async (e: React.ChangeEvent) => { const selectedFile = e.target.files?.[0] @@ -33,6 +34,7 @@ export function UploadModal({ onClose, onSuccess }: UploadModalProps) { setFile(selectedFile) setError(null) + setParseWarning(null) // Auto-detect platform from file extension let detectedPlatform: Platform = 'android' @@ -56,7 +58,8 @@ export function UploadModal({ onClose, onSuccess }: UploadModalProps) { })) } catch (err) { console.error('Failed to parse package:', err) - // Don't show error, just let user fill in manually + // Show warning but allow user to fill in manually + setParseWarning('无法自动解析安装包信息,请手动填写版本号和构建号') } finally { setIsParsing(false) } @@ -123,6 +126,12 @@ export function UploadModal({ onClose, onSuccess }: UploadModalProps) { )} + {parseWarning && ( +
+ {parseWarning} +
+ )} +
{/* File Upload */}