From 1b52acdb56346d939eb2e26ff449697b52fa7142 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Wed, 16 Nov 2022 21:12:28 -0700 Subject: Domains management pages --- templates/settings/_settings_system_menu.html | 4 ++- .../settings/settings_system_domain_create.html | 39 ++++++++++++++++++++++ .../settings/settings_system_domain_delete.html | 33 ++++++++++++++++++ .../settings/settings_system_domain_edit.html | 19 +++++++++++ templates/settings/settings_system_domains.html | 28 ++++++++++++++++ 5 files changed, 122 insertions(+), 1 deletion(-) create mode 100644 templates/settings/settings_system_domain_create.html create mode 100644 templates/settings/settings_system_domain_delete.html create mode 100644 templates/settings/settings_system_domain_edit.html create mode 100644 templates/settings/settings_system_domains.html (limited to 'templates/settings') diff --git a/templates/settings/_settings_system_menu.html b/templates/settings/_settings_system_menu.html index fb4da02..9206045 100644 --- a/templates/settings/_settings_system_menu.html +++ b/templates/settings/_settings_system_menu.html @@ -1,3 +1,5 @@ diff --git a/templates/settings/settings_system_domain_create.html b/templates/settings/settings_system_domain_create.html new file mode 100644 index 0000000..54d3640 --- /dev/null +++ b/templates/settings/settings_system_domain_create.html @@ -0,0 +1,39 @@ +{% extends "base.html" %} + +{% block title %}Add Domain - System Settings{% endblock %} + +{% block content %} + {% block menu %} + {% include "settings/_settings_system_menu.html" %} + {% endblock %} +
+

Add A Domain

+

+ Use this form to add a domain that your users can create identities + on. +

+

+ Takahē supports multiple domains per server, but note that when + identities are created they are fixed to their chosen domain, + and you will not be able to delete a domain with identities on it. +

+

+ If you will be serving Takahē on the domain you choose, you can leave + the "service domain" field blank. If you would like to let users create + accounts on a domain serving something else, you must pick a unique + "service domain" that pairs up to your chosen domain name, make sure + Takahē is served on that, and add redirects + for /.well-known/webfinger, /.well-known/host-meta + and /.well-known/nodeinfo from the main domain to the + service domain. +

+ {% csrf_token %} + {% for field in form %} + {% include "forms/_field.html" %} + {% endfor %} +
+ Delete + +
+
+{% endblock %} diff --git a/templates/settings/settings_system_domain_delete.html b/templates/settings/settings_system_domain_delete.html new file mode 100644 index 0000000..220bbb9 --- /dev/null +++ b/templates/settings/settings_system_domain_delete.html @@ -0,0 +1,33 @@ +{% extends "base.html" %} + +{% block title %}Delete {{ domain.domain }} - System Settings{% endblock %} + +{% block content %} + {% block menu %} + {% include "settings/_settings_system_menu.html" %} + {% endblock %} + +
+ {% csrf_token %} + +

Deleting {{ domain.domain }}

+ + {% if num_identities %} +

+ You cannot delete this domain as it has {{ num_identities }} + identit{{ num_identities|pluralize:"y,ies" }} registered on it. +

+

+ You will need to manually remove all identities from this domain in + order to delete it. +

+ {% else %} +

Please confirm deletion of this domain - there are no identities registed on it.

+
+ Cancel + +
+ {% endif %} +
+ +{% endblock %} diff --git a/templates/settings/settings_system_domain_edit.html b/templates/settings/settings_system_domain_edit.html new file mode 100644 index 0000000..c05d5d5 --- /dev/null +++ b/templates/settings/settings_system_domain_edit.html @@ -0,0 +1,19 @@ +{% extends "base.html" %} + +{% block title %}{{ domain.domain }} - System Settings{% endblock %} + +{% block content %} + {% block menu %} + {% include "settings/_settings_system_menu.html" %} + {% endblock %} +
+ {% csrf_token %} + {% for field in form %} + {% include "forms/_field.html" %} + {% endfor %} +
+ Delete + +
+
+{% endblock %} diff --git a/templates/settings/settings_system_domains.html b/templates/settings/settings_system_domains.html new file mode 100644 index 0000000..dccde65 --- /dev/null +++ b/templates/settings/settings_system_domains.html @@ -0,0 +1,28 @@ +{% extends "base.html" %} + +{% block title %}{{ section.title }} - System Settings{% endblock %} + +{% block content %} + {% block menu %} + {% include "settings/_settings_system_menu.html" %} + {% endblock %} +
+ {% for domain in domains %} + + + + {{ domain.domain }} + + {% if domain.public %}Public{% else %}Private{% endif %} + {% if domain.service_domain %}({{ domain.service_domain }}){% endif %} + + + + {% empty %} +

You have no domains set up.

+ {% endfor %} + + Add a domain + +
+{% endblock %} -- cgit v1.2.3