fix(events): fix share/open-in-new-tab URL construction
This commit is contained in:
parent
9071670ad9
commit
8f1994d9d3
1 changed files with 11 additions and 11 deletions
|
|
@ -1310,7 +1310,7 @@ export async function handleTrackAction(
|
|||
// Use stored href from card if available, otherwise construct URL
|
||||
const contextMenu = document.getElementById('context-menu');
|
||||
const storedHref = contextMenu?._contextHref;
|
||||
const url = getShareUrl(storedHref ? storedHref : `/track/${item.id || item.uuid}`);
|
||||
const url = getShareUrl(storedHref ? storedHref : `/${type}/${item.id || item.uuid}`);
|
||||
|
||||
trackCopyLink(type, item.id || item.uuid);
|
||||
navigator.clipboard.writeText(url).then(() => {
|
||||
|
|
@ -1322,7 +1322,7 @@ export async function handleTrackAction(
|
|||
const storedHref = contextMenu?._contextHref;
|
||||
const url = storedHref
|
||||
? `${window.location.origin}${storedHref}`
|
||||
: `${window.location.origin}/track/${item.id || item.uuid}`;
|
||||
: `${window.location.origin}/${type}/${item.id || item.uuid}`;
|
||||
|
||||
trackOpenInNewTab(type, item.id || item.uuid);
|
||||
window.open(url, '_blank');
|
||||
|
|
|
|||
Loading…
Reference in a new issue