Add 'show_details' open to show details next to thumbnails.
This commit is contained in:
@@ -436,6 +436,7 @@ export type ImageViewConfig = z.infer<typeof imageConfigSchema>;
|
||||
const thumbnailsControlSchema = z.object({
|
||||
mode: z.enum(['none', 'above', 'below']),
|
||||
size: z.string().optional(),
|
||||
show_details: z.boolean().optional(),
|
||||
});
|
||||
export type ThumbnailsControlConfig = z.infer<typeof thumbnailsControlSchema>;
|
||||
|
||||
@@ -488,6 +489,7 @@ const liveConfigDefault = {
|
||||
thumbnails: {
|
||||
media: 'clips' as const,
|
||||
size: '100px',
|
||||
show_details: false,
|
||||
mode: 'none' as const,
|
||||
},
|
||||
title: {
|
||||
@@ -548,6 +550,9 @@ const liveOverridableConfigSchema = z
|
||||
size: thumbnailsControlSchema.shape.size.default(
|
||||
liveConfigDefault.controls.thumbnails.size,
|
||||
),
|
||||
show_details: thumbnailsControlSchema.shape.show_details.default(
|
||||
liveConfigDefault.controls.thumbnails.show_details,
|
||||
),
|
||||
media: z
|
||||
.enum(['clips', 'snapshots'])
|
||||
.default(liveConfigDefault.controls.thumbnails.media),
|
||||
@@ -642,6 +647,7 @@ const viewerConfigDefault = {
|
||||
thumbnails: {
|
||||
size: '100px',
|
||||
mode: 'none' as const,
|
||||
show_details: false,
|
||||
},
|
||||
title: {
|
||||
mode: 'popup-bottom-right' as const,
|
||||
@@ -654,6 +660,7 @@ const viewerNextPreviousControlConfigSchema = nextPreviousControlConfigSchema.ex
|
||||
.enum(['none', 'thumbnails', 'chevrons'])
|
||||
.default(viewerConfigDefault.controls.next_previous.style),
|
||||
size: z.string().default(viewerConfigDefault.controls.next_previous.size),
|
||||
|
||||
});
|
||||
export type ViewerNextPreviousControlConfig = z.infer<
|
||||
typeof viewerNextPreviousControlConfigSchema
|
||||
@@ -681,6 +688,9 @@ const viewerConfigSchema = z
|
||||
size: thumbnailsControlSchema.shape.size.default(
|
||||
viewerConfigDefault.controls.thumbnails.size,
|
||||
),
|
||||
show_details: thumbnailsControlSchema.shape.show_details.default(
|
||||
viewerConfigDefault.controls.thumbnails.show_details,
|
||||
),
|
||||
})
|
||||
.default(viewerConfigDefault.controls.thumbnails),
|
||||
title: titleControlConfigSchema
|
||||
|
||||
Reference in New Issue
Block a user