UX: class for small posts when assigns are private

This commit is contained in:
awesomerobot 2022-12-13 15:12:35 -05:00 committed by Alan Guo Xiang Tan
parent a907a98d87
commit 7ef731a5b0
No known key found for this signature in database
GPG Key ID: 3F656E28E3AADEF1
2 changed files with 14 additions and 0 deletions

View File

@ -489,6 +489,12 @@ function initialize(api) {
}
}
api.addPostSmallActionClassesCallback((post) => {
if (post.actionCode.includes("assigned") && !siteSettings.assigns_public) {
return ["private-assign"];
}
});
api.addAdvancedSearchOptions(
api.getCurrentUser() && api.getCurrentUser().can_assign
? {

View File

@ -258,3 +258,11 @@
}
}
}
.private-assign {
// when assigns are not public, make the description look like a whisper
.small-action-custom-message {
font-style: italic;
color: var(--primary-medium);
}
}