~sircmpwn/meta.sr.ht

ref: 72548bd7545f78670878667674cc7645835a17bd meta.sr.ht/metasrht/templates/invite.html -rw-r--r-- 1.7 KiB
72548bd7Drew DeVault API: Updates per core-go auth changes 1 year, 1 month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{% extends "meta.html" %}
{% block title %}
<title>Invitations - {{cfg("sr.ht", "site-name")}} meta</title>
{% endblock %}
{% block content %}
<div class="row">
  <section class="col-md-7">
    <p>
      You have {{ current_user.invites }}
      invite{{ 's' if current_user.invites != 1 else '' }} remaining with which
      to invite people to {{ cfg("sr.ht", "site-name") }}. If you need more,
      reach out to <a
        href="mailto:{{cfg("sr.ht", "owner-email")}}"
      >
        {{cfg("sr.ht", "owner-name")}}
        &lt;{{cfg("sr.ht", "owner-email")}}&gt;
      </a>.
    </p>
    {% if current_user.user_type == UserType.admin %}
    <div class="alert alert-info">
      Admins have unlimited invites.
    </div>
    {% else %}
    <div class="alert alert-warning">
      You may be held accountable for the actions of users you invite. Please
      exercise due care when giving them out.
    </div>
    {% endif %}
    {% if current_user.invites != 0 or current_user.user_type == UserType.admin %}
    <form method="POST" action="/invites/gen-invite">
      {{csrf_token()}}
      <button class="btn btn-primary" type="submit">
        Generate link {{icon("caret-right")}}
      </button>
    </form>
    {% endif %}
    {% if current_user.invites_sent %}
    <h3>Invites sent</h3>
    <ul>
      {% for invite in current_user.invites_sent %}
      <li>
        {% if invite.recipient_id %}
        <code>{{invite.invite_hash}}</code>
        (claimed by ~{{ invite.recipient.username}})
        {% else %}
        <code>
          <a href="/register/{{invite.invite_hash}}">{{invite.invite_hash}}</a>
        </code>
        (unclaimed)
        {% endif %}
      </li>
      {% endfor %}
    </ul>
    {% endif %}
  </section>
</div>
{% endblock %}