headscale: invites live under the companion's /api/v1 mount
This commit is contained in:
@@ -80,16 +80,14 @@ type InviteLinkPanelProps = { invite: HeadscaleInviteCreated; onDismiss: () => v
|
||||
const InviteLinkPanel = ({ invite, onDismiss }: InviteLinkPanelProps) => {
|
||||
const [showQr, setShowQr] = useState(true);
|
||||
|
||||
// The link goes in `text`, not `url`: it is a custom scheme (`officer-offscale://join#…`) and several
|
||||
// share-sheet implementations only accept http(s) in the url field, rejecting the whole call. As text it
|
||||
// is passed through verbatim by every messenger. A cancelled sheet rejects too — nothing to report there,
|
||||
// the link is still on screen.
|
||||
const share = () => {
|
||||
void navigator
|
||||
.share?.({
|
||||
title: 'Join the tailnet',
|
||||
text: `Tap to join ${invite.user}'s network`,
|
||||
url: invite.url,
|
||||
})
|
||||
.catch(() => {
|
||||
// A cancelled share sheet rejects. Nothing to report — the link is still on screen.
|
||||
});
|
||||
.share?.({ title: 'Join the tailnet', text: `Tap to join as ${invite.user}: ${invite.url}` })
|
||||
.catch(() => {});
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user