Fix #87: Add a badge when an account follows you.

This commit is contained in:
Nicolas Perriault 2017-05-06 00:06:32 +02:00
parent c6e1fa9fd4
commit 28ec437644
No known key found for this signature in database
GPG Key ID: DA5E4C83904F7A2A
2 changed files with 16 additions and 1 deletions

View File

@ -456,6 +456,10 @@ body {
color: #fff;
}
.followed-by {
margin-left: 5px;
}
/* Viewer */
.viewer {

View File

@ -156,7 +156,18 @@ accountView currentUser account relationship panelContent =
[ followButton currentUser relationship account
, Common.accountAvatarLink True account
, span [ class "account-display-name" ] [ text account.display_name ]
, span [ class "account-username" ] [ Common.accountLink True account ]
, span [ class "account-username" ]
[ Common.accountLink True account
, case relationship of
Just relationship ->
if relationship.followed_by then
span [ class "badge followed-by" ] [ text "Follows you" ]
else
text ""
Nothing ->
text ""
]
, span [ class "account-note" ] (formatContent account.note [])
]
]