feat(downloads): share UI — user picker + public watch links + watch page

Rework the share dialog into two clear modes and add the public /watch player page:
- ShareDialog: (A) 'Share with a user' — autocomplete picker over registered users (was a blind
  email box that 404'd on non-users); (B) 'Share a link' — create/list/copy/revoke public links
  with allow-download toggle, optional expiry (1/7/30d), optional password; per-link view count.
- WatchPage: standalone login-free player at /watch/<token> (routed in main.tsx like /privacy),
  self-contained mini-i18n (en/hu/de by browser language); password gate → unlock → play; shows a
  Download button only when the link allows it.
- api: ShareLink/ShareRecipient types + link CRUD + recipients; share i18n (en/hu/de).
Verified end-to-end in a real browser: user picker, link create, public playback, stream-only vs
downloadable, password gate + unlock, no console errors.
This commit is contained in:
npeter83 2026-07-04 04:32:31 +02:00
parent d672583830
commit 391b8fda33
8 changed files with 543 additions and 38 deletions

View file

@ -81,7 +81,30 @@
"label": "E-Mail des Empfängers",
"placeholder": "user@example.com",
"submit": "Teilen",
"done": "Geteilt mit {{email}}"
"done": "Geteilt mit {{email}}",
"failed": "Teilen fehlgeschlagen.",
"userSection": "Mit einem Nutzer teilen",
"userHint": "Erscheint bei ihm unter „Mit mir geteilt”.",
"pickPlaceholder": "Nutzer suchen…",
"noUsers": "Keine weiteren Nutzer.",
"linkSection": "Per Link teilen",
"linkHint": "Jeder mit dem Link kann zusehen — ohne Konto.",
"noLinks": "Noch keine Links.",
"newLink": "Link erstellen",
"createLink": "Erstellen",
"allowDownload": "Download erlauben",
"expiry": "Läuft ab",
"expiryNever": "Nie",
"days": "{{n}} Tage",
"password": "Passwort (optional)",
"copy": "Link kopieren",
"copyFailed": "Kopieren fehlgeschlagen.",
"revoke": "Widerrufen",
"revokeConfirm": "Der Link funktioniert sofort nicht mehr.",
"views": "{{n}} Aufrufe",
"expiresOn": "läuft ab {{date}}",
"hasPassword": "Passwort",
"downloadable": "herunterladbar"
},
"confirm": {
"cancelTitle": "Download abbrechen?",

View file

@ -81,7 +81,30 @@
"label": "Recipient email",
"placeholder": "user@example.com",
"submit": "Share",
"done": "Shared with {{email}}"
"done": "Shared with {{email}}",
"failed": "Couldnt share.",
"userSection": "Share with a user",
"userHint": "Theyll find it under “Shared with me”.",
"pickPlaceholder": "Search a user…",
"noUsers": "No other users yet.",
"linkSection": "Share a link",
"linkHint": "Anyone with the link can watch — no account needed.",
"noLinks": "No links yet.",
"newLink": "Create a link",
"createLink": "Create link",
"allowDownload": "Allow download",
"expiry": "Expires",
"expiryNever": "Never",
"days": "{{n}} days",
"password": "Password (optional)",
"copy": "Copy link",
"copyFailed": "Couldnt copy.",
"revoke": "Revoke",
"revokeConfirm": "This link will stop working immediately.",
"views": "{{n}} views",
"expiresOn": "expires {{date}}",
"hasPassword": "password",
"downloadable": "downloadable"
},
"confirm": {
"cancelTitle": "Cancel download?",

View file

@ -81,7 +81,30 @@
"label": "Címzett e-mail címe",
"placeholder": "user@example.com",
"submit": "Megosztás",
"done": "Megosztva vele: {{email}}"
"done": "Megosztva vele: {{email}}",
"failed": "A megosztás nem sikerült.",
"userSection": "Megosztás felhasználóval",
"userHint": "A „Velem megosztott” fülön találja meg.",
"pickPlaceholder": "Keress egy felhasználót…",
"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.",
"noLinks": "Még nincs link.",
"newLink": "Link létrehozása",
"createLink": "Létrehozás",
"allowDownload": "Letöltés engedélyezése",
"expiry": "Lejárat",
"expiryNever": "Soha",
"days": "{{n}} nap",
"password": "Jelszó (opcionális)",
"copy": "Link másolása",
"copyFailed": "Nem sikerült a másolás.",
"revoke": "Visszavonás",
"revokeConfirm": "A link azonnal használhatatlanná válik.",
"views": "{{n}} megtekintés",
"expiresOn": "lejár: {{date}}",
"hasPassword": "jelszó",
"downloadable": "letölthető"
},
"confirm": {
"cancelTitle": "Megszakítod a letöltést?",