feat(downloads): one-click Share + downloadable-by-default links (E7 S3)

D2-A: the library row's Share button becomes a single action — quickShareLink()
ensures a public link (minting on demand), copies it to the clipboard, and toasts
with an "Open in new tab" action. A copy failure still toasts (warning) with that
action so the link is never a dead end. Advanced controls (password/expiry/revoke/
user-ACL) stay in the existing ShareDialog, reached via a new "Manage sharing" row
button.

D1 (forward-only): CreateLinkIn.allow_download defaults to true, so a newly minted
link is downloadable by default. The default lives in the API, not a migration —
the download_links column default stays false, so no existing link flips. The
ShareDialog create-default is flipped to match.

Tests: TestCreateLinkDefault (default true; explicit false honored); 4 vitest cases
for quickShareLink (mint-vs-reuse, copy ok/fail, create failure). HU/EN parity.
This commit is contained in:
2026-08-29 06:36:07 +02:00
parent 94fcc40bde
commit fdca12968b
8 changed files with 202 additions and 8 deletions
+5 -1
View File
@@ -58,7 +58,8 @@
"download": "Save to my device",
"rename": "Rename",
"editDetails": "Edit details",
"share": "Share",
"share": "Share (copy link)",
"shareManage": "Manage sharing",
"edit": "Edit / trim",
"redownload": "Re-download (rebuild file)",
"removeShared": "Remove from my list"
@@ -104,6 +105,9 @@
"noUsers": "No other users yet.",
"linkSection": "Share a link",
"linkHint": "Anyone with the link can watch — no account needed.",
"linkCopied": "Share link copied to clipboard",
"openNewTab": "Open in new tab",
"linkFailed": "Couldn’t create the share link",
"noLinks": "No links yet.",
"newLink": "Create a link",
"createLink": "Create link",
+5 -1
View File
@@ -58,7 +58,8 @@
"download": "Mentés a gépemre",
"rename": "Átnevezés",
"editDetails": "Adatok szerkesztése",
"share": "Megosztás",
"share": "Megosztás (link másolása)",
"shareManage": "Megosztás kezelése",
"edit": "Szerkesztés / vágás",
"redownload": "Újraletöltés (fájl újraépítése)",
"removeShared": "Eltávolítás a listámból"
@@ -104,6 +105,9 @@
"noUsers": "Nincs más felhasználó.",
"linkSection": "Megosztás linkkel",
"linkHint": "A link birtokában bárki megnézheti — fiók nélkül is.",
"linkCopied": "Megosztási link a vágólapra másolva",
"openNewTab": "Megnyitás új lapon",
"linkFailed": "Nem sikerült a megosztási link létrehozása",
"noLinks": "Még nincs link.",
"newLink": "Link létrehozása",
"createLink": "Létrehozás",