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

@@ -266,14 +266,15 @@ export const enDict: Dict = {
backToHome: "Back to Home",
inAppDownloadTitle: "Please open in your system browser to download",
inAppDownloadIntro:
"Your current in-app browser cannot download files. Open the page in your system browser (Safari, Chrome, etc.) and tap download again.",
"Your current in-app browser cannot download files. Copy the link below and open it in your system browser — the file will save directly.",
inAppDownloadIntroNamed:
"{browser} cannot download files directly. Open the page in your system browser (Safari, Chrome, etc.) and tap download again.",
inAppDownloadStepCopy: "Tap “Copy link” below.",
"{browser} cannot download files directly. Copy the link below and open it in your system browser — the file will save directly.",
inAppDownloadStepCopy:
'Tap "Copy link" below — that is the direct file download URL.',
inAppDownloadStepOpen:
"Open the menu (top-right), choose “Open in browser”, and paste the link if needed.",
"Open your system browser (Safari, Chrome, etc.) and paste the link into the address bar.",
inAppDownloadStepDownload:
"Tap the download button on the page — the file will save to your downloads.",
"The file will start downloading to your downloads folder automatically.",
inAppDownloadCopied: "Link copied",
inAppDownloadCopyFail: "Could not copy the link, please copy it manually",
};