mirror of
https://github.com/chatmail/relay.git
synced 2026-05-20 21:08:03 +00:00
streamline index.html
This commit is contained in:
@@ -17,13 +17,6 @@ def gen_qr_png_data(maildomain):
|
|||||||
def gen_qr(maildomain, url):
|
def gen_qr(maildomain, url):
|
||||||
info = f"{maildomain} invite code"
|
info = f"{maildomain} invite code"
|
||||||
|
|
||||||
steps = (
|
|
||||||
"1. Install https://get.delta.chat\n"
|
|
||||||
"2. On setup screen scan above invite QR code\n"
|
|
||||||
"3. Choose nickname & avatar\n"
|
|
||||||
"+ chat with any e-mail address ...\n"
|
|
||||||
)
|
|
||||||
|
|
||||||
# load QR code
|
# load QR code
|
||||||
qr = qrcode.QRCode(
|
qr = qrcode.QRCode(
|
||||||
version=1,
|
version=1,
|
||||||
@@ -47,11 +40,10 @@ def gen_qr(maildomain, url):
|
|||||||
font_size = 16
|
font_size = 16
|
||||||
font = ImageFont.truetype(font=ttf_path, size=font_size)
|
font = ImageFont.truetype(font=ttf_path, size=font_size)
|
||||||
|
|
||||||
num_lines = (info + steps).count("\n") + 3
|
num_lines = (info).count("\n") + 1
|
||||||
|
|
||||||
size = width = 384
|
size = width = 384
|
||||||
qr_padding = 6
|
qr_padding = 6
|
||||||
text_margin_right = 12
|
|
||||||
text_height = font_size * num_lines
|
text_height = font_size * num_lines
|
||||||
height = size + text_height + qr_padding * 2
|
height = size + text_height + qr_padding * 2
|
||||||
|
|
||||||
@@ -70,13 +62,6 @@ def gen_qr(maildomain, url):
|
|||||||
draw.multiline_text(
|
draw.multiline_text(
|
||||||
(info_pos, size - qr_padding // 2), info, font=font, fill="black", align="right"
|
(info_pos, size - qr_padding // 2), info, font=font, fill="black", align="right"
|
||||||
)
|
)
|
||||||
draw.multiline_text(
|
|
||||||
(text_margin_right, height - text_height + font_size * 1.0),
|
|
||||||
steps,
|
|
||||||
font=font,
|
|
||||||
fill="black",
|
|
||||||
align="left",
|
|
||||||
)
|
|
||||||
|
|
||||||
# paste QR code
|
# paste QR code
|
||||||
image.paste(
|
image.paste(
|
||||||
|
|||||||
@@ -4,17 +4,24 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<title>chatmail instance</title>
|
<title>chatmail instance</title>
|
||||||
</style>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Welcome to {{ config.mail_domain }}!</h1>
|
<h1>Welcome to {{ config.mail_domain }}!</h1>
|
||||||
<h2>Tap or Scan this invite code to setup an account for Delta Chat app</h2>
|
<h2>Getting started</h2>
|
||||||
|
<ol>
|
||||||
|
<li>Install <a href="https://get.delta.chat">https://get.delta.chat</a></li>
|
||||||
|
<li>Scan or Tap on the invite QR code</li>
|
||||||
|
<li>Choose Nickname and Avatar</li>
|
||||||
|
<li>Use QR code invites and scans to setup end-to-end encrypted communication
|
||||||
|
with any e-mail address</li>
|
||||||
|
</ol>
|
||||||
<a href="DCACCOUNT:https://{{ config.mail_domain }}/cgi-bin/newemail.py">
|
<a href="DCACCOUNT:https://{{ config.mail_domain }}/cgi-bin/newemail.py">
|
||||||
<img class="section" src="qrcode.png" />
|
<img class="section" src="qrcode.png" />
|
||||||
</a>
|
</a>
|
||||||
<h2>Properties / Constraints</h2>
|
|
||||||
|
<h2>Constraints</h2>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Un-encrypted mails can not leave the chat-mail domain.</li>
|
<li>You can not send un-encrypted mails to anyone outside {{config.mail_domain }} </li>
|
||||||
<li>Use <a href="https://delta.chat/en/help#howtoe2ee">
|
<li>Use <a href="https://delta.chat/en/help#howtoe2ee">
|
||||||
guaranteed end-to-end encryption via QR code scans</a>
|
guaranteed end-to-end encryption via QR code scans</a>
|
||||||
to setup contact with users outside of the chat-mail instance.
|
to setup contact with users outside of the chat-mail instance.
|
||||||
|
|||||||
Reference in New Issue
Block a user