feat: Increase max thumbnail size to 300px (#1703)
* feat: Remove max thumbnail size * Remove old comment. * Set max to 350px * Decrease max size to 300px
This commit is contained in:
@@ -4,12 +4,12 @@
|
||||
|
||||
A "Camera Engine" defines what "type" of camera is being configured (e.g. `frigate`), each engine offers different capabilities:
|
||||
|
||||
| Engine | Live | Supports clips | Supports Snapshots | Supports Recordings | Supports Timeline | Supports PTZ out of the box | Supports manually configured PTZ | Favorite events | Favorite recordings | Detect new events | Detect new snapshots | Detect new clips | May requiring [proxying](./README.md?id=proxy) |
|
||||
| ----------- | ------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | --------------------------- | -------------------------------- | ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | ---------------------------------------------- |
|
||||
| `frigate` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :heavy_multiplication_x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :heavy_multiplication_x: |
|
||||
| `generic` | :white_check_mark: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: |
|
||||
| `motioneye` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :heavy_multiplication_x: | :white_check_mark: | :heavy_multiplication_x: | :white_check_mark: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: |
|
||||
| `reolink` | :white_check_mark: | :white_check_mark: | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: | :heavy_multiplication_x: | :white_check_mark: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: |
|
||||
| Engine | Live | Supports clips | Supports Snapshots | Supports Recordings | Supports Timeline | Supports PTZ out of the box | Supports manually configured PTZ | Favorite events | Favorite recordings | Detect new events | Detect new snapshots | Detect new clips | May requiring [proxying](./README.md?id=proxy) | Thumbnails |
|
||||
| ----------- | ------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | --------------------------- | -------------------------------- | ------------------------ | ------------------------ | ------------------------ | ------------------------ | ------------------------ | ---------------------------------------------- | ------------------------ |
|
||||
| `frigate` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :heavy_multiplication_x: | :white_check_mark: | :white_check_mark: | :white_check_mark: | :heavy_multiplication_x: | :white_check_mark: |
|
||||
| `generic` | :white_check_mark: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: |
|
||||
| `motioneye` | :white_check_mark: | :white_check_mark: | :white_check_mark: | :heavy_multiplication_x: | :white_check_mark: | :heavy_multiplication_x: | :white_check_mark: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: | :white_check_mark: |
|
||||
| `reolink` | :white_check_mark: | :white_check_mark: | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: | :heavy_multiplication_x: | :white_check_mark: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :heavy_multiplication_x: | :white_check_mark: | :heavy_multiplication_x: |
|
||||
|
||||
### Live providers supported per Engine
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ live:
|
||||
| `show_download_control` | `true` | Whether to show the download control on each thumbnail. |
|
||||
| `show_favorite_control` | `true` | Whether to show the favorite ('star') control on each thumbnail. |
|
||||
| `show_timeline_control` | `true` | Whether to show the timeline ('target') control on each thumbnail. |
|
||||
| `size` | `100` | The size of the thumbnails in the thumbnail carousel in pixels. Must be >= `75` and <= `175`. |
|
||||
| `size` | `100` | The size of the thumbnails in the thumbnail carousel in pixels. Must be >= `75` and <= `300`. |
|
||||
|
||||
### `timeline`
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ media_gallery:
|
||||
| `show_download_control` | `true` | Whether to show the download control on each thumbnail. |
|
||||
| `show_favorite_control` | `true` | Whether to show the favorite ('star') control on each thumbnail. |
|
||||
| `show_timeline_control` | `true` | Whether to show the timeline ('target') control on each thumbnail. |
|
||||
| `size` | `100` | The size of the thumbnails in the gallery. Must be >= `75` and <= `175`. |
|
||||
| `size` | `100` | The size of the thumbnails in the gallery. Must be >= `75` and <= `300`. |
|
||||
|
||||
## Fully expanded reference
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ media_viewer:
|
||||
| `show_download_control` | `true` | Whether to show the download control on each thumbnail. |
|
||||
| `show_favorite_control` | `true` | Whether to show the favorite ('star') control on each thumbnail. |
|
||||
| `show_timeline_control` | `true` | Whether to show the timeline ('target') control on each thumbnail. |
|
||||
| `size` | `100` | The size of the thumbnails in the thumbnail carousel pixels. Must be >= `75` and <= `175`. |
|
||||
| `size` | `100` | The size of the thumbnails in the thumbnail carousel pixels. Must be >= `75` and <= `300`. |
|
||||
|
||||
### `timeline`
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ timeline:
|
||||
| `show_download_control` | `true` | Whether to show the download control on each thumbnail. |
|
||||
| `show_favorite_control` | `true` | Whether to show the favorite ('star') control on each thumbnail. |
|
||||
| `show_timeline_control` | `true` | Whether to show the timeline ('target') control on each thumbnail. |
|
||||
| `size` | `100` | The size of the thumbnails in the thumbnail carousel in pixels. Must be >= `75` and <= `175`. |
|
||||
| `size` | `100` | The size of the thumbnails in the thumbnail carousel in pixels. Must be >= `75` and <= `300`. |
|
||||
|
||||
## Fully expanded reference
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ import {
|
||||
CardWideConfig,
|
||||
frigateCardConfigDefaults,
|
||||
GalleryConfig,
|
||||
THUMBNAIL_WIDTH_MAX,
|
||||
} from '../config/types';
|
||||
import { localize } from '../localize/localize';
|
||||
import galleryCoreStyle from '../scss/gallery-core.scss';
|
||||
@@ -266,11 +265,7 @@ export class FrigateCardGalleryCore extends LitElement {
|
||||
frigateCardConfigDefaults.media_gallery.controls.thumbnails.size;
|
||||
const columns = this.galleryConfig?.controls.thumbnails.show_details
|
||||
? Math.max(1, Math.floor(this.clientWidth / THUMBNAIL_DETAILS_WIDTH_MIN))
|
||||
: Math.max(
|
||||
1,
|
||||
Math.ceil(this.clientWidth / THUMBNAIL_WIDTH_MAX),
|
||||
Math.ceil(this.clientWidth / thumbnailSize),
|
||||
);
|
||||
: Math.max(1, Math.ceil(this.clientWidth / thumbnailSize));
|
||||
|
||||
this.style.setProperty('--frigate-card-gallery-columns', String(columns));
|
||||
}
|
||||
|
||||
+2
-2
@@ -976,9 +976,9 @@ export type ImageViewConfig = z.infer<typeof imageConfigSchema>;
|
||||
// Thumbnail Configuration
|
||||
// *************************************************************************
|
||||
|
||||
// The min/max width thumbnail (Frigate returns a maximum of 175px).
|
||||
export const THUMBNAIL_WIDTH_MAX = 175;
|
||||
// The min/max width thumbnail.
|
||||
export const THUMBNAIL_WIDTH_MIN = 75;
|
||||
export const THUMBNAIL_WIDTH_MAX = 300;
|
||||
|
||||
const thumbnailControlsBaseDefaults = {
|
||||
size: 100,
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
:host {
|
||||
--frigate-card-thumbnail-size-max: 175px;
|
||||
--frigate-card-thumbnail-size-max: 300px;
|
||||
--frigate-card-thumbnail-details-width: calc(
|
||||
var(--frigate-card-thumbnail-size) + 200px
|
||||
);
|
||||
|
||||
@@ -17,7 +17,7 @@ div.title {
|
||||
|
||||
div.details {
|
||||
flex: 1;
|
||||
justify-content: space-evenly;
|
||||
justify-content: center;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@@ -27,7 +27,7 @@ ha-icon {
|
||||
var(--ha-card-border-radius, 4px)
|
||||
);
|
||||
|
||||
max-width: var(--frigate-card-thumbnail-size);
|
||||
width: var(--frigate-card-thumbnail-size);
|
||||
max-height: 100%;
|
||||
aspect-ratio: 1 / 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user