X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/6aa9f73fef64bbca1e3b71eb526946d69d014246..cd015a3c1aa2511da7c0063125a24065d37799bb:/src/views-components/context-menu/actions/helpers.ts diff --git a/src/views-components/context-menu/actions/helpers.ts b/src/views-components/context-menu/actions/helpers.ts index f196074d..9140e457 100644 --- a/src/views-components/context-menu/actions/helpers.ts +++ b/src/views-components/context-menu/actions/helpers.ts @@ -14,7 +14,10 @@ export const sanitizeToken = (href: string, tokenAsQueryParam = true): string => return `${[prefix, ...rest].join('/')}${tokenAsQueryParam ? `${sep}api_token=${token}` : ''}`; }; -export const getClipboardUrl = (href: string, shouldSanitizeToken = true, inline = false): string => { +/** + * @returns A shareable token-free WB2 url that redirects to keep-web after login + */ +export const getCollectionItemClipboardUrl = (href: string, shouldSanitizeToken = true, inline = false): string => { const { origin } = window.location; const url = shouldSanitizeToken ? sanitizeToken(href, false) : href; const redirectKey = inline ? REDIRECT_TO_PREVIEW_KEY : REDIRECT_TO_DOWNLOAD_KEY;