mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-20 10:58:33 +00:00
feat: metadata view icon
This commit is contained in:
@@ -6,6 +6,7 @@ import Icon from '../../../components/icon';
|
|||||||
import ItemDropdownMenu from '../../../components/dropdown-menu/item-dropdown-menu';
|
import ItemDropdownMenu from '../../../components/dropdown-menu/item-dropdown-menu';
|
||||||
import { Rename } from '../../metadata-view/components/popover/view-popover';
|
import { Rename } from '../../metadata-view/components/popover/view-popover';
|
||||||
import { Utils, isMobile } from '../../../utils/utils';
|
import { Utils, isMobile } from '../../../utils/utils';
|
||||||
|
import { VIEW_TYPE_ICON } from '../../metadata-view/_basic';
|
||||||
|
|
||||||
import './index.css';
|
import './index.css';
|
||||||
|
|
||||||
@@ -158,7 +159,7 @@ const ViewItem = ({
|
|||||||
</div>
|
</div>
|
||||||
<div className="left-icon">
|
<div className="left-icon">
|
||||||
<div className="tree-node-icon">
|
<div className="tree-node-icon">
|
||||||
<Icon symbol={view.type ? view.type : 'table'} className="metadata-views-icon" />
|
<Icon symbol={VIEW_TYPE_ICON[view.type] || 'table'} className="metadata-views-icon" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="right-icon" id={`metadata-view-dropdown-item-${view._id}`} >
|
<div className="right-icon" id={`metadata-view-dropdown-item-${view._id}`} >
|
||||||
|
@@ -2,3 +2,9 @@ export const VIEW_TYPE = {
|
|||||||
TABLE: 'table',
|
TABLE: 'table',
|
||||||
GALLERY: 'gallery'
|
GALLERY: 'gallery'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const VIEW_TYPE_ICON = {
|
||||||
|
[VIEW_TYPE.TABLE]: 'table',
|
||||||
|
[VIEW_TYPE.GALLERY]: 'image',
|
||||||
|
'image': 'image'
|
||||||
|
};
|
||||||
|
@@ -57,6 +57,7 @@ export {
|
|||||||
LONG_TEXT_EXCEED_LIMIT_MESSAGE,
|
LONG_TEXT_EXCEED_LIMIT_MESSAGE,
|
||||||
LONG_TEXT_EXCEED_LIMIT_SUGGEST,
|
LONG_TEXT_EXCEED_LIMIT_SUGGEST,
|
||||||
VIEW_TYPE,
|
VIEW_TYPE,
|
||||||
|
VIEW_TYPE_ICON,
|
||||||
} from './constants';
|
} from './constants';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
|
Reference in New Issue
Block a user