mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-12 20:25:49 +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,
|
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 {
|
export {
|
||||||
PRIVATE_COLUMN_KEY,
|
PRIVATE_COLUMN_KEY,
|
||||||
CellType,
|
CellType,
|
||||||
|
@ -11,6 +11,7 @@ import { useMetadataDetails } from '../../hooks';
|
|||||||
import { checkIsDir } from '../../utils/row';
|
import { checkIsDir } from '../../utils/row';
|
||||||
import AI from './ai';
|
import AI from './ai';
|
||||||
import Settings from './settings';
|
import Settings from './settings';
|
||||||
|
import { FOLDER_NOT_DISPLAY_COLUMN_KEYS } from './constants';
|
||||||
|
|
||||||
import './index.css';
|
import './index.css';
|
||||||
|
|
||||||
@ -30,6 +31,7 @@ const MetadataDetails = () => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{displayColumns.map(field => {
|
{displayColumns.map(field => {
|
||||||
|
if (isDir && FOLDER_NOT_DISPLAY_COLUMN_KEYS.includes(field.key)) return null;
|
||||||
const value = getCellValueByColumn(record, field);
|
const value = getCellValueByColumn(record, field);
|
||||||
if (field.key === PRIVATE_COLUMN_KEY.LOCATION && isImage && value) {
|
if (field.key === PRIVATE_COLUMN_KEY.LOCATION && isImage && value) {
|
||||||
return (<Location key={field.key} position={value} record={record} />);
|
return (<Location key={field.key} position={value} record={record} />);
|
||||||
|
Loading…
Reference in New Issue
Block a user