fix track right clicks
This commit is contained in:
parent
98b65509ea
commit
cc2f28a798
1 changed files with 6 additions and 4 deletions
|
|
@ -1317,10 +1317,12 @@ export async function handleTrackAction(
|
||||||
showNotification('Link copied to clipboard!');
|
showNotification('Link copied to clipboard!');
|
||||||
});
|
});
|
||||||
} else if (action === 'open-in-new-tab') {
|
} else if (action === 'open-in-new-tab') {
|
||||||
// Use stored href from card if available, otherwise construct URL
|
// Use stored href from card if available and not a track, otherwise construct URL
|
||||||
const contextMenu = document.getElementById('context-menu');
|
const contextMenu = document.getElementById('context-menu');
|
||||||
const storedHref = contextMenu?._contextHref;
|
const storedHref = contextMenu?._contextHref;
|
||||||
const url = storedHref
|
const contextType = contextMenu?._contextType;
|
||||||
|
const url =
|
||||||
|
storedHref && contextType !== 'track'
|
||||||
? `${window.location.origin}${storedHref}`
|
? `${window.location.origin}${storedHref}`
|
||||||
: `${window.location.origin}/track/${item.id || item.uuid}`;
|
: `${window.location.origin}/track/${item.id || item.uuid}`;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue