mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-18 16:36:15 +00:00
01 no shared Wiki tip (#7540)
This commit is contained in:
@@ -18,6 +18,7 @@ const propTypes = {
|
||||
toggleAddWikiDialog: PropTypes.func,
|
||||
sidePanelRate: PropTypes.number,
|
||||
isSidePanelFolded: PropTypes.bool,
|
||||
noItemsTip: PropTypes.string,
|
||||
};
|
||||
|
||||
class WikiCardGroup extends Component {
|
||||
@@ -51,7 +52,7 @@ class WikiCardGroup extends Component {
|
||||
};
|
||||
|
||||
render() {
|
||||
const { wikis, title, isDepartment, toggleAddWikiDialog, group } = this.props;
|
||||
const { wikis, title, isDepartment, toggleAddWikiDialog, group, noItemsTip } = this.props;
|
||||
const containerWidth = this.getContainerWidth();
|
||||
const numberOfWiki = Math.floor(containerWidth / 180);
|
||||
const grids = (Math.floor((containerWidth - (numberOfWiki + 1) * 16) / numberOfWiki) + 'px ').repeat(numberOfWiki);
|
||||
@@ -67,6 +68,9 @@ class WikiCardGroup extends Component {
|
||||
<span className={`sf3-font nav-icon sf3-font-${(isDepartment && depIcon) ? 'department' : isDepartment ? 'group' : 'mine'}`} aria-hidden="true"></span>
|
||||
{title}
|
||||
</h4>
|
||||
{(wikis.length === 0 && noItemsTip) &&
|
||||
<div className="wiki-card-group-no-tip my-4">{noItemsTip}</div>
|
||||
}
|
||||
<div className='wiki-card-group-items' style={{ gridTemplateColumns: isMobile ? '48% 48%' : grids }} ref={this.groupItemsRef}>
|
||||
{wikis.map((wiki, index) => {
|
||||
return (isGroup ?
|
||||
|
@@ -2,6 +2,11 @@
|
||||
margin: 16px 0 10px;
|
||||
}
|
||||
|
||||
.wiki-card-group .wiki-card-group-no-tip {
|
||||
color: #666;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.wiki-card-group-items {
|
||||
display: grid;
|
||||
gap: 16px 16px;
|
||||
|
@@ -104,6 +104,7 @@ class WikiCardView extends Component {
|
||||
sidePanelRate={sidePanelRate}
|
||||
isSidePanelFolded={isSidePanelFolded}
|
||||
toggleAddWikiDialog={null}
|
||||
noItemsTip={gettext('No shared Wikis')}
|
||||
/>
|
||||
);
|
||||
for (let i = 0; i < groupWikis.length; i++) {
|
||||
|
Reference in New Issue
Block a user