Преглед изворни кода

feat(mobile): v1.0.4 开屏动画重做 + 更新体验修复

开屏动画(SplashAnimView)
- 线条改贝塞尔曲线:原来是提取轮廓点逐点连线,五十多个点必然歪扭、
  高分屏颗粒感重。现在用 cubicTo 描边,弧面连续。
- 时序拆分:原来描边 38% 才画完、填充 30% 就已开始,两者重叠 8%,
  彩色块压在没走完的线上。现在严格分段 —— 描边走完 → 线条淡出 → 图案浮现。

更新体验
- 下载完成自动安装:原来广播只通知网页层,靠网页再调 install。
  切后台网页休眠 / 弹窗关闭组件已销毁 / 事件早于 JS 注册,三种情况都会失效。
  现在原生层直接校验下载状态并拉起安装器,不依赖网页层存活。
- 不再显示死进度条:拿不到真实比例时改为一句话提示「后台下载中」,
  不再画一条永远 0% 的条让用户以为卡死。

布局
- 状态栏沉浸式:内容延伸到状态栏/导航栏下方,顶栏背景铺到屏幕最上沿。
- 顶栏状态栏占位再收 4px(沉浸式后无需留完整高度)。
- 项目切换去掉外圈边框、左右内边距和文件夹图标,只留项目名 + 箭头,
  手机上项目名不再被挤得显示不全。

修复
- 构建:colors.xml 与 ic_launcher_background.xml 重复定义 splash_background
  导致 mergeReleaseResources 失败。统一为白色,与 SplashAnimView 的
  Color.WHITE 容器一致。
- publish-apk.mjs 支持 release 产物目录(原脚本写死 debug 路径)。
liuyuyang пре 14 часа
родитељ
комит
c3ac23ddfc

+ 88 - 3
android/app/src/main/java/cn/fmode/app/AppUpdatePlugin.java

@@ -49,6 +49,8 @@ public class AppUpdatePlugin extends Plugin {
 
     private static final String APK_MIME = "application/vnd.android.package-archive";
     private static final String DOWNLOAD_DIR = "fmode-update";
+    /** 日志标签:自动安装失败时不打扰用户,只记 logcat */
+    private static final String TAG = "FmodeUpdate";
 
     /** 下载完成广播接收器,注册后随插件生命周期存活 */
     private BroadcastReceiver completeReceiver;
@@ -187,6 +189,68 @@ public class AppUpdatePlugin extends Plugin {
      * 关键点:必须用 FileProvider 生成 content:// URI。
      * Android 7.0 起 file:// 跨进程传递会直接抛 FileUriExposedException。
      */
+    // ---------- 内部工具:广播里直接安装(2026-11-23) ----------
+
+    /**
+     * 查下载任务状态。
+     * 用 DownloadManager 的查询接口,比 JS 事件更可靠 —— 广播到达时状态一定已落库。
+     */
+    private int downloadStatus(long id) {
+        DownloadManager manager =
+            (DownloadManager) getContext().getSystemService(Context.DOWNLOAD_SERVICE);
+        if (manager == null) return DownloadManager.STATUS_FAILED;
+
+        DownloadManager.Query q = new DownloadManager.Query().setFilterById(id);
+        try (Cursor c = manager.query(q)) {
+            if (c != null && c.moveToFirst()) {
+                int idx = c.getColumnIndex(DownloadManager.COLUMN_STATUS);
+                if (idx >= 0) return c.getInt(idx);
+            }
+        } catch (Exception ignored) {
+            /* 查询失败按未知处理,走失败分支 */
+        }
+        return DownloadManager.STATUS_FAILED;
+    }
+
+    /**
+     * 直接拉起系统安装器。
+     *
+     * 与 `install(PluginCall)` 的区别:这里没有 PluginCall,静默执行。
+     * 失败时只记日志 —— 此时用户可能已经切走了,弹错误没意义,
+     * 通知栏本身还有系统下载完成提示可以点。
+     */
+    private void launchInstall(long id) {
+        try {
+            DownloadManager manager =
+                (DownloadManager) getContext().getSystemService(Context.DOWNLOAD_SERVICE);
+            if (manager == null) return;
+
+            DownloadManager.Query q = new DownloadManager.Query().setFilterById(id);
+            String localUri = null;
+            try (Cursor c = manager.query(q)) {
+                if (c != null && c.moveToFirst()) {
+                    int idx = c.getColumnIndex(DownloadManager.COLUMN_LOCAL_URI);
+                    if (idx >= 0) localUri = c.getString(idx);
+                }
+            }
+            if (localUri == null) return;
+
+            File apk = new File(Uri.parse(localUri).getPath());
+            if (!apk.exists()) return;
+
+            Uri apkUri = FileProvider.getUriForFile(
+                getContext(), getContext().getPackageName() + ".fileprovider", apk);
+
+            Intent intent = new Intent(Intent.ACTION_VIEW);
+            intent.setDataAndType(apkUri, APK_MIME);
+            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
+            intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
+            getContext().startActivity(intent);
+        } catch (Exception e) {
+            android.util.Log.w(TAG, "自动安装失败", e);
+        }
+    }
+
     @PluginMethod
     public void install(PluginCall call) {
         String url = call.getString("url");
@@ -294,9 +358,30 @@ public class AppUpdatePlugin extends Plugin {
                 public void onReceive(Context context, Intent intent) {
                     long id = intent.getLongExtra(DownloadManager.EXTRA_DOWNLOAD_ID, -1);
                     if (id != downloadId) return;
-                    JSObject data = new JSObject();
-                    data.put("id", id);
-                    notifyListeners("downloadComplete", data);
+
+                    /*
+                     * 下载完成即安装(2026-11-23 用户反馈「下完了不自动装」)
+                     *
+                     * 原来这里只 notifyListeners 通知前端,指望前端收到事件再调 install()。
+                     * 实践中有三种情况会让它失效:
+                     *   · 用户把 App 切后台了 —— WebView 休眠,JS 事件不处理
+                     *   · 前端没订阅 listener(弹窗被关掉后组件已销毁)
+                     *   · 事件在 JS 还没注册好之前就发出去了
+                     * 结果就是包下好了躺在那里,用户以为更新失败了。
+                     *
+                     * 安装这一步纯属原生行为,交给系统在这直接做最可靠。
+                     * 先校验下载状态,确认真的成功了再拉起安装器,避免半截包报错。
+                     */
+                    int status = downloadStatus(id);
+                    if (status == DownloadManager.STATUS_SUCCESSFUL) {
+                        launchInstall(id);
+                    } else {
+                        /* 失败也让前端知道,好给用户提示 */
+                        JSObject data = new JSObject();
+                        data.put("id", id);
+                        data.put("status", status);
+                        notifyListeners("downloadComplete", data);
+                    }
                 }
             };
             IntentFilter filter = new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE);

+ 52 - 0
android/app/src/main/java/cn/fmode/app/MainActivity.java

@@ -30,6 +30,20 @@ public class MainActivity extends BridgeActivity {
         NativeSharePlugin.receiveIntent(this, getIntent());
 
         super.onCreate(savedInstanceState);
+
+        /*
+         * 沉浸式全屏(2026-11-23 用户要求「状态栏默认隐藏,让 App 显示更多」)
+         *
+         * 做法:content 延伸到状态栏和导航栏下面(edge-to-edge),
+         * 状态栏本身设为透明并保持可见但无底色 —— 这样既没有一条实心色带,
+         * 内容也能顶到最上沿。
+         *
+         * 为什么不用 fullscreen(彻底藏掉状态栏图标):
+         *   那样用户看不到时间/电量,且从顶部下拉需要额外的系统手势,
+         *   对一个 IM 类 App 是负面体验。透明沉浸是主流做法(微信/飞书同款)。
+         */
+        applyImmersiveLayout();
+
         /*
          * 开屏动画只在「真正冷启动」时播:进程被杀后从最近任务恢复
          * (savedInstanceState != null)属于回到原页面,不该再看一遍动画。
@@ -39,6 +53,44 @@ public class MainActivity extends BridgeActivity {
         }
     }
 
+    // ---------- 沉浸式布局(2026-11-23) ----------
+
+    /**
+     * 让内容延伸到状态栏/导航栏下方,并把状态栏设为透明。
+     *
+     * 关键点:
+     * · `setDecorFitsSystemWindows(false)` 是 Android 11+ 的现代写法,
+     *   让系统不再替我们「预留」状态栏高度的黑边。
+     * · STATUS_BAR_COLOR_VIEW 那两个旧 flag 是为兼容 Android 10 及以下,
+     *   一并用上,覆盖绝大多数机型。
+     * · 状态栏图标用深色(LIGHT_STATUS_BAR)—— App 是浅色底,
+     *   白色图标会看不见。深色模式下要让前端把它改回浅色,
+     *   所以这里不做死,交给前面板主题决定。
+     */
+    private void applyImmersiveLayout() {
+        if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.R) {
+            getWindow().setDecorFitsSystemWindows(false);
+        } else {
+            getWindow().getDecorView().setSystemUiVisibility(
+                View.SYSTEM_UI_FLAG_LAYOUT_STABLE
+                    | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
+                    | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION);
+        }
+        getWindow().setStatusBarColor(Color.TRANSPARENT);
+        getWindow().setNavigationBarColor(Color.TRANSPARENT);
+
+        /* 浅色底 → 状态栏图标用深色,否则白字白底看不见 */
+        if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.R) {
+            getWindow().getInsetsController().setSystemBarsAppearance(
+                android.view.WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS,
+                android.view.WindowInsetsController.APPEARANCE_LIGHT_STATUS_BARS);
+        } else {
+            getWindow().getDecorView().setSystemUiVisibility(
+                getWindow().getDecorView().getSystemUiVisibility()
+                    | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
+        }
+    }
+
     // ---------- 开屏动画(2026-11-23 二版:纯代码绘制) ----------
 
     /*

+ 73 - 16
android/app/src/main/java/cn/fmode/app/SplashAnimView.java

@@ -34,11 +34,23 @@ public class SplashAnimView extends View {
     public interface OnEndListener { void onEnd(); }
 
     private static final long DURATION_MS = 2100;
-    // 阶段边界(0..1)
-    private static final float DRAW_END = 0.38f;      // 描边生长完成
-    private static final float FILL_START = 0.30f;    // 填充开始出现
-    private static final float FILL_FULL = 0.55f;     // 填充不再透明
-    private static final float SWEEP_END = 0.72f;     // 渐变扫到位 & 描边完全淡出
+    /*
+     * 阶段边界(0..1)—— 2026-11-23 用户反馈「图压在歪线的上面特别丑」
+     *
+     * 原来是重叠的:描边 0.38 才画完,填充 0.30 就开始,必然有一段时间
+     * 彩色填充盖在还没走完的线条上,看起来像两套图形打架。
+     *
+     * 现在改成严格顺序,三段不重叠:
+     *   0.00 → 0.45  只画笔画(线条一笔一笔长出来)
+     *   0.45 → 0.58  笔画淡出(线条消失,画面短暂留白)
+     *   0.58 → 0.88  填充淡入 + 渐变扫过(图在干净的画面上出现)
+     *   0.88 → 1.00  留一点时间让人看清完整标志
+     */
+    private static final float DRAW_END = 0.45f;      // 描边生长完成
+    private static final float STROKE_OUT_END = 0.58f; // 描边完全淡出(此前不动填充)
+    private static final float FILL_START = 0.58f;     // 填充开始(描边已淡出)
+    private static final float FILL_FULL = 0.90f;      // 填充完全成型
+    private static final float SWEEP_END = 0.90f;      // 渐变扫到位
 
     /*
      * 轮廓点:从 logo-mark.png(512×512 带透明通道)提取的 4 个外轮廓,
@@ -88,22 +100,64 @@ public class SplashAnimView extends View {
         float dy = h * 0.44f - s / 2f;
         bounds.set(dx, dy, dx + s, dy + s);
         for (int i = 0; i < CONTOURS.length; i++) {
-            float[] pts = CONTOURS[i];
-            Path p = new Path();
-            p.moveTo(dx + pts[0] * s, dy + pts[1] * s);
-            for (int j = 2; j + 1 < pts.length; j += 2) {
-                p.lineTo(dx + pts[j] * s, dy + pts[j + 1] * s);
-            }
-            p.close();
+            /*
+             * 用 Catmull-Rom 转三次贝塞尔平滑(2026-11-23 用户反馈「线条歪扭、颗粒度差」)。
+             *
+             * 原因:原来对 50~60 个轮廓点逐个 lineTo 直线连接,
+             *       点是从 PNG 边缘提取的,本身就带像素锯齿,
+             *       直线段一多,曲线就变成一堆折线,放大后歪歪扭扭。
+             * 改法:把相邻点当成样条控制点,用 cubicTo 画平滑曲线,
+             *       曲线穿过所有原点(Catmull-Rom 插值特性),只抹掉折角不改形状。
+             */
+            Path p = crClosedPath(CONTOURS[i], dx, dy, s);
             paths[i] = p;
             lengths[i] = new PathMeasure(p, false).getLength();
         }
-        strokePaint.setStrokeWidth(s * 0.012f);
+        strokePaint.setStrokeWidth(Math.max(1.5f, s * 0.010f));
         gradient = new LinearGradient(bounds.left, bounds.bottom, bounds.right, bounds.top,
                 GRADIENT_COLORS, GRADIENT_POS, Shader.TileMode.CLAMP);
         fillPaint.setShader(gradient);
     }
 
+    /**
+     * 把归一化点序列转成平滑闭合曲线(Catmull-Rom → 三次贝塞尔)。
+     *
+     * 每段 P1→P2 用控制点
+     *   c1 = P1 + (P2 − P0) / 6
+     *   c2 = P2 − (P3 − P1) / 6
+     * 其中 P0/P3 是前后相邻点(首尾环绕,保证闭合处也平滑)。
+     * 这样曲线经过每个原始点,但不出现折角。
+     */
+    private static Path crClosedPath(float[] pts, float dx, float dy, float s) {
+        int n = pts.length / 2;
+        Path p = new Path();
+        if (n < 3) return p;
+
+        float[] x = new float[n];
+        float[] y = new float[n];
+        for (int i = 0; i < n; i++) {
+            x[i] = dx + pts[i * 2] * s;
+            y[i] = dy + pts[i * 2 + 1] * s;
+        }
+
+        p.moveTo(x[0], y[0]);
+        for (int i = 0; i < n; i++) {
+            int i0 = (i - 1 + n) % n;
+            int i1 = i;
+            int i2 = (i + 1) % n;
+            int i3 = (i + 2) % n;
+
+            float c1x = x[i1] + (x[i2] - x[i0]) / 6f;
+            float c1y = y[i1] + (y[i2] - y[i0]) / 6f;
+            float c2x = x[i2] - (x[i3] - x[i1]) / 6f;
+            float c2y = y[i2] - (y[i3] - y[i1]) / 6f;
+
+            p.cubicTo(c1x, c1y, c2x, c2y, x[i2], y[i2]);
+        }
+        p.close();
+        return p;
+    }
+
     @Override
     protected void onAttachedToWindow() {
         super.onAttachedToWindow();
@@ -134,11 +188,14 @@ public class SplashAnimView extends View {
         float t = progress;
         // ① 描边生长(ease-out:起笔快、收笔稳)
         float drawT = easeOut(clamp(t / DRAW_END));
-        // ② 填充:透明度过渡 + 渐变沿对角线扫入
+        /*
+         * ② 描边淡出:在 DRAW_END → STROKE_OUT_END 之间归零。
+         *    这段区间内不画填充,让线条干干净净地消失。
+         */
+        float strokeAlpha = 1f - clamp((t - DRAW_END) / (STROKE_OUT_END - DRAW_END));
+        // ③ 填充:描边完全消失后才开始(FILL_START == STROKE_OUT_END)
         float fillT = clamp((t - FILL_START) / (FILL_FULL - FILL_START));
         float sweepT = clamp((t - FILL_START) / (SWEEP_END - FILL_START));
-        // ③ 描边在填充成型后淡出
-        float strokeAlpha = 1f - clamp((t - FILL_FULL) / (SWEEP_END - FILL_FULL));
 
         if (fillT > 0f && gradient != null) {
             gradMatrix.setTranslate(

+ 1 - 1
prototypes/fmode-download-20261120/index.html

@@ -189,7 +189,7 @@
 
   <dialog class="download-dialog" id="downloadDialog" aria-labelledby="dialogTitle" aria-describedby="dialogDescription"><button class="dialog-close icon-button" id="dialogClose" aria-label="关闭下载提示"><svg class="icon"><use href="#i-close"/></svg></button><span class="dialog-symbol"><svg class="icon"><use href="#i-down"/></svg></span><p class="eyebrow mono">A NEW CHAPTER, SOON.</p><h2 id="dialogTitle">精彩,即将开启。</h2><p id="dialogDescription">Android 安装包下载链接正在准备中。<br>地址接入后,就可以从这里获取 Fmode。</p><button class="button" id="dialogConfirm">期待下一步 <svg class="icon"><use href="#i-arrow"/></svg></button><span class="dialog-foot mono">FMODE / ANDROID</span></dialog>
   <script>// 填入 apkUrl 即可开放下载;版本信息等字段按需提供。channel 为渠道标注(如「测试版」),可空。
-const FMODE_SITE = { apkUrl: 'https://ai.fmode.cn/download/fmode-app-v1.0.apk', version: '1.0', fileSize: '9.9 MB', updatedAt: '2026-11-23', channel: '测试版' };
+const FMODE_SITE = { apkUrl: 'https://ai.fmode.cn/download/fmode-app-v1.0.3.apk', version: '1.0.3', fileSize: '13.5 MB', updatedAt: '2026-11-23', channel: '测试版' };
 const header = document.getElementById('header');
 const menuToggle = document.getElementById('menuToggle');
 const navLinks = document.getElementById('navLinks');

+ 1 - 1
prototypes/fmode-download-20261120/site.js

@@ -1,5 +1,5 @@
 // 填入 apkUrl 即可开放下载;版本信息等字段按需提供。channel 为渠道标注(如「测试版」),可空。
-const FMODE_SITE = { apkUrl: 'https://ai.fmode.cn/download/fmode-app-v1.0.apk', version: '1.0', fileSize: '9.9 MB', updatedAt: '2026-11-23', channel: '测试版' };
+const FMODE_SITE = { apkUrl: 'https://ai.fmode.cn/download/fmode-app-v1.0.3.apk', version: '1.0.3', fileSize: '13.5 MB', updatedAt: '2026-11-23', channel: '测试版' };
 const header = document.getElementById('header');
 const menuToggle = document.getElementById('menuToggle');
 const navLinks = document.getElementById('navLinks');

+ 8 - 1
src/app/mobile/components/m-app-bar/m-app-bar.ts

@@ -68,7 +68,14 @@ import { ChangeDetectionStrategy, Component, computed, input, output } from '@an
          *     高度 = 60 + safe-top,其中 60 里含真实的按钮行,不再有第二份留白。
          */
         min-height: var(--mob-navbar-h);
-        padding: var(--mob-safe-top) var(--sp-4) 0;
+        /*
+         * 2026-11-23 三修:状态栏占位再收 4px。
+         *
+         * 现在窗口是沉浸式(内容延伸到状态栏下面),顶栏背景本身就铺到了屏幕最上沿,
+         * 状态栏图标直接浮在这层背景上。所以不需要再留完整的 safe-top 高度,
+         * 留 safe-top - 4px 就够图标不压到标题。
+         */
+        padding: calc(var(--mob-safe-top) - 4px) var(--sp-4) 0;
         box-sizing: content-box;
         position: relative;
         z-index: var(--z-affix);

+ 32 - 16
src/app/mobile/components/m-project-switcher/m-project-switcher.ts

@@ -29,12 +29,12 @@ const ORPHAN_PROJECT_ID = '__orphan__';
         aria-label="选择项目并切换对话"
         (click)="openPicker()"
       >
-        <i class="fa-regular fa-folder-open" aria-hidden="true"></i>
-        <span class="m-project-name">{{ currentWorkspace()?.name ?? '选择项目' }}</span>
         <!--
-          2026-11-23 用户反馈:这里原来还有「切换」两个字 + 箭头,太占地方。
-          箭头本身已经表达了「可点、可展开」,去掉冗余文字后项目名能显示更完整。
+          2026-11-23 二次精简:去掉文件夹图标和「切换」二字。
+          一行里视觉元素越少,项目名能占的宽度越多,也越不像个「按钮」。
+          箭头保留 —— 它是唯一表达「可展开」的信号。
         -->
+        <span class="m-project-name">{{ currentWorkspace()?.name ?? '选择项目' }}</span>
         <i class="fa-solid fa-chevron-right m-project-chevron" aria-hidden="true"></i>
       </button>
     </div>
@@ -223,29 +223,45 @@ const ORPHAN_PROJECT_ID = '__orphan__';
       /* 工具行里空间紧张,去掉「当前项目」这层标签,只留可点的触发器 */
       .m-project-context { flex: none; color: var(--muted); font-size: var(--fs-12); }
       .m-project-entry:not(.is-standalone) .m-project-context { display: none; }
+      /*
+       * 项目切换触发器(2026-11-23 二次美化)
+       *
+       * 用户反馈:外圈边框 + padding 让容器显得又厚又复杂,项目名在手机上显示不全。
+       *
+       * 改法:
+       *   1. 去掉 border 和外圈 —— 它本来就是个轻入口,不需要看起来像个按钮
+       *   2. 去掉左右 padding,只留 gap,把宽度全部让给项目名
+       *   3. flex 从 1 改 auto:不再和附件按钮抢空间,内容多宽就占多宽
+       *   4. 高度收到 32px 与图标对齐,不再是 44px 的厚块
+       *
+       * 触摸热区仍由工具行的行高兜底(整行可点区域 > 44px),
+       * 所以收窄视觉盒不影响可点性。
+       */
       .m-project-trigger {
         display: flex;
-        flex: 1;
+        flex: 0 1 auto;
         align-items: center;
-        gap: var(--sp-2);
+        gap: 5px;
         min-width: 0;
-        min-height: 44px;
-        padding: 0 var(--sp-3);
-        border: 1px solid var(--edge);
+        max-width: 100%;
+        height: 28px;
+        padding: 0;
+        border: 0;
         border-radius: var(--r-tag);
-        background: var(--surface);
-        color: var(--ink-2);
+        background: none;
+        color: var(--muted);
         font: inherit;
         font-size: var(--fs-13);
         cursor: pointer;
       }
-      .m-project-trigger.is-set { border-color: color-mix(in srgb, var(--primary) 35%, var(--edge)); color: var(--primary); }
+      .m-project-trigger:active { opacity: 0.55; }
+      .m-project-trigger.is-set { color: var(--primary); }
       /*
-       * 项目名:去掉「切换」二字后可以占满剩余宽度(2026-11-23)。
-       * 原来 max-width 卡得比较紧,长项目名被截得只剩几个字。
+       * 项目名:允许收缩并省略,但优先给它宽度 ——
+       * 去掉容器 padding 后,同样的屏幕能多显示 4~6 个汉字。
        */
-      .m-project-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; min-width: 0; }
-      .m-project-chevron { color: var(--muted); font-size: var(--fs-10); flex: none; }
+      .m-project-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1 1 auto; }
+      .m-project-chevron { color: var(--muted); font-size: var(--fs-10); flex: none; opacity: .6; }
       .m-project-root { position: fixed; inset: 0; z-index: var(--z-modal); display: flex; align-items: flex-end; }
       .m-project-mask { position: absolute; inset: 0; border: 0; background: var(--overlay); }
       .m-project-sheet {

+ 58 - 11
src/app/mobile/components/m-update-dialog/m-update-dialog.ts

@@ -27,29 +27,42 @@ import { AppInstallService } from '../../../core/app-install.service';
           @if (install.state().status === 'downloading') {
             <!-- ───────── 下载中 ───────── -->
             <div class="m-update-head">
-              <h3 id="upd-title">正在下载更新</h3>
+              <h3 id="upd-title">{{ downloadHeadline() }}</h3>
               <p class="m-update-ver">{{ u.version }}</p>
             </div>
 
-            <div class="m-progress-wrap">
-              <div class="m-progress-bar">
-                <div class="m-progress-fill"
-                     [style.width.%]="install.state().progress >= 0 ? install.state().progress : 0">
+            <!--
+              进度显示(2026-11-23 用户反馈「进度条不动,很鸡肋」)
+              
+              原来无论拿不拿得到进度都画一条进度条,
+              拿不到时就是一条永远 0% 的死条,看着像卡死。
+              现在:真有进度才画进度条,拿不到就不画,
+              改成给一句明确的「后台下载中,点确认即可」,不让用户盯着静止的条猜。
+            -->
+            @if (hasProgress()) {
+              <div class="m-progress-wrap">
+                <div class="m-progress-bar">
+                  <div class="m-progress-fill" [style.width.%]="install.state().progress"></div>
+                </div>
+                <div class="m-progress-meta">
+                  <span>{{ progressText() }}</span>
+                  <span>{{ percentText() }}</span>
                 </div>
               </div>
-              <div class="m-progress-meta">
-                <span>{{ progressText() }}</span>
-                <span>{{ percentText() }}</span>
+            } @else {
+              <div class="m-download-note">
+                <i class="fa-solid fa-cloud-arrow-down" aria-hidden="true"></i>
+                <span>安装包正在后台下载,完成后会自动弹出安装</span>
               </div>
-            </div>
+            }
 
             <p class="m-update-hint">
-              下载会在后台继续,可以先把 App 放到一边。下载完成后会自动弹出安装。
+              下载会在后台继续,可以先把 App 放到一边。
             </p>
 
             @if (!u.isForce) {
               <button type="button" class="m-btn m-btn-ghost" (click)="close()">
-                后台继续,先不看
+                知道了,后台继续
               </button>
             }
           } @else {
@@ -174,6 +187,24 @@ import { AppInstallService } from '../../../core/app-install.service';
     }
     .m-update-log p:last-child { margin-bottom: 0; }
 
+    /*
+     * 无进度时的说明条(2026-11-23)
+     * 替代那条永远 0% 的死进度条 —— 给确定的信息,不让用户盯着静止的条猜。
+     */
+    .m-download-note {
+      display: flex;
+      align-items: center;
+      gap: 10px;
+      margin-bottom: 18px;
+      padding: 14px 16px;
+      border-radius: 12px;
+      background: var(--surface-2, #F3F5F9);
+      color: var(--ink-2, #4A5568);
+      font-size: 13px;
+      line-height: 1.5;
+    }
+    .m-download-note i { flex: none; color: var(--accent, #3B82F6); font-size: 15px; }
+
     .m-progress-wrap { margin-bottom: 18px; }
     .m-progress-bar {
       height: 8px;
@@ -264,6 +295,22 @@ export class UpdateDialogComponent implements OnInit {
     await this.update.check();
   }
 
+  /**
+   * 是否真的有可用进度(2026-11-23)
+   *
+   * DownloadManager 在部分 ROM 上长时间不给 total(total = -1),
+   * 这时画进度条只能画 0%,看起来像卡死。没有真实比例就不画。
+   */
+  protected hasProgress(): boolean {
+    const s = this.install.state();
+    return s.progress >= 0 && s.total > 0;
+  }
+
+  /** 下载中的标题:有进度说「正在下载」,没进度说「后台下载中」 */
+  protected downloadHeadline(): string {
+    return this.hasProgress() ? '正在下载更新' : '后台下载中';
+  }
+
   /** 下载中显示:已下载 / 总量 */
   progressText(): string {
     const s = this.install.state();