mirror of
https://github.com/immich-app/immich.git
synced 2025-01-01 08:31:59 +00:00
fix(web): copy shared link (#6309)
This commit is contained in:
parent
bf1dd36fa9
commit
08fcce9e90
2 changed files with 6 additions and 3 deletions
|
@ -20,8 +20,11 @@ export const copyToClipboard = async (secret: string) => {
|
|||
};
|
||||
|
||||
export const makeSharedLinkUrl = (externalDomain: string, key: string) => {
|
||||
const url = externalDomain || window.location.origin;
|
||||
return `${url + url.endsWith('/') ? '' : '/'}share/${key}`;
|
||||
let url = externalDomain || window.location.origin;
|
||||
if (!url.endsWith('/')) {
|
||||
url += '/';
|
||||
}
|
||||
return `${url}share/${key}`;
|
||||
};
|
||||
|
||||
export const oauth = {
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
return;
|
||||
}
|
||||
|
||||
await copyToClipboard(password ? `Link: ${sharedLink}\nPassword: ${password}` : sharedLink);
|
||||
await copyToClipboard(sharedLink);
|
||||
};
|
||||
|
||||
const getExpirationTimeInMillisecond = () => {
|
||||
|
|
Loading…
Reference in a new issue