move the mute button to less conspicious places

master
Aevann 2023-09-07 11:34:43 +03:00
parent 54350bf6ff
commit 76fd3d0d31
3 changed files with 28 additions and 5 deletions

View File

@ -2473,6 +2473,10 @@ a.bg-light:hover, a.bg-light:focus, button.bg-light:hover, button.bg-light:focus
margin-left: 0.5rem !important;
}
.mr-25 {
margin-right: 0.8rem !important;
}
.m-3 {
margin: 1rem !important;
}

View File

@ -232,11 +232,6 @@
{% if c.blackjack_result %}
{{c.blackjack_html | safe}}
{% endif %}
{% if (c.is_notif and c.author_id != AUTOJANNY_ID) or (request.path == '/notifications/messages' and c.author_id != v.id) %}
<button type="button" class="text-danger font-weight-bold ml-1 mt-2 mr-3 p-1 {% if v.has_muted(c.author) %}d-none{% endif %}" id="mute-notifs-{{c.id}}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/mute_notifs/{{c.author.id}}','mute-notifs-{{c.id}}','unmute-notifs-{{c.id}}','d-none')">Mute notifications from @{{c.author.username}}</button>
<button type="button" class="text-success font-weight-bold ml-1 mt-2 mr-3 p-1 {% if not v.has_muted(c.author) %}d-none{% endif %}" id="unmute-notifs-{{c.id}}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/unmute_notifs/{{c.author.id}}','mute-notifs-{{c.id}}','unmute-notifs-{{c.id}}','d-none')">Unmute notifications from @{{c.author.username}}</button>
{% endif %}
</div>
{{macros.reports(c, 'comment')}}
@ -428,6 +423,12 @@
<button type="button" id="unblock-{{c.id}}" class="dropdown-item text-success list-inline-item {% if not c.is_blocking %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/settings/unblock?username={{c.author_name}}','block-{{c.id}}','unblock-{{c.id}}','d-none')"><i class="fas fa-eye text-success"></i>Unblock user</button>
<button type="button" id="block-{{c.id}}" class="dropdown-item list-inline-item text-danger {% if c.is_blocking %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/settings/block?username={{c.author_name}}','block-{{c.id}}','unblock-{{c.id}}','d-none')"><i class="fas fa-eye-slash text-danger"></i>Block user</button>
{% if (c.is_notif and c.author_id != AUTOJANNY_ID) or request.path == '/notifications/messages' %}
<button type="button" id="mute-notifs-{{c.id}}" class="dropdown-item text-danger list-inline-item {% if v.has_muted(c.author) %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/mute_notifs/{{c.author.id}}','mute-notifs-{{c.id}}','unmute-notifs-{{c.id}}','d-none')"><i class="fas fa-bell-slash text-danger"></i>Mute notifications from user</button>
<button type="button" id="unmute-notifs-{{c.id}}" class="dropdown-item text-success list-inline-item {% if not v.has_muted(c.author) %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/unmute_notifs/{{c.author.id}}','mute-notifs-{{c.id}}','unmute-notifs-{{c.id}}','d-none')"><i class="fas fa-bell text-success mr-25"></i>Unmute notifications from user</button>
{% endif %}
{% endif %}
{% if c.parent_post %}
@ -609,6 +610,12 @@
<button type="button" id="unblock2-{{c.id}}" data-bs-dismiss="modal" class="text-success list-group-item {% if not c.is_blocking %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/settings/unblock?username={{c.author_name}}','block2-{{c.id}}','unblock2-{{c.id}}','d-none')"><i class="fas fa-eye text-success mr-2"></i>Unblock user</button>
<button type="button" id="block2-{{c.id}}" class="{% if c.is_blocking %}d-none{% endif %} list-group-item text-danger" data-areyousure="postToastSwitch(this,'/settings/block?username={{c.author_name}}','block2-{{c.id}}','unblock2-{{c.id}}','d-none')" data-nonce="{{g.nonce}}" data-onclick="areyousure(this)" data-dismiss="modal"><i class="fas fa-eye-slash fa-fw text-danger mr-2"></i>Block user</button>
{% if (c.is_notif and c.author_id != AUTOJANNY_ID) or request.path == '/notifications/messages' %}
<button type="button" id="mute-notifs2-{{c.id}}" class="{% if v.has_muted(c.author) %}d-none{% endif %} list-group-item text-danger" data-areyousure="postToastSwitch(this,'/mute_notifs/{{c.author.id}}','mute-notifs2-{{c.id}}','unmute-notifs2-{{c.id}}','d-none')" data-nonce="{{g.nonce}}" data-onclick="areyousure(this)" data-dismiss="modal"><i class="fas fa-bell-slash fa-fw text-danger mr-2"></i>Mute notifications from user</button>
<button type="button" id="unmute-notifs2-{{c.id}}" data-bs-dismiss="modal" class="text-success list-group-item {% if not v.has_muted(c.author) %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/unmute_notifs/{{c.author.id}}','mute-notifs2-{{c.id}}','unmute-notifs2-{{c.id}}','d-none')"><i class="fas fa-bell text-success mr-2"></i>Unmute notifications from user</button>
{% endif %}
{% endif %}
{% endif %}

View File

@ -176,6 +176,12 @@
{%- endif %}
<button type="button" class="btn btn-danger" data-nonce="{{g.nonce}}" data-onclick="postToastReload(this,'/settings/block?username={{u.username}}')">Block</button>
{% if u.id != AUTOJANNY_ID %}
<button type="button" id="mute-notifs" class="btn btn-danger {% if v.has_muted(u) %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/mute_notifs/{{u.id}}','mute-notifs','unmute-notifs','d-none')">Mute notifications from user</button>
<button type="button" id="unmute-notifs" class="btn btn-success {% if not v.has_muted(u) %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/unmute_notifs/{{u.id}}','mute-notifs','unmute-notifs','d-none')">Unmute notifications from user</button>
{% endif %}
</div>
</div>
<form class="d-none toggleable" id="message" action="/@{{u.username}}/message" method="post" data-nonce="{{g.nonce}}" data-onsubmit="sendMessage(this)">
@ -464,6 +470,12 @@
{%- endif %}
<button type="button" class="btn btn-danger" data-nonce="{{g.nonce}}" data-onclick="postToastReload(this,'/settings/block?username={{u.username}}')">Block</button>
{% if u.id != AUTOJANNY_ID %}
<button type="button" id="mute-notifs2" class="btn btn-danger {% if v.has_muted(u) %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/mute_notifs/{{u.id}}','mute-notifs2','unmute-notifs2','d-none')">Mute notifications from user</button>
<button type="button" id="unmute-notifs2" class="btn btn-success {% if not v.has_muted(u) %}d-none{% endif %}" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/unmute_notifs/{{u.id}}','mute-notifs2','unmute-notifs2','d-none')">Unmute notifications from user</button>
{% endif %}
{% endif %}
</div>