modify copy/share for external profiles
Some checks failed
pl-hooks CI / Test for a successful build (22.x) (push) Has been cancelled
pl-api CI / Test for pl-api formatting (22.x) (push) Has been cancelled
pl-fe CI / Test and upload artifacts (22.x) (push) Has been cancelled
pl-fe CI / deploy (push) Has been cancelled

This commit is contained in:
2026-01-12 02:05:21 +00:00
parent fdc53cb2cd
commit 55e2c885b2
2 changed files with 13 additions and 6 deletions

View File

@ -335,16 +335,20 @@ const Header: React.FC<IHeader> = ({ account }) => {
};
const handleShare = () => {
const localDomain = window.location.hostname !== 'localhost' ? window.location.hostname : 'localhost:7312';
const copyString = `${window.location.protocol}//${localDomain}/@${account.acct}`;
navigator.share({
text: `@${account.acct}`,
url: account.url,
url: copyString,
}).catch((e) => {
if (e.name !== 'AbortError') console.error(e);
});
};
const handleCopy: React.EventHandler<React.MouseEvent> = (e) => {
copy(account.url);
const localDomain = window.location.hostname !== 'localhost' ? window.location.hostname : 'localhost:7312';
const copyString = `${window.location.protocol}//${localDomain}/@${account.acct}`;
copy(copyString);
};
const makeMenu = () => {