1
0
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:
杨国璇
2024-09-03 11:05:44 +08:00
committed by GitHub
3 changed files with 9 additions and 1 deletions

View File

@@ -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}`} >

View File

@@ -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'
};

View File

@@ -57,6 +57,7 @@ export {
LONG_TEXT_EXCEED_LIMIT_MESSAGE,
LONG_TEXT_EXCEED_LIMIT_SUGGEST,
VIEW_TYPE,
VIEW_TYPE_ICON,
} from './constants';
export {