From 177ce32e5031708ed7bf753c7a5e6809e8e26309 Mon Sep 17 00:00:00 2001 From: Deimos Date: Wed, 20 Mar 2019 20:33:34 -0600 Subject: [PATCH] Settings sub-pages: add link back to main page --- tildes/tildes/templates/base_settings.jinja2 | 12 ++++++++++++ .../templates/settings_account_recovery.jinja2 | 4 ++-- tildes/tildes/templates/settings_bio.jinja2 | 4 ++-- .../tildes/templates/settings_comment_visits.jinja2 | 4 ++-- tildes/tildes/templates/settings_filters.jinja2 | 4 ++-- .../tildes/templates/settings_password_change.jinja2 | 12 +++++------- tildes/tildes/templates/settings_two_factor.jinja2 | 4 ++-- 7 files changed, 27 insertions(+), 17 deletions(-) create mode 100644 tildes/tildes/templates/base_settings.jinja2 diff --git a/tildes/tildes/templates/base_settings.jinja2 b/tildes/tildes/templates/base_settings.jinja2 new file mode 100644 index 0000000..c5dc474 --- /dev/null +++ b/tildes/tildes/templates/base_settings.jinja2 @@ -0,0 +1,12 @@ +{# Copyright (c) 2019 Tildes contributors #} +{# SPDX-License-Identifier: AGPL-3.0-or-later #} + +{% extends 'base_no_sidebar.jinja2' %} + +{% block content %} + {% block settings %}{% endblock %} + +
+ + Back to main Settings page +{% endblock %} diff --git a/tildes/tildes/templates/settings_account_recovery.jinja2 b/tildes/tildes/templates/settings_account_recovery.jinja2 index 7f0b942..0323840 100644 --- a/tildes/tildes/templates/settings_account_recovery.jinja2 +++ b/tildes/tildes/templates/settings_account_recovery.jinja2 @@ -1,13 +1,13 @@ {# Copyright (c) 2018 Tildes contributors #} {# SPDX-License-Identifier: AGPL-3.0-or-later #} -{% extends 'base_no_sidebar.jinja2' %} +{% extends 'base_settings.jinja2' %} {% block title %}Set up account recovery{% endblock %} {% block main_heading %}Set up account recovery{% endblock %} -{% block content %} +{% block settings %}

In order to support account recovery while maximizing user privacy, Tildes's recovery process is a bit unusual.

The email address you enter below will be cryptographically hashed (using Argon2) and only the hash stored. Your actual address is not stored, so it is impossible for anyone to see what it is or use it to send you email, and your address can't be leaked (due to a data breach, account compromise, etc.).

diff --git a/tildes/tildes/templates/settings_bio.jinja2 b/tildes/tildes/templates/settings_bio.jinja2 index b2fb7da..502ff2c 100644 --- a/tildes/tildes/templates/settings_bio.jinja2 +++ b/tildes/tildes/templates/settings_bio.jinja2 @@ -1,7 +1,7 @@ {# Copyright (c) 2019 Tildes contributors #} {# SPDX-License-Identifier: AGPL-3.0-or-later #} -{% extends 'base_no_sidebar.jinja2' %} +{% extends 'base_settings.jinja2' %} {% from 'macros/forms.jinja2' import markdown_textarea %} @@ -9,7 +9,7 @@ {% block main_heading %}Edit your user bio{% endblock %} -{% block content %} +{% block settings %}
#} {# SPDX-License-Identifier: AGPL-3.0-or-later #} -{% extends 'base_no_sidebar.jinja2' %} +{% extends 'base_settings.jinja2' %} {% block title %}Toggle marking new comments{% endblock %} {% block main_heading %}Toggle marking new comments{% endblock %} -{% block content %} +{% block settings %}
How new comments are displayed
Examples of how new comments are displayed diff --git a/tildes/tildes/templates/settings_filters.jinja2 b/tildes/tildes/templates/settings_filters.jinja2 index 3731583..3f966e2 100644 --- a/tildes/tildes/templates/settings_filters.jinja2 +++ b/tildes/tildes/templates/settings_filters.jinja2 @@ -1,13 +1,13 @@ {# Copyright (c) 2018 Tildes contributors #} {# SPDX-License-Identifier: AGPL-3.0-or-later #} -{% extends 'base_no_sidebar.jinja2' %} +{% extends 'base_settings.jinja2' %} {% block title %}Define topic tag filters{% endblock %} {% block main_heading %}Define topic tag filters{% endblock %} -{% block content %} +{% block settings %}

You can configure a list of filtered topic tags below. If a topic has any of these tags, it will be filtered out (not shown) by default, but you can toggle the filtering off to see a full list.

These filters are global and will apply both to your home page as well as inside specific groups.

diff --git a/tildes/tildes/templates/settings_password_change.jinja2 b/tildes/tildes/templates/settings_password_change.jinja2 index 33ec524..4c1cc16 100644 --- a/tildes/tildes/templates/settings_password_change.jinja2 +++ b/tildes/tildes/templates/settings_password_change.jinja2 @@ -1,13 +1,13 @@ {# Copyright (c) 2018 Tildes contributors #} {# SPDX-License-Identifier: AGPL-3.0-or-later #} -{% extends 'base.jinja2' %} +{% extends 'base_settings.jinja2' %} {% block title %}Change your password{% endblock %} {% block main_heading %}Change your password{% endblock %} -{% block content %} +{% block settings %} Change password -{% endblock %} -{% block sidebar %} -
- {% include 'includes/password_restrictions.jinja2' %} -
+
+{% include 'includes/password_restrictions.jinja2' %} + {% endblock %} diff --git a/tildes/tildes/templates/settings_two_factor.jinja2 b/tildes/tildes/templates/settings_two_factor.jinja2 index a1436e8..386a1ee 100644 --- a/tildes/tildes/templates/settings_two_factor.jinja2 +++ b/tildes/tildes/templates/settings_two_factor.jinja2 @@ -1,13 +1,13 @@ {# Copyright (c) 2018 Tildes contributors #} {# SPDX-License-Identifier: AGPL-3.0-or-later #} -{% extends 'base_no_sidebar.jinja2' %} +{% extends 'base_settings.jinja2' %} {% block title %}Set up two-factor authentication{% endblock %} {% block main_heading %}Set up two-factor authentication{% endblock %} -{% block content %} +{% block settings %} {% if request.user.two_factor_enabled %}

You already have two-factor authentication enabled. To disable it, enter a code from your authenticator device below and click the button. If you do not have access to your authenticator device, enter a backup code.