1
0
mirror of https://gitlab.com/brutaldon/brutaldon.git synced 2024-12-04 14:46:24 -05:00

Reorganize options page and add some help text

This commit is contained in:
Jason McBrayer 2018-10-09 14:45:10 -04:00
parent 3acfcdd744
commit 20818fca96
4 changed files with 42 additions and 13 deletions

View File

@ -30,9 +30,12 @@ class Preference(models.Model):
filter_boosts = models.BooleanField(default=False) filter_boosts = models.BooleanField(default=False)
timezone = models.CharField(max_length=80, blank=True, null=True, timezone = models.CharField(max_length=80, blank=True, null=True,
choices=timezones, default='UTC') choices=timezones, default='UTC')
no_javascript = models.BooleanField(default=False) no_javascript = models.BooleanField(default=False,
notifications = models.BooleanField(default=True) help_text="""Disable all JavaScript. Overrides all other JavaScript options.""")
click_to_load = models.BooleanField(default=False) notifications = models.BooleanField(default=True,
help_text="""Display live notifications in header.""")
click_to_load = models.BooleanField(default=False,
help_text="""Click to load more toots in the same page, rather than using pagination.""")
class Account(models.Model): class Account(models.Model):
username = models.EmailField(unique=True) username = models.EmailField(unique=True)

View File

@ -202,3 +202,9 @@ emoji-link
{ {
margin-left: 50%; margin-left: 50%;
} }
.preferences-help
{
max-width: 30em;
display: inline-block;
}

View File

@ -173,3 +173,9 @@ emoji-link
{ {
margin-left: 50%; margin-left: 50%;
} }
.preferences-help
{
max-width: 30em;
display: inline-block;
}

View File

@ -6,6 +6,8 @@
<h1 class="title">Settings</h1> <h1 class="title">Settings</h1>
<form method="post" action="{% url "settings" %}" > <form method="post" action="{% url "settings" %}" >
{% csrf_token %} {% csrf_token %}
<h2 class="subtitle">General Options</h2>
<div class="field"> <div class="field">
<label class="label" for="theme">{{ form.theme.label }}</label> <label class="label" for="theme">{{ form.theme.label }}</label>
<div class="control has-icons-left"> <div class="control has-icons-left">
@ -17,6 +19,18 @@
</div> </div>
</div> </div>
<div class="field">
<label class="label" for="timezone">{{ form.timezone.label }}</label>
<div class="control has-icons-left">
<div class="select">
{% render_field form.timezone class+="select" %}
<span class="icon is-small is-left">
<span class="fa fa-clock-o"></span>
</div>
</div>
</div>
<h2 class="subtitle">Timeline Options</h2>
<div class="field"> <div class="field">
<label class="label checkbox"> <label class="label checkbox">
{% render_field form.filter_replies %} {% render_field form.filter_replies %}
@ -29,22 +43,16 @@
{{ form.filter_boosts.label }} {{ form.filter_boosts.label }}
</label> </label>
</div> </div>
<div class="field">
<label class="label" for="timezone">{{ form.timezone.label }}</label>
<div class="control has-icons-left">
<div class="select">
{% render_field form.timezone class+="select" %}
<span class="icon is-small is-left">
<span class="fa fa-clock-o"></span>
</div>
</div>
</div>
<h2 class="subtitle">JavaScript Options</h2>
<div class="field"> <div class="field">
<label class="label checkbox" for="no_javascript"> <label class="label checkbox" for="no_javascript">
{% render_field form.no_javascript class+="checkbox" %} {% render_field form.no_javascript class+="checkbox" %}
{{ form.no_javascript.label }} {{ form.no_javascript.label }}
</label> </label>
<p class="notification is-info preferences-help">
{{ form.no_javascript.help_text }}
</p>
</div> </div>
<div class="field"> <div class="field">
@ -52,6 +60,9 @@
{% render_field form.notifications class+="checkbox" %} {% render_field form.notifications class+="checkbox" %}
{{ form.notifications.label }} {{ form.notifications.label }}
</label> </label>
<p class="notification is-info preferences-help">
{{ form.notifications.help_text }}
</p>
</div> </div>
<div class="field"> <div class="field">
@ -59,6 +70,9 @@
{% render_field form.click_to_load class+="checkbox" %} {% render_field form.click_to_load class+="checkbox" %}
{{ form.click_to_load.label }} {{ form.click_to_load.label }}
</label> </label>
<p class="notification is-info preferences-help">
{{ form.click_to_load.help_text }}
</p>
</div> </div>
<div class="field"> <div class="field">