1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-27 23:56:18 +00:00

Feature/year month day mode in gallery (#6725)

* add date mode in gallery

* replace localStorage with sfMetadataContext.localStorage, update date tag render

* update string to support translation, fix images shift up when date tag was hidden

* update gallery ui

* fix conflicts, update gallery-group-by-setter

* fix conflict
This commit is contained in:
Aries
2024-09-18 10:16:31 +08:00
committed by GitHub
parent ce39cbdc8c
commit 25f12a252d
12 changed files with 205 additions and 34 deletions

View File

@@ -1,6 +1,6 @@
import React, { useCallback, useEffect, useMemo, useState } from 'react';
import PropTypes from 'prop-types';
import { SliderSetter, FilterSetter, GroupbySetter, SortSetter, HideColumnSetter } from '../data-process-setter';
import { GalleryGroupBySetter, GallerySliderSetter, FilterSetter, GroupbySetter, SortSetter, HideColumnSetter } from '../data-process-setter';
import { EVENT_BUS_TYPE, VIEW_TYPE } from '../../constants';
import './index.css';
@@ -71,7 +71,12 @@ const ViewToolBar = ({ viewId }) => {
onClick={onHeaderClick}
>
<div className="sf-metadata-tool-left-operations">
{view.type === VIEW_TYPE.GALLERY && <SliderSetter view={view} />}
{viewType === VIEW_TYPE.GALLERY && (
<>
<GalleryGroupBySetter view={view} />
<GallerySliderSetter view={view} />
</>
)}
<FilterSetter
isNeedSubmit={true}
wrapperClass="sf-metadata-view-tool-operation-btn sf-metadata-view-tool-filter"