1
0
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:
Aries 2025-03-12 17:46:36 +08:00 committed by GitHub
parent 8dc9d0cdd1
commit bddbf3663b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 0 deletions

View File

@ -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,

View File

@ -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} />);