UX: show like icon on archived posts (#7775)
This commit is contained in:
parent
feda7e1ddf
commit
2738d11f60
|
@ -61,9 +61,15 @@ function likeCount(attrs) {
|
||||||
? "post.has_likes_title_only_you"
|
? "post.has_likes_title_only_you"
|
||||||
: "post.has_likes_title_you"
|
: "post.has_likes_title_you"
|
||||||
: "post.has_likes_title";
|
: "post.has_likes_title";
|
||||||
const icon = attrs.yours ? "d-liked" : "";
|
let icon = attrs.yours ? "d-liked" : "";
|
||||||
|
let addContainer = attrs.yours;
|
||||||
const additionalClass = attrs.yours ? "my-likes" : "regular-likes";
|
const additionalClass = attrs.yours ? "my-likes" : "regular-likes";
|
||||||
|
|
||||||
|
if (!attrs.showLike) {
|
||||||
|
icon = attrs.yours ? "d-liked" : "d-unliked";
|
||||||
|
addContainer = true;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
action: "toggleWhoLiked",
|
action: "toggleWhoLiked",
|
||||||
title,
|
title,
|
||||||
|
@ -71,7 +77,7 @@ function likeCount(attrs) {
|
||||||
contents: count,
|
contents: count,
|
||||||
icon,
|
icon,
|
||||||
iconRight: true,
|
iconRight: true,
|
||||||
addContainer: attrs.yours,
|
addContainer,
|
||||||
titleOptions: { count: attrs.liked ? count - 1 : count }
|
titleOptions: { count: attrs.liked ? count - 1 : count }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,8 +65,9 @@ nav.post-controls {
|
||||||
}
|
}
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
margin-right: 0;
|
margin-right: 0;
|
||||||
&.my-likes {
|
&.my-likes,
|
||||||
// Like count on my posts
|
&.regular-likes {
|
||||||
|
// Like count on posts
|
||||||
.d-icon {
|
.d-icon {
|
||||||
color: $primary-low-mid;
|
color: $primary-low-mid;
|
||||||
padding-left: 0.45em;
|
padding-left: 0.45em;
|
||||||
|
|
|
@ -47,7 +47,8 @@ span.badge-posts {
|
||||||
+ .create-flag {
|
+ .create-flag {
|
||||||
padding: s(2 2 2 1);
|
padding: s(2 2 2 1);
|
||||||
}
|
}
|
||||||
&.my-likes {
|
&.my-likes,
|
||||||
|
&.regular-likes {
|
||||||
display: flex;
|
display: flex;
|
||||||
max-width: unset;
|
max-width: unset;
|
||||||
padding: s(2);
|
padding: s(2);
|
||||||
|
|
Loading…
Reference in New Issue