~cytrogen/srht-deploy

srht-deploy/meta-custom/templates/privacy.html -rw-r--r-- 2.1 KiB
6b7b1351 — Cytrogen 修复 README 里的 Markdown 格式错误 9 days 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
58
59
60
61
{% extends "meta.html" %}
{% block title %}
<title>隐私设置 - {{cfg("sr.ht", "site-name")}} meta</title>
{% endblock %}
{% block content %}
<div class="row">
  <section class="col-lg-8">
    <h3>邮件加密</h3>
    <p>
      {% if pgp_key_id %}
      所有来自 {{cfg("sr.ht", "site-name")}} 的邮件均使用以下密钥签名:<br />
      <a href="/privacy/pubkey">{{pgp_key_id}}</a>
      {% else %}
      来自 {{cfg("sr.ht", "site-name")}} 的邮件未启用加密。请联系
      {{owner.name}} &lt;<a href="mailto:{{owner.email}}">{{owner.email}}</a>&gt;
      以请求启用 PGP 邮件签名。
      {% endif %}
    </p>
    {% if any(current_user.pgp_keys) %}
    <form method="POST" action="/privacy">
      {{csrf_token()}}
      <div class="form-check">
        <label class="form-check-label">
          <input
            class="form-check-input"
            type="radio"
            name="pgp-key"
            value="null"
            {%if current_user.pgp_key_id == None%}checked{%endif%}
          /> 不加密发给我的邮件
        </label>
      </div>
      {% for key in current_user.pgp_keys %}
      <div class="form-check">
        <label class="form-check-label">
          <input
            class="form-check-input"
            type="radio"
            name="pgp-key"
            value="{{key.id}}"
            {%if current_user.pgp_key_id == key.id%}checked{%endif%}
          /> 使用 {{key.email}} {{key.fingerprint_hex}} 加密
        </label>
      </div>
      {% endfor %}
      <button type="submit" class="pull-right btn btn-primary">
        保存 {{icon("caret-right")}}
      </button>
    </form>
    <form method="POST" action="/privacy/test-email" style="clear: both; padding-top: 0.5rem">
      {{csrf_token()}}
      <button type="submit" class="pull-right btn btn-default">
        发送测试邮件 {{icon("arrow-right")}}
      </button>
    </form>
    {% elif pgp_key_id %}
    <p>如果你<a href="/keys">添加 PGP 密钥</a>到你的账户,我们可以对发给你的邮件进行加密。</p>
    {% endif %}
  </section>
</div>
{% endblock %}