Files
Arcrun/console-ui/public/config.js
T
cloud-worker c93ed6f0f7 fix(t72): portal 下載頁依作業系統分流(原本寫死「下載 Mac 版」)
leo 07-27 交辦第①件的一部分。B 類(改 Arcrun 本體 UI)→ **待 leo 審**,未合併。

問題:進站完成安裝清單只給「下載 Mac 版」,Windows 用戶按下去拿到 .app 的 zip,
打不開也不知道為什麼。

改動(console-ui/public/portal/index.html):
- 新增 detectOS():優先 navigator.userAgentData.platform(不受 UA 凍結影響),
  退回 platform/userAgent;iPadOS 自稱 Macintosh 用 maxTouchPoints 排除。
  **認不出來就不猜**,兩個連結都給(同「按了連到錯的機制=不友善」判準)。
- 主按鈕依 OS 換字(下載 Windows 版/Mac 版)+另一系統的小字連結。
- 首開提示依 OS 換:Windows=SmartScreen「其他資訊→仍要執行」白話說明;
  Mac=原本的右鍵→打開。
- Windows zip **尚未上鏡像**(交叉編譯已通、真機未驗)→ 沒設 config.daemonDownloadWin
  時誠實顯示「Windows 版封測驗證中」,不放 404 連結;Windows 用戶仍可改抓 Mac 版或手動打勾。
- config.js 補註解說明 daemonDownload / daemonDownloadWin 兩個 key。

驗證:console-ui/test/portal-os-split.test.mjs(自帶,node 直接跑)——
8 種 navigator 情境全過(Win Chrome/舊 Firefox、mac Safari/Chrome、iPad、Linux、Android、空值),
並印出三種 OS 各自的實際文案;index.html 主 script 區塊 node --check 語法通過。
⚠️ 未在真瀏覽器點過(沙箱無 portal session),故標待審不標完成。
2026-07-27 09:57:52 +00:00

7 lines
524 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Arcrun UI runtime 組態——改這一行就能切 API 目標,不必重新 build。
// 可選 keyt72):
// daemonDownload ── 同步小幫手 Mac 版 zip 網址(省略=用 index.html 內建的鏡像網址)
// daemonDownloadWin ── Windows 版 zip 網址。**真機驗過、zip 上鏡像之後才填**;
// 沒填時下載頁會誠實顯示「Windows 版封測驗證中」而不是給一個 404 連結。
window.ARCRUN_CONFIG = { apiBase: "https://cypher.arcrun.dev" };