1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-22 11:57:34 +00:00

[Activities] 'Modified by': don't display the colon when no user is selected (#5808)

This commit is contained in:
llj
2023-12-01 15:04:12 +08:00
committed by GitHub
parent 825b3c33bf
commit 46e9c682d0

View File

@@ -73,10 +73,12 @@ class UserSelector extends Component {
return ( return (
<div className="mt-4 position-relative"> <div className="mt-4 position-relative">
<span className="cur-activity-modifiers d-inline-block p-2 rounded" onClick={this.onToggleClick}> <span className="cur-activity-modifiers d-inline-block p-2 rounded" onClick={this.onToggleClick}>
{gettext('Modified by:')} {currentSelectedUsers.length > 0 ? (
{currentSelectedUsers.length > 0 && ( <>
<span className="d-inline-block ml-1">{currentSelectedUsers.map(item => item.name).join(', ')}</span> <span>{gettext('Modified by:')}</span>
)} <span className="d-inline-block ml-1">{currentSelectedUsers.map(item => item.name).join(', ')}</span>
</>
) : gettext('Modified by')}
<i className="fas fa-caret-down ml-2 toggle-icon"></i> <i className="fas fa-caret-down ml-2 toggle-icon"></i>
</span> </span>
{isPopoverOpen && ( {isPopoverOpen && (