Add a max of 10 columns.

This commit is contained in:
Dermot Duffy
2022-01-18 22:00:31 -08:00
parent 0e1c5cf5cb
commit 011dc392e8
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -324,7 +324,7 @@ event_gallery:
| Option | Default | Overridable | Description |
| - | - | - | - |
| `min_columns` | `5` | :heavy_multiplication_x: | The minimum number of columns to show in the gallery -- smaller values will render fewer but larger thumbnail columns. Thumbnails will never be stretched beyond their intrinsic size (typically `175px`). All available space (in normal mode, or fullscreen mode) will be occupied by the gallery, so more columns than `min_columns` will often be rendered if space allows for more full-sized thumbnails. For normal sized Lovelace cards (`492px` wide), this typically means there'll never be fewer than 3 columns rendered (as otherwise the thumbnails would need to stretch beyond their actual size). Value set must be >= 1. |
| `min_columns` | `5` | :heavy_multiplication_x: | The minimum number of columns to show in the gallery -- smaller values will render fewer but larger thumbnail columns. Thumbnails will never be stretched beyond their intrinsic size (typically `175px`). All available space (in normal mode, or fullscreen mode) will be occupied by the gallery, so more columns than `min_columns` will often be rendered if space allows for more full-sized thumbnails. For normal sized Lovelace cards (`492px` wide), this typically means there'll never be fewer than 3 columns rendered (as otherwise the thumbnails would need to stretch beyond their actual size). Must be `1 <= x <= 10`. |
| `actions` | | :heavy_multiplication_x: | Actions to use for all views that use the `event_gallery` (e.g. `clips`, `snapshots`). See [actions](#actions) below.|
### Image Options
+1 -1
View File
@@ -617,7 +617,7 @@ const galleryConfigDefault = {
const galleryConfigSchema = z
.object({
min_columns: z.number().min(1).default(galleryConfigDefault.min_columns),
min_columns: z.number().min(1).max(10).default(galleryConfigDefault.min_columns),
})
.merge(actionsSchema)
.default(galleryConfigDefault);