mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-24 12:58:34 +00:00
Optimize dropdown menu style (#7866)
* 01 remove custom dropdown menu style * 02 remove custom dropdown menu item style
This commit is contained in:
@@ -2,6 +2,8 @@
|
|||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* The sdoc-editor uses a specific style that cannot be modified,
|
||||||
|
so this special style can only be overridden in seahub */
|
||||||
.sdoc-editor-page-wrapper .sf-metadata-ai-dropdown-menu .dropdown-item:hover {
|
.sdoc-editor-page-wrapper .sf-metadata-ai-dropdown-menu .dropdown-item:hover {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
@@ -69,7 +69,7 @@ class Paginator extends Component {
|
|||||||
|
|
||||||
renderDropdownItem = (curPerPage, perPage) => {
|
renderDropdownItem = (curPerPage, perPage) => {
|
||||||
return (
|
return (
|
||||||
<DropdownItem onClick={() => {this.resetPerPage(perPage);}} key={perPage}>
|
<DropdownItem onClick={() => {this.resetPerPage(perPage);}} key={perPage} className='paginator-dropdown-item'>
|
||||||
<span className='paginator-dropdown-tick'>
|
<span className='paginator-dropdown-tick'>
|
||||||
{curPerPage === perPage && <i className="sf2-icon-tick"></i>}
|
{curPerPage === perPage && <i className="sf2-icon-tick"></i>}
|
||||||
</span>
|
</span>
|
||||||
@@ -111,7 +111,7 @@ class Paginator extends Component {
|
|||||||
<span className='pr-3'>{this.getPerPageText(curPerPage)}</span>
|
<span className='pr-3'>{this.getPerPageText(curPerPage)}</span>
|
||||||
<span className={className('sf3-font sf3-font-down d-inline-block', { 'rotate-180': this.state.isMenuShow })}></span>
|
<span className={className('sf3-font sf3-font-down d-inline-block', { 'rotate-180': this.state.isMenuShow })}></span>
|
||||||
</DropdownToggle>
|
</DropdownToggle>
|
||||||
<DropdownMenu>
|
<DropdownMenu className="paginator-dropdown-menu">
|
||||||
{PER_PAGES.map(perPage => {
|
{PER_PAGES.map(perPage => {
|
||||||
return this.renderDropdownItem(curPerPage, perPage);
|
return this.renderDropdownItem(curPerPage, perPage);
|
||||||
})}
|
})}
|
||||||
|
@@ -49,10 +49,6 @@
|
|||||||
max-width: 120px;
|
max-width: 120px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-filters-container .dropdown-menu {
|
|
||||||
max-height: 400px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-filter-menu.filter-by-text-menu,
|
.search-filter-menu.filter-by-text-menu,
|
||||||
.search-filter-menu.filter-by-date-menu,
|
.search-filter-menu.filter-by-date-menu,
|
||||||
.search-filter-menu.filter-by-creator-menu {
|
.search-filter-menu.filter-by-creator-menu {
|
||||||
@@ -95,8 +91,6 @@
|
|||||||
|
|
||||||
.search-filter-menu .dropdown-item {
|
.search-filter-menu .dropdown-item {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-filter-menu .dropdown-item .dropdown-item-tick {
|
.search-filter-menu .dropdown-item .dropdown-item-tick {
|
||||||
|
@@ -78,11 +78,11 @@ class ViewModes extends React.Component {
|
|||||||
<span className='view-modes-dropdown-tick'>
|
<span className='view-modes-dropdown-tick'>
|
||||||
{currentViewMode === item.value && <i className="sf2-icon-tick"></i>}
|
{currentViewMode === item.value && <i className="sf2-icon-tick"></i>}
|
||||||
</span>
|
</span>
|
||||||
<span className="view-modes-dropdown-content">
|
<span className="view-modes-dropdown-content d-flex align-items-center">
|
||||||
<span className={`sf3-font-${item.icon} sf3-font mr-2`}></span>
|
<span className={`sf3-font-${item.icon} sf3-font mr-2`}></span>
|
||||||
<span>{item.text}</span>
|
<span>{item.text}</span>
|
||||||
</span>
|
</span>
|
||||||
<span className="view-modes-dropdown-shortcut ml-4">{item.shortcut}</span>
|
<span className="view-modes-dropdown-shortcut ml-4 d-flex align-items-center">{item.shortcut}</span>
|
||||||
</div>
|
</div>
|
||||||
</DropdownItem>
|
</DropdownItem>
|
||||||
);
|
);
|
||||||
|
@@ -8,9 +8,4 @@
|
|||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
color: #666666;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown-item:hover .dropdown-item-tick {
|
|
||||||
color: #fff;
|
|
||||||
}
|
}
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
box-shadow: 0 0 0 2px rgba(70, 127, 207, 0.25);
|
box-shadow: 0 0 0 2px rgba(70, 127, 207, 0.25);
|
||||||
}
|
}
|
||||||
|
|
||||||
.paginator-dropdown .dropdown-menu {
|
.paginator-dropdown .paginator-dropdown-menu {
|
||||||
min-width: auto;
|
min-width: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -19,13 +19,13 @@
|
|||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
|
|
||||||
.paginator-dropdown .dropdown-menu .dropdown-item {
|
.paginator-dropdown .paginator-dropdown-menu .paginator-dropdown-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
padding-right: 24px;
|
padding-right: 24px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.paginator-dropdown .dropdown-menu .dropdown-item .paginator-dropdown-tick {
|
.paginator-dropdown .paginator-dropdown-menu .paginator-dropdown-item .paginator-dropdown-tick {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 14px;
|
width: 14px;
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
|
@@ -24,15 +24,6 @@
|
|||||||
width: 24px
|
width: 24px
|
||||||
}
|
}
|
||||||
|
|
||||||
.notification-header-close .dropdown-menu {
|
|
||||||
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
|
||||||
}
|
|
||||||
|
|
||||||
.notification-header-close .dtable-dropdown-menu.large.dropdown-menu .dropdown-item {
|
|
||||||
padding: 0.25rem 1.5rem;
|
|
||||||
min-height: unset;
|
|
||||||
}
|
|
||||||
|
|
||||||
.notification-list-content .notification-modal-body {
|
.notification-list-content .notification-modal-body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@@ -14,22 +14,4 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.view-modes-dropdown-content {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.view-modes-dropdown-shortcut {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
color: #666;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown-item:hover .view-modes-dropdown-shortcut {
|
|
||||||
color: #fff;
|
|
||||||
}
|
}
|
||||||
|
@@ -2,10 +2,10 @@ import React, { useState, forwardRef, useImperativeHandle, useCallback, useEffec
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { FormGroup, FormFeedback, Input } from 'reactstrap';
|
import { FormGroup, FormFeedback, Input } from 'reactstrap';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
import { gettext } from '../../../../../utils/constants';
|
import { gettext } from '../../../../utils/constants';
|
||||||
|
|
||||||
// eslint-disable-next-line react/display-name
|
// eslint-disable-next-line react/display-name
|
||||||
const Name = forwardRef(({ readOnly, value }, ref) => {
|
const ColumnName = forwardRef(({ readOnly, value }, ref) => {
|
||||||
const [error, setError] = useState('');
|
const [error, setError] = useState('');
|
||||||
const [name, setName] = useState(value || '');
|
const [name, setName] = useState(value || '');
|
||||||
|
|
||||||
@@ -39,9 +39,9 @@ const Name = forwardRef(({ readOnly, value }, ref) => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
Name.propTypes = {
|
ColumnName.propTypes = {
|
||||||
readOnly: PropTypes.bool,
|
readOnly: PropTypes.bool,
|
||||||
value: PropTypes.string,
|
value: PropTypes.string,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Name;
|
export default ColumnName;
|
@@ -3,13 +3,11 @@ import { FormGroup, FormFeedback, Label, Dropdown, DropdownToggle } from 'reacts
|
|||||||
import Icon from '@/components/icon';
|
import Icon from '@/components/icon';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
import { gettext } from '../../../../../utils/constants';
|
import { gettext } from '../../../../utils/constants';
|
||||||
import CustomDropdownMenu from '../dropdown-menu';
|
import CustomDropdownMenu from './dropdown-menu';
|
||||||
import ModalPortal from '../../../../../components/modal-portal';
|
import ModalPortal from '../../../../components/modal-portal';
|
||||||
|
|
||||||
import './index.css';
|
const ColumnType = forwardRef(({ column, onChange }, ref) => {
|
||||||
|
|
||||||
const Type = forwardRef(({ column, onChange }, ref) => {
|
|
||||||
const [error, setError] = useState('');
|
const [error, setError] = useState('');
|
||||||
const [isPredefinedPropertiesOpen, setPredefinedPropertiesOpen] = useState(false);
|
const [isPredefinedPropertiesOpen, setPredefinedPropertiesOpen] = useState(false);
|
||||||
const [isCustomPropertiesOpen, setCustomPropertiesOpen] = useState(false);
|
const [isCustomPropertiesOpen, setCustomPropertiesOpen] = useState(false);
|
||||||
@@ -74,10 +72,10 @@ const Type = forwardRef(({ column, onChange }, ref) => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
Type.propTypes = {
|
ColumnType.propTypes = {
|
||||||
parentWidth: PropTypes.number,
|
parentWidth: PropTypes.number,
|
||||||
column: PropTypes.object,
|
column: PropTypes.object,
|
||||||
onChange: PropTypes.func,
|
onChange: PropTypes.func,
|
||||||
};
|
};
|
||||||
|
|
||||||
export default Type;
|
export default ColumnType;
|
@@ -9,8 +9,8 @@ import ObjectUtils from '../../../../utils/object';
|
|||||||
import { getDefaultFileStatusOptions } from '../../../utils/column';
|
import { getDefaultFileStatusOptions } from '../../../utils/column';
|
||||||
import { ValidateColumnFormFields } from './utils';
|
import { ValidateColumnFormFields } from './utils';
|
||||||
import { COMMON_FORM_FIELD_TYPE } from './constants';
|
import { COMMON_FORM_FIELD_TYPE } from './constants';
|
||||||
import Name from './name';
|
import ColumnType from './column-type';
|
||||||
import Type from './type';
|
import ColumnName from './column-name';
|
||||||
import Data from './data';
|
import Data from './data';
|
||||||
|
|
||||||
import './index.css';
|
import './index.css';
|
||||||
@@ -86,8 +86,8 @@ const ColumnPopover = ({ target, column, onSelect, onCancel, onSubmit }) => {
|
|||||||
>
|
>
|
||||||
<div className="sf-metadata-column-popover-inner" ref={popoverInnerRef} style={{ width: popoverInnerWidth }}>
|
<div className="sf-metadata-column-popover-inner" ref={popoverInnerRef} style={{ width: popoverInnerWidth }}>
|
||||||
<div>
|
<div>
|
||||||
<Name ref={nameRef} readOnly={column?.unique} value={column?.unique ? column.name : ''} />
|
<ColumnName ref={nameRef} readOnly={column?.unique} value={column?.unique ? column.name : ''} />
|
||||||
<Type ref={typeRef} column={column} onChange={onColumnChange} />
|
<ColumnType ref={typeRef} column={column} onChange={onColumnChange} />
|
||||||
<Data ref={dataRef} column={column} />
|
<Data ref={dataRef} column={column} />
|
||||||
</div>
|
</div>
|
||||||
<div className={classnames('sf-metadata-column-popover-footer', { 'sf-metadata-number-column-popover-footer': column.type === CellType.NUMBER })}>
|
<div className={classnames('sf-metadata-column-popover-footer', { 'sf-metadata-number-column-popover-footer': column.type === CellType.NUMBER })}>
|
||||||
|
@@ -1,3 +0,0 @@
|
|||||||
.sf-metadata-column-type .dropdown-menu {
|
|
||||||
filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.1));
|
|
||||||
}
|
|
@@ -300,7 +300,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-item .collaborator,
|
.sf-metadata-filters-list .dropdown-item .collaborator,
|
||||||
.sf-metadata-filters-list .seafile-option-group .seafile-option-group-content .collaborator {
|
.sf-metadata-filters-list .seafile-option-group .seafile-option-group-content .collaborator {
|
||||||
background-color: unset;
|
background-color: unset;
|
||||||
}
|
}
|
||||||
|
@@ -1,12 +1,3 @@
|
|||||||
.excalidraw .dropdown-menu {
|
|
||||||
display: block !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.excalidraw .dropdown-menu {
|
|
||||||
--bs-dropdown-padding-x: auto;
|
|
||||||
border: unset;
|
|
||||||
}
|
|
||||||
|
|
||||||
.file-view-body #unfold-onlyoffice-file-view-header {
|
.file-view-body #unfold-onlyoffice-file-view-header {
|
||||||
right: 116px;
|
right: 116px;
|
||||||
z-index: 6
|
z-index: 6
|
||||||
|
@@ -1,8 +0,0 @@
|
|||||||
.dropdown-menu {
|
|
||||||
display: block !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.excalidraw .dropdown-menu {
|
|
||||||
--bs-dropdown-padding-x: auto;
|
|
||||||
border: unset;
|
|
||||||
}
|
|
@@ -2,8 +2,6 @@ import React, { useState, useEffect } from 'react';
|
|||||||
import SimpleViewer from './simple-viewer';
|
import SimpleViewer from './simple-viewer';
|
||||||
import editorApi from './editor-api';
|
import editorApi from './editor-api';
|
||||||
|
|
||||||
import './index.css';
|
|
||||||
|
|
||||||
const ExcaliViewer = () => {
|
const ExcaliViewer = () => {
|
||||||
const [fileContent, setFileContent] = useState(null);
|
const [fileContent, setFileContent] = useState(null);
|
||||||
const [isFetching, setIsFetching] = useState(true);
|
const [isFetching, setIsFetching] = useState(true);
|
||||||
|
@@ -229,6 +229,11 @@
|
|||||||
margin: 0.2rem 0;
|
margin: 0.2rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.page-operation-dropdown-menu .dropdown-item .sf3-font {
|
||||||
|
font-size: 14px;
|
||||||
|
margin-right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.wiki-nav .wiki-page-item.page-can-drop-bottom::after,
|
.wiki-nav .wiki-page-item.page-can-drop-bottom::after,
|
||||||
.wiki-nav .wiki-page-item.page-can-drop-top::after {
|
.wiki-nav .wiki-page-item.page-can-drop-top::after {
|
||||||
content: '';
|
content: '';
|
||||||
@@ -252,23 +257,6 @@
|
|||||||
background-color: rgb(200, 220, 240) !important;
|
background-color: rgb(200, 220, 240) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dtable-dropdown-menu .dropdown-item .sf3-font {
|
|
||||||
font-size: 14px;
|
|
||||||
margin-right: 10px;
|
|
||||||
color: #666;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dtable-dropdown-menu .dropdown-item:hover .sf3-font {
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dtable-dropdown-menu.large .dropdown-item {
|
|
||||||
min-height: 32px;
|
|
||||||
padding: 3px 12px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.wiki-nav,
|
.wiki-nav,
|
||||||
.wiki-nav .wiki-page-item .wiki-add-page-btn .sf3-font.sf3-font-enlarge:hover,
|
.wiki-nav .wiki-page-item .wiki-add-page-btn .sf3-font.sf3-font-enlarge:hover,
|
||||||
.wiki-nav .wiki-page-item .seafile-multicolor-icon-more-level:hover {
|
.wiki-nav .wiki-page-item .seafile-multicolor-icon-more-level:hover {
|
||||||
|
@@ -1326,10 +1326,7 @@ a.table-sort-op:hover {
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-item .sf3-font {
|
.dropdown-item .sf3-font,
|
||||||
color: #666;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dropdown-item .sf2-icon-tick {
|
.dropdown-item .sf2-icon-tick {
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user