mirror of
https://github.com/MeshTender/MeshTender.git
synced 2026-09-01 17:38:15 +00:00
45 lines
1.9 KiB
HTML
45 lines
1.9 KiB
HTML
{{define "title"}}Repeater invite · MeshTender{{end}}
|
|
{{define "content"}}
|
|
<section class="card auth">
|
|
{{if eq .State "invalid"}}
|
|
<h1>Invalid link</h1>
|
|
<p class="muted">This share link is no longer valid — it's single-use and may have already been used or revoked. Ask the owner for a new one.</p>
|
|
<p><a class="backlink" href="/">← Go to dashboard</a></p>
|
|
|
|
{{else if eq .State "auth_required"}}
|
|
<h1>You've been invited</h1>
|
|
<p>You've been invited to control <strong>{{.Repeater.Name}}</strong>, shared by {{.Repeater.OwnerName}}.</p>
|
|
<p class="muted">Sign in or create an account to accept.</p>
|
|
<div class="ractions">
|
|
<a class="btn primary" href="/login?next={{.Next}}">Sign in</a>
|
|
<a class="btn" href="/signup?next={{.Next}}">Create account</a>
|
|
</div>
|
|
|
|
{{else if eq .State "owner"}}
|
|
<h1>This is your repeater</h1>
|
|
<p>You own <strong>{{.Repeater.Name}}</strong> — no need to accept your own link.</p>
|
|
<div class="ractions">
|
|
<a class="btn primary" href="/repeaters/{{.Repeater.ID}}/share">Manage sharing</a>
|
|
<a class="btn" href="/">Dashboard</a>
|
|
</div>
|
|
|
|
{{else if eq .State "already"}}
|
|
<h1>Already shared with you</h1>
|
|
<p>You already have access to <strong>{{.Repeater.Name}}</strong>.</p>
|
|
<p><a class="backlink" href="/">← Go to dashboard</a></p>
|
|
|
|
{{else}}{{/* confirm */}}
|
|
<h1>Accept invite</h1>
|
|
<p>Accept access to <strong>{{.Repeater.Name}}</strong>, shared by {{.Repeater.OwnerName}}?</p>
|
|
<p class="muted">You're signed in as <strong>{{.UserName}}</strong>.</p>
|
|
<form method="post" action="/invite/{{.Token}}/accept">
|
|
<button type="submit" class="primary">Accept as {{.UserName}}</button>
|
|
</form>
|
|
<form method="post" action="/logout" class="inline">
|
|
<input type="hidden" name="next" value="/invite/{{.Token}}">
|
|
<button type="submit" class="link">Switch account</button>
|
|
</form>
|
|
{{end}}
|
|
</section>
|
|
{{end}}
|