mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-18 16:36:15 +00:00
Merge pull request #6696 from haiwen/feat-metadata-view-icon
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 { Rename } from '../../metadata-view/components/popover/view-popover';
|
||||
import { Utils, isMobile } from '../../../utils/utils';
|
||||
import { VIEW_TYPE_ICON } from '../../metadata-view/_basic';
|
||||
|
||||
import './index.css';
|
||||
|
||||
@@ -158,7 +159,7 @@ const ViewItem = ({
|
||||
</div>
|
||||
<div className="left-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 className="right-icon" id={`metadata-view-dropdown-item-${view._id}`} >
|
||||
|
@@ -2,3 +2,9 @@ export const VIEW_TYPE = {
|
||||
TABLE: 'table',
|
||||
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_SUGGEST,
|
||||
VIEW_TYPE,
|
||||
VIEW_TYPE_ICON,
|
||||
} from './constants';
|
||||
|
||||
export {
|
||||
|
Reference in New Issue
Block a user