1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-04-27 11:01:14 +00:00

Add metadata kanban collapsed tip (#7628)

* 01 change tip color to # 666

* 02 show tips when Kanban is collapsed

* 03 fix warning
This commit is contained in:
Michael An 2025-03-18 10:09:28 +08:00 committed by GitHub
parent 63c3b36b80
commit 0b698bf13c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 19 additions and 17 deletions

View File

@ -46,7 +46,7 @@
}
.old-history-main p {
color: #808080;
color: #666;
font-size: 12px;
margin-top: 0;
margin-bottom: 1rem;

View File

@ -113,7 +113,7 @@ body {
}
.tip {
color: #808080;
color: #666;
}
.file-details-container {

View File

@ -117,7 +117,7 @@
}
.tip {
color: #808080;
color: #666;
margin-bottom: 1rem;
}

View File

@ -9,6 +9,7 @@ import { CellType } from '../../../../../constants';
import './index.css';
const Header = ({ readonly, haveFreezed, value, groupByColumn, cardsQuantity, onDelete, onFreezed, onUnFreezed, isCollapsed, onCollapse }) => {
// eslint-disable-next-line no-unused-vars
const [active, setActive] = useState(false);
const headerRef = useRef();
@ -53,16 +54,14 @@ const Header = ({ readonly, haveFreezed, value, groupByColumn, cardsQuantity, on
)}
<span className="cards-quantity">{cardsQuantity}</span>
</div>
{active && (
<div className="board-header-operation-btn">
{value && !readonly && <OpMenu onDelete={onDelete} onFreezed={onFreezed} onUnFreezed={handelUnFreezed} />}
<i
className={classNames('sf3-font sf3-font-down kanban-header-op-btn kanban-header-collapse-btn', { 'rotate-90': isCollapsed })}
title={isCollapsed ? gettext('Expand') : gettext('Collapse')}
onClick={handleCollapse}>
</i>
</div>
)}
<div className="board-header-operation-btn">
{value && !readonly && <OpMenu onDelete={onDelete} onFreezed={onFreezed} onUnFreezed={handelUnFreezed} />}
<i
className={classNames('sf3-font sf3-font-down kanban-header-op-btn kanban-header-collapse-btn', { 'rotate-90': isCollapsed })}
title={isCollapsed ? gettext('Expand') : gettext('Collapse')}
onClick={handleCollapse}>
</i>
</div>
</div>
);
};

View File

@ -7,6 +7,7 @@ import Draggable from '../../dnd/draggable';
import { useMetadataView } from '../../../../hooks/metadata-view';
import { getRowById } from '../../../../../components/sf-table/utils/table';
import { getRecordIdFromRecord } from '../../../../utils/cell';
import { gettext } from '@/utils/constants';
import './index.css';
@ -73,7 +74,9 @@ const Board = ({
isCollapsed={isCollapsed}
onCollapse={onCollapse}
/>
{!isCollapsed && (
{isCollapsed ?
<div className="tip m-2">{gettext('This list is collapsed')}</div>
:
<Container
className='react-trello-board'
orientation="vertical"
@ -124,7 +127,7 @@ const Board = ({
);
})}
</Container>
)}
}
</section>
);
};

View File

@ -735,7 +735,7 @@ table img {
/* highlight */
.tip {
color: #808080;
color: #666;
font-size: 12px;
}

View File

@ -1342,7 +1342,7 @@ a.table-sort-op:hover {
margin: 2rem auto;
padding: 30px 40px;
font-size: 1rem;
color: #808080;
color: #666;
text-align: center;
}