Skip to content

Commit

Permalink
Change preferences page (no tests)
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalp committed May 25, 2024
1 parent d11d869 commit 60e10d4
Show file tree
Hide file tree
Showing 5 changed files with 102 additions and 30 deletions.
1 change: 1 addition & 0 deletions frontend/src/style/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@
@import "misago/notifications-dropdown.less";
@import "misago/notifications-overlay.less";
@import "misago/active-posters.less";
@import "misago/account-settings.less";
@import "misago/user-profile.less";
@import "misago/username-history.less";
@import "misago/search.less";
Expand Down
51 changes: 51 additions & 0 deletions frontend/src/style/misago/account-settings.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
.table-watching-preferences {
width: 100%;
max-width: 100%;
margin-bottom: @line-height-computed;

th, td {
border-bottom: 1px solid @table-border-color;
vertical-align: middle;
}
}

.table-watching-label {
padding: @table-cell-padding;
padding-left: 0;
}

.table-watching-option {
width: 100px;
padding: @table-cell-padding;

text-align: center;

label {
margin: 0;
padding: @table-condensed-cell-padding;
width: 100%;

&, input {
cursor: pointer;
}

&:hover {
background-color: @gray-lighter;
border-radius: @btn-border-radius-base;
}
}
}

.table-watching-option attr {
display: block;

cursor: help;
}

.table-watching-option .material-icon {
font-size: 18px;
}

legend + .table-watching-preferences {
margin-top: @line-height-computed * -1;
}
2 changes: 1 addition & 1 deletion misago/static/misago/css/misago.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion misago/static/misago/css/misago.css.map

Large diffs are not rendered by default.

76 changes: 48 additions & 28 deletions misago/templates/misago/account/settings/preferences_partial.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ <h3 class="panel-title">
</div>
<p class="help-block">
{% blocktrans trimmed context "account preferences page form" %}
Hiding your online status will also remove the information about your last activity on the site from your profile. Members with permission to see hidden online statuses will still be able to see when you are online and when you've been last active.
Hiding your online status will also remove the information about your last activity on the site from your profile. Users with a special privilege to see hidden online statuses will still be able to see when you are online and when you've been last active.
{% endblocktrans %}
</p>
{% endwith %}
Expand All @@ -62,7 +62,7 @@ <h3 class="panel-title">
</div>
<p class="help-block">
{% blocktrans trimmed context "account preferences page form" %}
Some members may have a permission allowing them to bypass this preference.
Some users may have special privileges allowing them to bypass this preference.
{% endblocktrans %}
</p>
{% endwith %}
Expand All @@ -72,20 +72,20 @@ <h3 class="panel-title">
<legend>
{% trans "Automatic watching" context "account preferences page fieldset" %}
</legend>
<table class="table table-watching-preferences">
<table class="table-watching-preferences">
<tr>
<th>&nbsp;</th>
<th>
<th class="table-watching-option">
<attr title="{% trans 'Don\'t watch' context 'account preferences page watch table' %}">
<span class="material-icon">notifications_none</span>
</attr>
</th>
<th>
<th class="table-watching-option">
<attr title="{% trans 'Notify on site' context 'account preferences page watch table' %}">
<span class="material-icon">notifications_active</span>
</attr>
</th>
<th>
<th class="table-watching-option">
<attr title="{% trans 'Notify on site and with email' context 'account preferences page watch table' %}">
<span class="material-icon">notifications_active</span>
<span class="material-icon">add</span>
Expand All @@ -95,40 +95,56 @@ <h3 class="panel-title">
</tr>
{% with form.watch_started_threads as field %}
<tr>
<td>{% trans "Threads I am starting" context "account preferences page watch table" %}</td>
<td class="table-watching-label">
{% trans "Threads I am starting" context "account preferences page watch table" %}
</td>
{% for choice in field.subwidgets %}
<td>
<input type="radio" name="{{ field.html_name }}" id="{{ choice.id_for_label }}" value="{{ choice.data.value }}"{{ choice|requiredhtml }}{{ choice|checkedhtml }}>
<td class="table-watching-option">
<label>
<input type="radio" name="{{ field.html_name }}" id="{{ choice.id_for_label }}" value="{{ choice.data.value }}"{{ choice|requiredhtml }}{{ choice|checkedhtml }}>
</label>
</td>
{% endfor %}
</tr>
{% endwith %}
{% with form.watch_replied_threads as field %}
<tr>
<td>{% trans "Threads I am replying to" context "account preferences page watch table" %}</td>
<td class="table-watching-label">
{% trans "Threads I am replying to" context "account preferences page watch table" %}
</td>
{% for choice in field.subwidgets %}
<td>
<input type="radio" name="{{ field.html_name }}" id="{{ choice.id_for_label }}" value="{{ choice.data.value }}"{{ choice|requiredhtml }}{{ choice|checkedhtml }}>
<td class="table-watching-option">
<label>
<input type="radio" name="{{ field.html_name }}" id="{{ choice.id_for_label }}" value="{{ choice.data.value }}"{{ choice|requiredhtml }}{{ choice|checkedhtml }}>
</label>
</td>
{% endfor %}
</tr>
{% endwith %}
{% with form.watch_new_private_threads_by_followed as field %}
<tr>
<td>{% trans "Private threads I am invited to by users I follow" context "account preferences page watch table" %}</td>
<td class="table-watching-label">
{% trans "Private threads I am invited to by users I follow" context "account preferences page watch table" %}
</td>
{% for choice in field.subwidgets %}
<td>
<input type="radio" name="{{ field.html_name }}" id="{{ choice.id_for_label }}" value="{{ choice.data.value }}"{{ choice|requiredhtml }}{{ choice|checkedhtml }}>
<td class="table-watching-option">
<label>
<input type="radio" name="{{ field.html_name }}" id="{{ choice.id_for_label }}" value="{{ choice.data.value }}"{{ choice|requiredhtml }}{{ choice|checkedhtml }}>
</label>
</td>
{% endfor %}
</tr>
{% endwith %}
{% with form.watch_new_private_threads_by_other_users as field %}
<tr>
<td>{% trans "Private threads I am invited to by other users" context "account preferences page watch table" %}</td>
<td class="table-watching-label">
{% trans "Private threads I am invited to by other users" context "account preferences page watch table" %}
</td>
{% for choice in field.subwidgets %}
<td>
<input type="radio" name="{{ field.html_name }}" id="{{ choice.id_for_label }}" value="{{ choice.data.value }}"{{ choice|requiredhtml }}{{ choice|checkedhtml }}>
<td class="table-watching-option">
<label>
<input type="radio" name="{{ field.html_name }}" id="{{ choice.id_for_label }}" value="{{ choice.data.value }}"{{ choice|requiredhtml }}{{ choice|checkedhtml }}>
</label>
</td>
{% endfor %}
</tr>
Expand All @@ -139,20 +155,20 @@ <h3 class="panel-title">
<legend>
{% trans "Notifications" context "account preferences page fieldset" %}
</legend>
<table class="table table-watching-preferences">
<table class="table-watching-preferences">
<tr>
<th>&nbsp;</th>
<th>
<th class="table-watching-option">
<attr title="{% trans 'Don\'t watch' context 'account preferences page watch table' %}">
<span class="material-icon">notifications_none</span>
</attr>
</th>
<th>
<th class="table-watching-option">
<attr title="{% trans 'Notify on site' context 'account preferences page watch table' %}">
<span class="material-icon">notifications_active</span>
</attr>
</th>
<th>
<th class="table-watching-option">
<attr title="{% trans 'Notify on site and with email' context 'account preferences page watch table' %}">
<span class="material-icon">notifications_active</span>
<span class="material-icon">add</span>
Expand All @@ -162,20 +178,24 @@ <h3 class="panel-title">
</tr>
{% with form.notify_new_private_threads_by_followed as field %}
<tr>
<td>Notify about new private threads by followed</td>
<td>{% trans "Notify about new private threads by users I follow" context "account preferences page notify table" %}</td>
{% for choice in field.subwidgets %}
<td>
<input type="radio" name="{{ field.html_name }}" id="{{ choice.id_for_label }}" value="{{ choice.data.value }}"{{ choice|requiredhtml }}{{ choice|checkedhtml }}>
<td class="table-watching-option">
<label>
<input type="radio" name="{{ field.html_name }}" id="{{ choice.id_for_label }}" value="{{ choice.data.value }}"{{ choice|requiredhtml }}{{ choice|checkedhtml }}>
</label>
</td>
{% endfor %}
</tr>
{% endwith %}
{% with form.notify_new_private_threads_by_other_users as field %}
<tr>
<td>Notify about new private threads by other users</td>
<td>{% trans "Notify about new private threads by other users" context "account preferences page notify table" %}</td>
{% for choice in field.subwidgets %}
<td>
<input type="radio" name="{{ field.html_name }}" id="{{ choice.id_for_label }}" value="{{ choice.data.value }}"{{ choice|requiredhtml }}{{ choice|checkedhtml }}>
<td class="table-watching-option">
<label>
<input type="radio" name="{{ field.html_name }}" id="{{ choice.id_for_label }}" value="{{ choice.data.value }}"{{ choice|requiredhtml }}{{ choice|checkedhtml }}>
</label>
</td>
{% endfor %}
</tr>
Expand Down

0 comments on commit 60e10d4

Please sign in to comment.