From 9593973fb0ff112cf26266bfedbf45e6460b10bf Mon Sep 17 00:00:00 2001
From: 905086 <k2049@qq.com>
Date: Wed, 04 Nov 2026 20:43:12 +0800
Subject: [PATCH] feat: 支持游戏启动程序配置与自动解压安装

---
 fluttergamebox/lib/widgets/download_manager.dart |   34 ++++++++++++++++++++++------------
 1 files changed, 22 insertions(+), 12 deletions(-)

diff --git a/fluttergamebox/lib/widgets/download_manager.dart b/fluttergamebox/lib/widgets/download_manager.dart
index 724970c..fbdf17c 100644
--- a/fluttergamebox/lib/widgets/download_manager.dart
+++ b/fluttergamebox/lib/widgets/download_manager.dart
@@ -136,17 +136,23 @@
                           Row(
                             children: [
                               Text(
-                                task.finished
-                                    ? '下载完成'
-                                    : task.paused
-                                        ? '已暂停'
-                                        : '正在下载',
-                                style: TextStyle(
-                                    color: task.paused
-                                        ? AppColors.yellow
+                                task.extracting
+                                    ? '正在解压安装...'
+                                    : task.extractFailed
+                                        ? '解压失败'
                                         : task.finished
-                                            ? AppColors.green
-                                            : AppColors.accent,
+                                            ? '下载完成'
+                                            : task.paused
+                                                ? '已暂停'
+                                                : '正在下载',
+                                style: TextStyle(
+                                    color: task.extractFailed
+                                        ? AppColors.red
+                                        : task.paused
+                                            ? AppColors.yellow
+                                            : task.finished
+                                                ? AppColors.green
+                                                : AppColors.accent,
                                     fontSize: 14,
                                     fontWeight: FontWeight.w500),
                               ),
@@ -154,7 +160,11 @@
                           ),
                           const SizedBox(height: 8),
                           Text(
-                            '${formatBytes(task.speed)}/s',
+                            task.extracting
+                                ? '解压中,请勿关闭软件'
+                                : task.extractFailed
+                                    ? '压缩包保留在下载目录,可手动解压'
+                                    : '${formatBytes(task.speed)}/s',
                             style: const TextStyle(
                                 color: AppColors.textGray, fontSize: 13),
                           ),
@@ -281,7 +291,7 @@
                   children: [
                     Expanded(
                       child: ElevatedButton(
-                        onPressed: task.finished
+                        onPressed: task.finished || task.extracting
                             ? null
                             : () {
                                 if (task.paused) {

--
Gitblit v1.10.0