1
0
Fork 0
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:
Jason Rasmussen 2024-01-09 23:10:06 -05:00 committed by GitHub
parent bf1dd36fa9
commit 08fcce9e90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View file

@ -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 = {

View file

@ -94,7 +94,7 @@
return;
}
await copyToClipboard(password ? `Link: ${sharedLink}\nPassword: ${password}` : sharedLink);
await copyToClipboard(sharedLink);
};
const getExpirationTimeInMillisecond = () => {