Integrate MAS with Synapse

This commit is contained in:
Your Name
2025-12-01 08:14:13 -06:00
parent df07d51d8b
commit a3d39d901b
404 changed files with 22542 additions and 2 deletions

View File

@@ -0,0 +1,52 @@
{#
Copyright 2024, 2025 New Vector Ltd.
Copyright 2024 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details.
-#}
{%- set _ = translator(lang) -%}
<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="{{ lang }}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
a#button:hover { background-color: #3C4045!important; }
a#button:active { background-color: #4C5158!important; }
</style>
</head>
<body style="
color: black;
background-color: white;
font-family: Inter, system-ui, ui-sans-serif, sans-serif;
">
{{ _("mas.emails.recovery.headline", server_name=branding.server_name) }}<br />
<br />
{{ _("mas.emails.recovery.click_button") }}<br />
<br />
<a id="button" href="{{ recovery_link }}" target="_blank" style="
display: inline-block;
transition: background-color 0.1s ease;
font-size: 18px;
font-size: 1.125rem;
font-weight: 600;
color: #FFF;
background-color: #1B1D22;
padding: 16px 32px;
padding: 1rem 2rem;
border-radius: 32px;
border-radius: 2rem;
text-decoration: none;
">{{ _("mas.emails.recovery.create_new_password") }}</a><br />
<p style="font-size: 14px; font-size: 0.875rem;">
{{ _("mas.emails.recovery.fallback") }} {{ _("mas.emails.recovery.copy_link") }}
</p>
<p style="font-size: 14px; font-size: 0.875rem;">
<a href="{{ recovery_link }}" target="_blank">{{ recovery_link }}</a>
</p>
{{ _("mas.emails.recovery.you_can_ignore") }}
</body>
</html>

View File

@@ -0,0 +1,14 @@
{#
Copyright 2024, 2025 New Vector Ltd.
Copyright 2024 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details.
-#}
{%- set _ = translator(lang) -%}
{%- set mxid -%}
@{{ user.username }}:{{ branding.server_name }}
{%- endset -%}
{{ _("mas.emails.recovery.subject", mxid=mxid) }}

View File

@@ -0,0 +1,16 @@
{#
Copyright 2024, 2025 New Vector Ltd.
Copyright 2024 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details.
-#}
{%- set _ = translator(lang) -%}
{{ _("mas.emails.recovery.headline", server_name=branding.server_name) }}
{{ _("mas.emails.recovery.copy_link") }}
{{ recovery_link }}
{{ _("mas.emails.recovery.you_can_ignore") }}

View File

@@ -0,0 +1,19 @@
{#
Copyright 2024, 2025 New Vector Ltd.
Copyright 2021-2024 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details.
-#}
{%- set _ = translator(lang) -%}
{%- if browser_session is defined -%}
{%- set username = browser_session.user.username -%}
{%- elif user_registration is defined -%}
{%- set username = user_registration.username -%}
{%- endif -%}
{{ _("mas.emails.greeting", username=(username|default("user"))) }}<br />
<br />
{{ _("mas.emails.verify.body_html", code=authentication_code.code) }}<br />

View File

@@ -0,0 +1,11 @@
{#
Copyright 2024, 2025 New Vector Ltd.
Copyright 2021-2024 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details.
-#}
{%- set _ = translator(lang) -%}
{{ _("mas.emails.verify.subject", code=authentication_code.code) }}

View File

@@ -0,0 +1,19 @@
{#
Copyright 2024, 2025 New Vector Ltd.
Copyright 2021-2024 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details.
-#}
{%- set _ = translator(lang) -%}
{%- if browser_session is defined -%}
{%- set username = browser_session.user.username -%}
{%- elif user_registration is defined -%}
{%- set username = user_registration.username -%}
{%- endif -%}
{{ _("mas.emails.greeting", username=(username|default("user"))) }}
{{ _("mas.emails.verify.body_text", code=authentication_code.code) }}