Android visitors are offered the Linux .deb on cap.so's homepage and download page

未關閉 適合新手
#3,677 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

@patrickballard 已經在處理了。

開始於 2026年11月3日。

  • #3678 來自 @patrickballard —— 未關閉

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
78/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
nextjs, react, typescript
領域
frontend

研究方向

從 apps/web/hooks/useDetectPlatform.ts 開始,這裡會把任何包含 "Linux" 的 user agent 歸類為桌面版 Linux。接著檢查首頁按鈕與下載頁面,兩者都會讀取這個 hook 的結果,並連結到 /download/linux-deb。完成的標準是:像 Pixel 8 範例那樣的 Android user agent 不再被辨識為 Linux,而 iPhone 與無法辨識的 user agent 維持原有的預設值。在 Chrome 開發者工具中將 user agent 覆寫為 Android 進行驗證。

由索引模型根據 Issue 內容生成。

描述

Description

useDetectPlatform (apps/web/hooks/useDetectPlatform.ts) treats any user agent containing "Linux" as desktop Linux. Android browsers include "Linux" in theirs (Mozilla/5.0 (Linux; Android 14; Pixel 8) ...), so on an Android phone or tablet:

  • the homepage's main button reads "Download free for Linux" and links to /download/linux-deb;
  • the download page's main button has the Linux logo, links to /download/linux-deb, and is captioned "Linux x86_64 • .deb, AppImage, RPM and Arch available".

Tapping either downloads the desktop Linux package to the phone. iPhones and other unrecognised devices get the site's default instead: the macOS app on the homepage, and a generic "Download Cap" on the download page.

Reproduction
  1. Open cap.so in Chrome on an Android phone, or in desktop Chrome with device emulation set to an Android device such as a Pixel 8.
  2. The homepage's main button reads "Download free for Linux".
  3. On cap.so/download, the main button has the Linux logo and links to /download/linux-deb.
cap.so homepage in Chrome's Android emulation (Pixel 8): the main button reads Download free for Linux
Expected

Android isn't treated as desktop Linux, so it isn't offered the Linux package.

主要語言
Rust
星號
24.2k
分支
2.2k
平均合併
1 天 9 小時
30 天內合併 PR
731

環境準備

  • 提供 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

CapSoftware/Cap 的其他 Issue

查看 CapSoftware/Cap 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。