1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-13 05:39:59 +00:00

Feature/gallery view (#6578)

* add gallery view, display images in grid layout

* remove redundant code

* clean up redundant code, improve responsive gallery

* improve gaps in gallery
This commit is contained in:
Aries
2024-08-21 17:14:57 +08:00
committed by GitHub
parent 6f5f1f0e05
commit ce3ffff54d
21 changed files with 254 additions and 46 deletions

View File

@@ -107,8 +107,8 @@ export const MetadataProvider = ({ repoID, hideMetadataView, selectMetadataView,
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [repoID, selectMetadataView]);
const addView = useCallback((name, successCallback, failCallback) => {
metadataAPI.addView(repoID, name).then(res => {
const addView = useCallback((name, type, successCallback, failCallback) => {
metadataAPI.addView(repoID, name, type).then(res => {
const view = res.data.view;
let newNavigation = navigation.slice(0);
newNavigation.push({ _id: view._id, type: 'view' });