1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-03 07:55:36 +00:00

01 change grid mode library style (#6238)

This commit is contained in:
Michael An
2024-06-20 15:22:47 +08:00
committed by GitHub
parent c3f89f41ed
commit fd2d6c5c82
4 changed files with 32 additions and 31 deletions

View File

@@ -631,6 +631,7 @@ class SharedRepoListItem extends React.Component {
};
renderPCUI = () => {
const { isStarred } = this.state;
let { iconUrl, iconTitle, libPath } = this.getRepoComputeParams();
const { repo, currentViewMode } = this.props;
return currentViewMode == 'list' ? (
@@ -679,14 +680,16 @@ class SharedRepoListItem extends React.Component {
<Rename name={repo.repo_name} onRenameConfirm={this.onRenameConfirm} onRenameCancel={this.onRenameCancel} /> :
<Fragment>
<Link to={libPath} className="library-name text-truncate" title={repo.repo_name}>{repo.repo_name}</Link>
<i
role="button"
title={this.state.isStarred ? gettext('Unstar') : gettext('Star')}
aria-label={this.state.isStarred ? gettext('Unstar') : gettext('Star')}
onClick={this.onToggleStarRepo}
className={`op-icon library-grid-item-icon ${this.state.isStarred ? 'sf3-font-star' : 'sf3-font-star-empty'} sf3-font`}
>
</i>
{isStarred &&
<i
role="button"
title={gettext('Unstar')}
aria-label={gettext('Unstar')}
onClick={this.onToggleStarRepo}
className='op-icon library-grid-item-icon sf3-font-star sf3-font'
>
</i>
}
{repo.monitored && <RepoMonitoredIcon repoID={repo.repo_id} className="op-icon library-grid-item-icon" />}
</Fragment>
}