Skip to content

Commit

Permalink
disable blocked player's dropdown items - closes #15536
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Jun 16, 2024
1 parent caf1521 commit 222ad9d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions modules/relation/src/main/ui/RelationUi.scala
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ final class RelationUi(helpers: Helpers):
blocked: Boolean,
signup: Boolean = false
)(using ctx: Context) =
val blocks = relation.contains(Relation.Block)
div(cls := "relation-actions")(
(ctx.isnt(user) && !blocked).option(
(ctx.isnt(user) && !blocked && !blocks).option(
a(
cls := "text",
href := s"${routes.Lobby.home}?user=${user.name}#friend",
Expand All @@ -64,14 +65,14 @@ final class RelationUi(helpers: Helpers):
(!user.is(myId))
.so(
frag(
(!blocked && !user.isBot).option(
(!blocked && !blocks && !user.isBot).option(
a(
cls := "text",
href := routes.Msg.convo(user.name),
dataIcon := Icon.BubbleSpeech
)(trans.site.composeMessage.txt())
),
(!blocked && !user.isPatron).option(
(!blocked && !blocks && !user.isPatron).option(
a(
cls := "text",
href := s"${routes.Plan.list}?dest=gift&giftUsername=${user.name}",
Expand Down

0 comments on commit 222ad9d

Please sign in to comment.