Add UI to manage muted users
This commit is contained in:
parent
55c473e0f5
commit
0e172bb179
|
@ -4,6 +4,7 @@ class Settings::MutesController < ApplicationController
|
|||
before_action :authenticate_user!
|
||||
|
||||
def index
|
||||
@users = current_user.muted_users
|
||||
@rules = MuteRule.where(user: current_user)
|
||||
end
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
.d-flex.mb-2
|
||||
%img.avatar-md.mr-2{ src: user.profile_picture.url(:small), loading: :lazy }
|
||||
%p.align-self-center.m-0= user_screen_name(user, context_user: current_user)
|
||||
.ml-auto.d-inline-flex
|
||||
%button.btn.btn-default.align-self-center{ data: { action: :unmute, target: user.screen_name } }
|
||||
%span.pe-none= t("voc.unmute")
|
|
@ -1,8 +1,18 @@
|
|||
.card
|
||||
.card-body
|
||||
%h2= t(".heading")
|
||||
%p= t(".body")
|
||||
%p= t(".note")
|
||||
%h2= t(".users.heading")
|
||||
%p= t(".users.body")
|
||||
#users
|
||||
- @users.each do |user|
|
||||
= render "settings/mutes/user", user: user
|
||||
- if @users.empty?
|
||||
%p.text-muted.text-center= t(".users.none")
|
||||
|
||||
.card
|
||||
.card-body
|
||||
%h2= t(".terms.heading")
|
||||
%p= t(".terms.body")
|
||||
%p= t(".terms.note")
|
||||
#rules
|
||||
- @rules.each do |rule|
|
||||
= render "settings/mutes/rule", rule: rule
|
||||
|
|
|
@ -421,10 +421,15 @@ en:
|
|||
present: "Here's your export from %{time}"
|
||||
mutes:
|
||||
index:
|
||||
title: "Muted Terms"
|
||||
heading: "Muted Terms"
|
||||
body: "Muting words (or longer phrases) will prevent questions containing those to appear in your inbox."
|
||||
note: "Note: Filtered questions are discarded completely from your inbox, and won't reappear if you remove a filter later on."
|
||||
title: "Mutes"
|
||||
users:
|
||||
heading: "Muted Users"
|
||||
body: "Muting users will prevent their questions from showing up in your inbox. Additionally, any interaction from them will not generate a notification for you."
|
||||
none: "You are not muting anyone."
|
||||
terms:
|
||||
heading: "Muted Terms"
|
||||
body: "Muting words (or longer phrases) will prevent questions containing those to appear in your inbox."
|
||||
note: "Note: Filtered questions are discarded completely from your inbox, and won't reappear if you remove a filter later on."
|
||||
form:
|
||||
placeholder: "Add a new muted term…"
|
||||
privacy:
|
||||
|
|
Loading…
Reference in New Issue