From 17695aefdefa3f957bc119564e50920afa5b7fb7 Mon Sep 17 00:00:00 2001 From: Pas <74743263+Pasithea0@users.noreply.github.com> Date: Mon, 2 Jun 2025 13:21:53 -0600 Subject: [PATCH] update minor watch link copy --- src/assets/locales/en.json | 7 +++---- src/components/player/atoms/settings/WatchPartyView.tsx | 9 ++++++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/assets/locales/en.json b/src/assets/locales/en.json index ea79e2ca..df057c2d 100644 --- a/src/assets/locales/en.json +++ b/src/assets/locales/en.json @@ -200,8 +200,6 @@ "details": { "resume": "Resume", "play": "Play", - "director": "Director:", - "cast": "Cast:", "runtime": "Runtime:", "language": "Language:", "releaseDate": "Release Date:", @@ -977,7 +975,7 @@ "aheadOfHost": "Ahead of host by {{seconds}} seconds", "showStatusOverlay": "Show status overlay", "leaveWatchParty": "Leave Watch Party", - "shareCode": "Share this code with friends (click to copy)", + "shareCode": "Share this code with friends (click to copy link)", "connectedAsGuest": "Connected to watch party as guest", "hostParty": "Host a Watch Party", "joinParty": "Join a Watch Party", @@ -990,6 +988,7 @@ "invalidRoom": "Unable to connect to this room", "contentMismatch": "Cannot join watch party: The content does not match the host's content.", "episodeMismatch": "Cannot join watch party: You are watching a different episode than the host.", - "validating": "Validating watch party..." + "validating": "Validating watch party...", + "linkCopied": "Copied!" } } diff --git a/src/components/player/atoms/settings/WatchPartyView.tsx b/src/components/player/atoms/settings/WatchPartyView.tsx index cb2320ef..a9dc903f 100644 --- a/src/components/player/atoms/settings/WatchPartyView.tsx +++ b/src/components/player/atoms/settings/WatchPartyView.tsx @@ -27,6 +27,7 @@ export function WatchPartyView({ id }: { id: string }) { const [backendName, setBackendName] = useState(""); const [editingCode, setEditingCode] = useState(false); const [customCode, setCustomCode] = useState(""); + const [hasCopiedShare, setHasCopiedShare] = useState(false); const backendUrl = useBackendUrl(); const [isValidating, setIsValidating] = useState(false); const [validationError, setValidationError] = useState(null); @@ -162,6 +163,8 @@ export function WatchPartyView({ id }: { id: string }) { const url = new URL(window.location.href); url.searchParams.set("watchparty", roomCode); navigator.clipboard.writeText(url.toString()); + setHasCopiedShare(true); + setTimeout(() => setHasCopiedShare(false), 2000); } }; @@ -268,7 +271,11 @@ export function WatchPartyView({ id }: { id: string }) { { if (e.target instanceof HTMLInputElement) {