1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-24 04:48:03 +00:00
* ['Files', 'my libs', 'shared with me', 'shared with all', 'group', 'department' pages] added background to the library items' operation icons when hovering on them

* ['share' dialog] 'Share Link'(link list, link-authenticated-emails, link-authenticated-users): added background to the items' operation icons when hovering on them

* ['share' dialog] 'Share to user': added background for the sharing items and the operation icons when hover on them

* [select editor] improved it; added background to the 'edit' icon when hover on it

* ['share' dialog] 'Share to group': added background for the sharing items and the operation icons when hover on them; fixed it for mobile

* ['share' dialog] 'Custom sharing permissions': added background for the permission items and the operation icons when hover on them

* ['share' dialog] 'Invite Guest': added background for the items and the operation icons when hover on them

* ['share' dialog] 'Share to other server': added background for the items and the operation icons when hover on them

* [repo 'Folder Permission' dialog] 'User Permission': added background for the items and the operation icons when hover on them

* [repo 'Folder Permission' dialog] 'Group Permission': added background for the items and the operation icons when hover on them

* [repo 'Share Admin' dialog] 'Share Link': added background for the sharing items and the operation icons when hover on them; improved it

* [repo 'Share Admin' dialog] 'Upload Link': added background for the sharing items and the operation icons when hover on them; improved it

* [repo 'Share Admin' dialog] 'User Shares': added background for the sharing items and the operation icons when hover on them; improved the permission editor

* [repo 'Share Admin' dialog] 'Group Shares': added background for the sharing items and the operation icons when hover on them; improved the permission editor

* [repo 'API Token' dialog] added background for the items and the operation icons when hover on them

* [group/department 'Manage group members' dialog] added background for the operation icons when hover on them

* ['select members from departments' dialog] added background for the operation icons when hover on them

* [library list pages] removed the background when hover on the 'star/unstar' icons of the library items

* ['back' icons] added background for the 'go back' icons when hover on them

* ['my deleted repos' dialog] added background for the operation icons when hover on them

* ['Favorites' page] added background for the items and the operation icons when hover on them

* ['Wikis' page] added background for the operation icons when hover on them

* ['Invite Guest' page] added background for the items and the operation icons when hover on them

* ['Share Admin'] 'Libraries' page: added background for the items and the operation icons when hover on them

* ['Share Admin'] 'Folders' page: added background for the items and the operation icons when hover on them

* ['Share Admin'] 'Share Links' page: added background for the items and the operation icons when hover on them

* ['Share Admin'] 'Upload Links' page: added background for the operation icons when hover on them

* [repo 'Modification History' dialog] added background for the operation icons when hover on them

* [repo 'Snapshot' page] added background for the items and  the operation icons when hover on them

* [folder 'share link' page] added background for the items and the operation icons when hover on them

* [file 'History Versions' page] changed the 'more' icon and added background for the the operation icons when hover on them

* [personal 'settings' page] 'Linked Devices': added background for the items and the operation icons when hover on them

* ['library view' page] 'move/copy' dialog: added background for the 'clear search keyword' icon when hover on it

* ['library view' page] added background for the operation icons when hover on them

* ['system admin'] 'Devices' pages: added background for the items and the operation icons when hover on them

* [system admin] repos/users/groups/inst/... pages: added background for the operation icons when hover on them

* [system admin] 'Libraries - Trash' page: added background for the items and the operation icons when hover on them

* [system admin] 'Users' pages: added background for the operation icons when hover on them

* [system admin] 'Departments' pages: added background for the operation icons when hover on them

* [system admin] 'Organizations' & 'Search Organizations' pages: added background for the operation icons when hover on them

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

* [system admin] 'terms and conditions' pages: added background for items & the operation icons when hover on them

* [system admin] 'Links - Share Links' pages: added background for items & the operation icons when hover on them

* [system admin] 'Links - Upload Links' pages: added background for items & the operation icons when hover on them

* org page use new op-icon

* use common edit icon

---------

Co-authored-by: Michael An <1822852997@qq.com>
This commit is contained in:
llj
2025-05-31 12:01:08 +08:00
committed by GitHub
parent 7897420e2b
commit e9f8a52abe
69 changed files with 910 additions and 529 deletions

View File

@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import { createRoot } from 'react-dom/client';
import { Dropdown, DropdownToggle, DropdownMenu, DropdownItem } from 'reactstrap';
import dayjs from 'dayjs';
import classnames from 'classnames';
import relativeTime from 'dayjs/plugin/relativeTime';
import Account from './components/common/account';
import { useGoFileserver, fileServerRoot, gettext, siteRoot, mediaUrl, logoPath, logoWidth, logoHeight, siteTitle,
@@ -1066,6 +1067,7 @@ class Item extends React.Component {
constructor(props) {
super(props);
this.state = {
isHighlighted: false,
isIconShown: false,
isOpMenuOpen: false
};
@@ -1076,11 +1078,17 @@ class Item extends React.Component {
};
handleMouseOver = () => {
this.setState({ isIconShown: true });
this.setState({
isHighlighted: true,
isIconShown: true
});
};
handleMouseOut = () => {
this.setState({ isIconShown: false });
this.setState({
isHighlighted: false,
isIconShown: false
});
};
zipDownloadFolder = (e) => {
@@ -1111,10 +1119,17 @@ class Item extends React.Component {
render() {
const { item, isDesktop, mode } = this.props;
const { isIconShown } = this.state;
const { isIconShown, isHighlighted } = this.state;
if (item.is_dir) {
return isDesktop ? (
<tr onMouseOver={this.handleMouseOver} onMouseOut={this.handleMouseOut} onFocus={this.handleMouseOver}>
<tr
className={classnames({
'tr-highlight': isHighlighted
})}
onMouseOver={this.handleMouseOver}
onMouseOut={this.handleMouseOut}
onFocus={this.handleMouseOver}
>
{showDownloadIcon &&
<td className="text-center">
<input type="checkbox" checked={item.isSelected} onChange={this.toggleItemSelected} />
@@ -1155,7 +1170,14 @@ class Item extends React.Component {
const fileURL = `${siteRoot}d/${token}/files/?p=${encodeURIComponent(item.file_path)}`;
const thumbnailURL = item.encoded_thumbnail_src ? `${siteRoot}${item.encoded_thumbnail_src}?mtime=${item.last_modified}` : '';
return isDesktop ? (
<tr onMouseOver={this.handleMouseOver} onMouseOut={this.handleMouseOut} onFocus={this.handleMouseOver}>
<tr
className={classnames({
'tr-highlight': isHighlighted
})}
onMouseOver={this.handleMouseOver}
onMouseOut={this.handleMouseOut}
onFocus={this.handleMouseOver}
>
{showDownloadIcon &&
<td className="text-center">
<input type="checkbox" checked={item.isSelected} onChange={this.toggleItemSelected} />