headscale: invites live under the companion's /api/v1 mount

This commit is contained in:
2026-08-05 18:49:41 +00:00
parent 4cee0335c2
commit 3ca5968605
3 changed files with 27 additions and 11 deletions
@@ -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 (