mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 08:56:36 +08:00
UX: displays reads/likes in the same order that post menu buttons (#8140)
This commit is contained in:
parent
ceb29d3eea
commit
d0390fba3e
|
@ -525,6 +525,19 @@ export default createWidget("post-menu", {
|
|||
)
|
||||
];
|
||||
|
||||
if (state.readers.length) {
|
||||
const remaining = state.totalReaders - state.readers.length;
|
||||
contents.push(
|
||||
this.attach("small-user-list", {
|
||||
users: state.readers,
|
||||
addSelf: false,
|
||||
listClassName: "who-read",
|
||||
description: "post.actions.people.read",
|
||||
count: remaining
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
if (state.likedUsers.length) {
|
||||
const remaining = state.total - state.likedUsers.length;
|
||||
contents.push(
|
||||
|
@ -541,19 +554,6 @@ export default createWidget("post-menu", {
|
|||
);
|
||||
}
|
||||
|
||||
if (state.readers.length) {
|
||||
const remaining = state.totalReaders - state.readers.length;
|
||||
contents.push(
|
||||
this.attach("small-user-list", {
|
||||
users: state.readers,
|
||||
addSelf: false,
|
||||
listClassName: "who-read",
|
||||
description: "post.actions.people.read",
|
||||
count: remaining
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
return contents;
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user