diff --git a/frontend/src/components/dialog/trash-dialog.js b/frontend/src/components/dialog/trash-dialog.js
index c6cab012a9..b9cefedc5c 100644
--- a/frontend/src/components/dialog/trash-dialog.js
+++ b/frontend/src/components/dialog/trash-dialog.js
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import { navigate } from '@gatsbyjs/reach-router';
import { Modal, ModalHeader, ModalBody } from 'reactstrap';
import moment from 'moment';
-import { Utils } from '../../utils/utils';
+import { Utils, isMobile } from '../../utils/utils';
import { gettext, siteRoot, enableUserCleanTrash, username } from '../../utils/constants';
import { seafileAPI } from '../../utils/seafile-api';
import { repotrashAPI } from '../../utils/repo-trash-api';
@@ -338,7 +338,7 @@ class Item extends React.Component {
{moment(item.deleted_time).format('YYYY-MM-DD')} |
|
- {gettext('Restore')}
+ {gettext('Restore')}
|
) : (
@@ -349,7 +349,7 @@ class Item extends React.Component {
{moment(item.deleted_time).format('YYYY-MM-DD')} |
{Utils.bytesToSize(item.size)} |
- {gettext('Restore')}
+ {gettext('Restore')}
|
);
diff --git a/frontend/src/components/dropdown-menu/item-dropdown-menu.js b/frontend/src/components/dropdown-menu/item-dropdown-menu.js
index bd32e72221..ec393447a3 100644
--- a/frontend/src/components/dropdown-menu/item-dropdown-menu.js
+++ b/frontend/src/components/dropdown-menu/item-dropdown-menu.js
@@ -16,12 +16,14 @@ const propTypes = {
onMenuItemClick: PropTypes.func.isRequired,
freezeItem: PropTypes.func,
unfreezeItem: PropTypes.func,
+ menuStyle: PropTypes.object,
};
class ItemDropdownMenu extends React.Component {
static defaultProps = {
isHandleContextMenuEvent: true,
+ menuStyle: {},
toggleClass: 'sf3-font-more sf3-font'
};
@@ -109,7 +111,7 @@ class ItemDropdownMenu extends React.Component {
render() {
let menuList = this.state.menuList;
- let { toggleClass, toggleChildren, tagName } = this.props;
+ let { toggleClass, toggleChildren, tagName, menuStyle } = this.props;
toggleClass = 'sf-dropdown-toggle ' + toggleClass;
if (!menuList.length) {
@@ -160,7 +162,7 @@ class ItemDropdownMenu extends React.Component {
// onClick={this.onDropdownToggleClick}
/>
-
+
{menuList.map((menuItem, index) => {
if (menuItem === 'Divider') {
return ;
diff --git a/frontend/src/components/tree-section/index.js b/frontend/src/components/tree-section/index.js
index 40f8724f1c..6e7bedaf47 100644
--- a/frontend/src/components/tree-section/index.js
+++ b/frontend/src/components/tree-section/index.js
@@ -2,6 +2,7 @@ import React, { useCallback, useMemo, useState } from 'react';
import PropTypes from 'prop-types';
import classnames from 'classnames';
import ItemDropdownMenu from '../dropdown-menu/item-dropdown-menu';
+import { isMobile } from '../../utils/utils';
import './index.css';
@@ -63,6 +64,7 @@ const TreeSection = ({ title, children, moreKey, moreOperations, moreOperationCl
unfreezeItem={unfreezeItem}
getMenuList={() => validMoreOperations}
onMenuItemClick={moreOperationClick}
+ menuStyle={isMobile ? { zIndex: 1050 } : {}}
/>
>
diff --git a/frontend/src/components/tree-view/tree-node-view.js b/frontend/src/components/tree-view/tree-node-view.js
index e38e9ddbdb..9de6359485 100644
--- a/frontend/src/components/tree-view/tree-node-view.js
+++ b/frontend/src/components/tree-view/tree-node-view.js
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
import { permission } from '../../utils/constants';
import TextTranslation from '../../utils/text-translation';
import ItemDropdownMenu from '../dropdown-menu/item-dropdown-menu';
-import { Utils } from '../../utils/utils';
+import { Utils, isMobile } from '../../utils/utils';
const LEFT_INDENT = 20;
@@ -325,6 +325,7 @@ class TreeNodeView extends React.Component {
onMenuItemClick={this.onMenuItemClick}
freezeItem={this.props.freezeItem}
unfreezeItem={this.unfreezeItem}
+ menuStyle={isMobile ? { zIndex: 1050 } : {}}
/>
)}
diff --git a/frontend/src/css/trash-dialog.css b/frontend/src/css/trash-dialog.css
index 6b308bcbd8..c382675216 100644
--- a/frontend/src/css/trash-dialog.css
+++ b/frontend/src/css/trash-dialog.css
@@ -42,3 +42,9 @@
color: #000;
background: #dfdfdf;
}
+
+@media (max-width: 768px) {
+ .trash-dialog .modal-header .trash-dialog-old-page {
+ font-size: 14px;
+ }
+}
diff --git a/frontend/src/metadata/metadata-tree-view/view-item/index.js b/frontend/src/metadata/metadata-tree-view/view-item/index.js
index dde1c184de..cd68c6b427 100644
--- a/frontend/src/metadata/metadata-tree-view/view-item/index.js
+++ b/frontend/src/metadata/metadata-tree-view/view-item/index.js
@@ -5,9 +5,10 @@ import { gettext } from '../../../utils/constants';
import Icon from '../../../components/icon';
import ItemDropdownMenu from '../../../components/dropdown-menu/item-dropdown-menu';
import NameDialog from '../name-dialog';
+import { Utils, isMobile } from '../../../utils/utils';
import './index.css';
-import { Utils } from '../../../utils/utils';
+
const ViewItem = ({
canDelete,
@@ -23,14 +24,17 @@ const ViewItem = ({
const [freeze, setFreeze] = useState(false);
const [isShowRenameDialog, setRenameDialogShow] = useState(false);
const [isDropShow, setDropShow] = useState(false);
+
const canUpdate = useMemo(() => {
if (userPerm !== 'rw' && userPerm !== 'admin') return false;
return true;
}, [userPerm]);
+
const canDrop = useMemo(() => {
if (Utils.isIEBrowser() || !canUpdate) return false;
return true;
}, [canUpdate]);
+
const operations = useMemo(() => {
if (!canUpdate) return [];
let value = [
@@ -159,6 +163,7 @@ const ViewItem = ({
unfreezeItem={unfreezeItem}
getMenuList={() => operations}
onMenuItemClick={operationClick}
+ menuStyle={isMobile ? { zIndex: 1050 } : {}}
/>
)}
diff --git a/frontend/src/user-notifications.js b/frontend/src/user-notifications.js
index 7fc2959cc4..7736177046 100644
--- a/frontend/src/user-notifications.js
+++ b/frontend/src/user-notifications.js
@@ -104,8 +104,13 @@ class UserNotificationsDialog extends React.Component {
return (
-
-
+
+
{gettext('Mark all read')}