fix: use absolute URL in in-app download guide
All checks were successful
Deploy Staging (terry-wallet-login) / deploy (push) Successful in 1m10s

Production builds the frontend with VITE_API_URL="" so attachmentDownloadUrl() returns a relative path like /apnew/api/.../download. Pasting that into Safari from another origin fails. Convert the URL to an absolute one (window.location.origin + path) before showing it in the in-app browser guide, and update the modal text in all 7 locales to make clear the copied link is the direct file download URL that, when opened in the system browser, triggers the download automatically.
This commit is contained in:
TerryM
2026-06-05 19:10:44 +08:00
parent 7a33a62c8f
commit 356d8a0207
8 changed files with 52 additions and 41 deletions

View File

@@ -264,14 +264,14 @@ export const viDict: Dict = {
backToHome: "Về trang chủ",
inAppDownloadTitle: "Vui lòng mở bằng trình duyệt hệ thống để tải",
inAppDownloadIntro:
"Trình duyệt trong ứng dụng hiện tại không thể tải tệp. Hãy mở trang trong trình duyệt hệ thống (Safari, Chrome…) rồi nhấn tải lại.",
"Trình duyệt trong ứng dụng hiện tại không thể tải tệp. Sao chép liên kết bên dưới và mở trong trình duyệt hệ thống — tệp sẽ tự động tải về.",
inAppDownloadIntroNamed:
"{browser} không thể tải tệp trực tiếp. Hãy mở trang trong trình duyệt hệ thống (Safari, Chrome…) rồi nhấn tải lại.",
inAppDownloadStepCopy: "Nhấn “Sao chép liên kết” bên dưới.",
"{browser} không thể tải tệp trực tiếp. Sao chép liên kết bên dưới và mở trong trình duyệt hệ thống — tệp sẽ tự động tải về.",
inAppDownloadStepCopy:
'Nhấn "Sao chép liên kết" bên dưới (đây là URL tải tệp trực tiếp).',
inAppDownloadStepOpen:
"Mở menu ở góc trên bên phải, chọn “Mở bằng trình duyệt”, dán liên kết nếu cần.",
inAppDownloadStepDownload:
"Trong trình duyệt hệ thống, nhấn lại nút tải để lưu tệp.",
"Mở trình duyệt hệ thống (Safari, Chrome…) và dán liên kết vào thanh địa chỉ.",
inAppDownloadStepDownload: "Tệp sẽ tự động tải xuống thư mục Tải về.",
inAppDownloadCopied: "Đã sao chép liên kết",
inAppDownloadCopyFail: "Không sao chép được, vui lòng tự sao chép",
};