mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 21:04:37 +03:00
Make title optional for non-user created galleries (#3110)
This commit is contained in:
@@ -79,8 +79,13 @@ export const GalleryEditPanel: React.FC<
|
||||
const [createGallery] = useGalleryCreate();
|
||||
const [updateGallery] = useGalleryUpdate();
|
||||
|
||||
const titleRequired =
|
||||
isNew || (gallery?.files?.length === 0 && !gallery?.folder);
|
||||
|
||||
const schema = yup.object({
|
||||
title: yup.string().required(),
|
||||
title: titleRequired
|
||||
? yup.string().required()
|
||||
: yup.string().optional().nullable(),
|
||||
details: yup.string().optional().nullable(),
|
||||
url: yup.string().optional().nullable(),
|
||||
date: yup.string().optional().nullable(),
|
||||
|
||||
Reference in New Issue
Block a user