mirror of
https://github.com/haiwen/seahub.git
synced 2025-04-27 11:01:14 +00:00
optimize folder details display (#7596)
Co-authored-by: zhouwenxuan <aries@Mac.local>
This commit is contained in:
parent
8dc9d0cdd1
commit
bddbf3663b
@ -26,6 +26,13 @@ export const NOT_DISPLAY_COLUMN_KEYS = [
|
||||
PRIVATE_COLUMN_KEY.LOCATION_TRANSLATED,
|
||||
];
|
||||
|
||||
export const FOLDER_NOT_DISPLAY_COLUMN_KEYS = [
|
||||
PRIVATE_COLUMN_KEY.LOCATION,
|
||||
PRIVATE_COLUMN_KEY.TAGS,
|
||||
PRIVATE_COLUMN_KEY.FILE_DESCRIPTION,
|
||||
PRIVATE_COLUMN_KEY.CAPTURE_TIME,
|
||||
];
|
||||
|
||||
export {
|
||||
PRIVATE_COLUMN_KEY,
|
||||
CellType,
|
||||
|
@ -11,6 +11,7 @@ import { useMetadataDetails } from '../../hooks';
|
||||
import { checkIsDir } from '../../utils/row';
|
||||
import AI from './ai';
|
||||
import Settings from './settings';
|
||||
import { FOLDER_NOT_DISPLAY_COLUMN_KEYS } from './constants';
|
||||
|
||||
import './index.css';
|
||||
|
||||
@ -30,6 +31,7 @@ const MetadataDetails = () => {
|
||||
return (
|
||||
<>
|
||||
{displayColumns.map(field => {
|
||||
if (isDir && FOLDER_NOT_DISPLAY_COLUMN_KEYS.includes(field.key)) return null;
|
||||
const value = getCellValueByColumn(record, field);
|
||||
if (field.key === PRIVATE_COLUMN_KEY.LOCATION && isImage && value) {
|
||||
return (<Location key={field.key} position={value} record={record} />);
|
||||
|
Loading…
Reference in New Issue
Block a user