diff options
| author | Dennis Fink | 2026-11-17 17:09:59 +0100 |
|---|---|---|
| committer | Dennis Fink | 2026-11-17 17:09:59 +0100 |
| commit | 6d6d079a3a99d3d3a922a640b6925eb2adf044de (patch) | |
| tree | 33cc19241f4ce86ea43b2f194087c58e3fdc8a4d /webmentions_ssg/templates | |
| parent | 227092b57acc886469e16bcc4c0d3256e86d3d1e (diff) | |
| download | webmentions-ssg-6d6d079a3a99d3d3a922a640b6925eb2adf044de.tar.gz webmentions-ssg-6d6d079a3a99d3d3a922a640b6925eb2adf044de.zip | |
refactor(core)!: split forms and models by feature
Replace monolithic form and model modules with focused packages for
receiver, moderation, source, user, and shared validation concerns.
Rename source policy concepts to domain moderation, including routes,
models, tables, configuration, templates, and tests.
BREAKING CHANGE: form and model import paths, moderation routes, and
`SOURCE_ALLOWLIST_ENABLED` have changed; use `ALLOWLIST_ENABLED` and the
new feature-specific modules.
Diffstat (limited to '')
| -rw-r--r-- | webmentions_ssg/templates/base.html | 4 | ||||
| -rw-r--r-- | webmentions_ssg/templates/moderation.html (renamed from webmentions_ssg/templates/source_domains.html) | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/webmentions_ssg/templates/base.html b/webmentions_ssg/templates/base.html index d9c8e87..3395dd5 100644 --- a/webmentions_ssg/templates/base.html +++ b/webmentions_ssg/templates/base.html @@ -45,8 +45,8 @@ SPDX-License-Identifier: BSD-3-Clause <div class="navbar-nav flex-row gap-3"> <a class="nav-link{% if request.endpoint == 'webmentions.received_list' %} active{% endif %}" href='{{ url_for("webmentions.received_list") }}'>Received</a> - <a class="nav-link{% if request.endpoint and request.endpoint.startswith('webmentions.source_domain') %} active{% endif %}" - href="{{ url_for('webmentions.source_domain_list') }}">Source rules</a> + <a class="nav-link{% if request.endpoint and request.endpoint.startswith('webmentions.moderation') %} active{% endif %}" + href="{{ url_for('webmentions.moderation') }}">Source rules</a> <a class="nav-link{% if request.endpoint == 'webmentions.source_list' %} active{% endif %}" href='{{ url_for("webmentions.source_list") }}'>Sent</a> <form action="{{ url_for('webmentions.logout') }}" diff --git a/webmentions_ssg/templates/source_domains.html b/webmentions_ssg/templates/moderation.html index 2db942f..e45fe3f 100644 --- a/webmentions_ssg/templates/source_domains.html +++ b/webmentions_ssg/templates/moderation.html @@ -14,13 +14,13 @@ SPDX-License-Identifier: BSD-3-Clause </p> <p> Allowlist mode is <strong>{{ "enabled" if allowlist_enabled else "disabled" }}</strong>. - Set <code>SOURCE_ALLOWLIST_ENABLED = True</code> in the server configuration to + Set <code>ALLOWLIST_ENABLED = True</code> in the server configuration to accept only listed source domains. An empty enabled allowlist rejects all sources. </p> {% for kind, entries in (("blocked", blocked), ("allowed", allowed)) %} <section class="mb-4" aria-labelledby="{{ kind }}-heading"> <h2 id="{{ kind }}-heading">{{ "Blocked" if kind == "blocked" else "Allowed" }} domains</h2> - <form action="{{ url_for('webmentions.source_domain_add', kind=kind) }}" + <form action="{{ url_for('webmentions.moderation_domain_add', kind=kind) }}" method="post" class="row g-2 align-items-end mb-3"> <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"> @@ -50,10 +50,11 @@ SPDX-License-Identifier: BSD-3-Clause <tr> <td class="text-break">{{ entry.domain }}</td> <td> - <form action="{{ url_for('webmentions.source_domain_delete', kind=kind, entry_id=entry.id) }}" + <form action="{{ url_for('webmentions.moderation_domain_delete', kind=kind, entry_id=entry.id) }}" method="post"> <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"> - <button type="submit" class="btn btn-sm btn-outline-danger">{{ "Unblock" if kind == "blocked" else "Remove" }}</button> + <button type="submit" + class="btn btn-sm btn-outline-danger">{{ "Unblock" if kind == "blocked" else "Remove" }}</button> </form> </td> </tr> |
