1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-26 15:26:19 +00:00

Icon bg more (#7902)

* [op icon] changed the default color for all the operation icons; added background for the operation icons in 'views/people' items when hover on them

* ['system admin'] library view: added background for the items & the operation icons when hover on them

* [system admin] user/org/institution: added background for the 'edit' icons in the 'info' page when hover on them

* [system admin] user - Shared Libraries: added background for the items when hover on them

* [system admin] group - libraries: added background for the items & the operation icons when hover on them

* [system admin] group - members: added background for the operation icons when hover on them

* [system admin] org - groups: added background for the items & the operation icons when hover on them

* [system admin] org - libraries: added background for the items & the operation icons when hover on them

* [org admin] Devices - Desktop/Mobile: added background for the items & the operation icons when hover on them

* [org admin] Libraries - All/Trash: added background for the items & the operation icons when hover on them

* [org admin] Users - All/Admin: fixup for the operation icons when hover on them

* [org admin] Users - user - profile: added background for the operation icons when hover on them

* [org admin] Users - user - owned libraries: added background for the items & the operation icons when hover on them

* [org admin] Groups: fixup for the operation icons when hover on them

* [org admin] Groups - Group - Libraries: added background for the items & the operation icons when hover on them

* [org admin] Search Groups: fixup for the operation icons when hover on them

* [org admin] Departments - Department - Members: fixup for the operation icons when hover on them

* [org admin] Links - All Public Links: fixup for the operation icons when hover on them

* [org admin] Logs - File Access: added background for the operation icons when hover on them

* [org admin] Logs - Permission: added background for the operation icons when hover on them

* [org admin] Logs - File Update: added background for the operation icons when hover on them

* fixup
This commit is contained in:
llj
2025-06-09 10:11:02 +08:00
committed by GitHub
parent 9031109f23
commit f0f255a03a
23 changed files with 287 additions and 127 deletions

View File

@@ -173,7 +173,6 @@ class RepoItem extends React.Component {
};
onDropdownToggleClick = (e) => {
e.preventDefault();
this.toggleOperationMenu(e);
};
@@ -243,7 +242,8 @@ class RepoItem extends React.Component {
{isOperationMenuShow &&
<Dropdown isOpen={this.state.isItemMenuShow} toggle={this.toggleOperationMenu}>
<DropdownToggle
tag="a"
tag="i"
role="button"
className="op-icon sf3-font-more sf3-font"
title={gettext('More operations')}
aria-label={gettext('More operations')}

View File

@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import { Button } from 'reactstrap';
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime';
import classnames from 'classnames';
import { Utils } from '../../../utils/utils';
import { orgAdminAPI } from '../../../utils/org-admin-api';
import { gettext, orgID } from '../../../utils/constants';
@@ -69,15 +70,17 @@ class Content extends Component {
</thead>
<tbody>
{items.map((item, index) => {
return (<Item
key={index}
repo={item}
isItemFreezed={this.state.isItemFreezed}
onFreezedItem={this.onFreezedItem}
onUnfreezedItem={this.onUnfreezedItem}
onDeleteRepo={this.props.onDeleteRepo}
onRestoreRepo={this.props.onRestoreRepo}
/>);
return (
<Item
key={index}
repo={item}
isItemFreezed={this.state.isItemFreezed}
onFreezedItem={this.onFreezedItem}
onUnfreezedItem={this.onUnfreezedItem}
onDeleteRepo={this.props.onDeleteRepo}
onRestoreRepo={this.props.onRestoreRepo}
/>
);
})}
</tbody>
</table>
@@ -117,7 +120,7 @@ class Item extends Component {
constructor(props) {
super(props);
this.state = {
highlight: false,
isHighlighted: false,
isOpIconShown: false,
isDeleteRepoDialogOpen: false,
isRestoreRepoDialogOpen: false
@@ -128,7 +131,7 @@ class Item extends Component {
if (!this.props.isItemFreezed) {
this.setState({
isOpIconShown: true,
highlight: true
isHighlighted: true
});
}
};
@@ -137,14 +140,14 @@ class Item extends Component {
if (!this.props.isItemFreezed) {
this.setState({
isOpIconShown: false,
highlight: false
isHighlighted: false
});
}
};
onUnfreezedItem = () => {
this.setState({
highlight: false,
isHighlighted: false,
isOpIconShow: false
});
this.props.onUnfreezedItem();
@@ -219,14 +222,20 @@ class Item extends Component {
render() {
const { repo } = this.props;
const { isOpIconShown, isDeleteRepoDialogOpen, isRestoreRepoDialogOpen } = this.state;
const { isHighlighted, isOpIconShown, isDeleteRepoDialogOpen, isRestoreRepoDialogOpen } = this.state;
const iconUrl = Utils.getLibIconUrl(repo);
const iconTitle = Utils.getLibIconTitle(repo);
const repoName = '<span class="op-target">' + Utils.HTMLescape(repo.name) + '</span>';
return (
<Fragment>
<tr onMouseEnter={this.handleMouseOver} onMouseLeave={this.handleMouseOut}>
<tr
className={classnames({
'tr-highlight': isHighlighted
})}
onMouseEnter={this.handleMouseOver}
onMouseLeave={this.handleMouseOut}
>
<td><img src={iconUrl} title={iconTitle} alt={iconTitle} width="24" /></td>
<td>{repo.name}</td>
<td>