Add editor support for max-height and min-height .
This commit is contained in:
@@ -239,6 +239,8 @@ const CONF_DIMENSIONS = 'dimensions' as const;
|
|||||||
export const CONF_DIMENSIONS_ASPECT_RATIO = `${CONF_DIMENSIONS}.aspect_ratio` as const;
|
export const CONF_DIMENSIONS_ASPECT_RATIO = `${CONF_DIMENSIONS}.aspect_ratio` as const;
|
||||||
export const CONF_DIMENSIONS_ASPECT_RATIO_MODE =
|
export const CONF_DIMENSIONS_ASPECT_RATIO_MODE =
|
||||||
`${CONF_DIMENSIONS}.aspect_ratio_mode` as const;
|
`${CONF_DIMENSIONS}.aspect_ratio_mode` as const;
|
||||||
|
export const CONF_DIMENSIONS_MAX_HEIGHT = `${CONF_DIMENSIONS}.max_height` as const;
|
||||||
|
export const CONF_DIMENSIONS_MIN_HEIGHT = `${CONF_DIMENSIONS}.min_height` as const;
|
||||||
|
|
||||||
export const CONF_OVERRIDES = 'overrides' as const;
|
export const CONF_OVERRIDES = 'overrides' as const;
|
||||||
|
|
||||||
|
|||||||
@@ -142,6 +142,8 @@ import {
|
|||||||
CONF_VIEW_UPDATE_FORCE,
|
CONF_VIEW_UPDATE_FORCE,
|
||||||
CONF_VIEW_UPDATE_SECONDS,
|
CONF_VIEW_UPDATE_SECONDS,
|
||||||
MEDIA_CHUNK_SIZE_MAX,
|
MEDIA_CHUNK_SIZE_MAX,
|
||||||
|
CONF_DIMENSIONS_MAX_HEIGHT,
|
||||||
|
CONF_DIMENSIONS_MIN_HEIGHT,
|
||||||
} from './const.js';
|
} from './const.js';
|
||||||
import { localize } from './localize/localize.js';
|
import { localize } from './localize/localize.js';
|
||||||
import frigate_card_editor_style from './scss/editor.scss';
|
import frigate_card_editor_style from './scss/editor.scss';
|
||||||
@@ -1978,6 +1980,8 @@ export class FrigateCardEditor extends LitElement implements LovelaceCardEditor
|
|||||||
this._aspectRatioModes,
|
this._aspectRatioModes,
|
||||||
)}
|
)}
|
||||||
${this._renderStringInput(CONF_DIMENSIONS_ASPECT_RATIO)}
|
${this._renderStringInput(CONF_DIMENSIONS_ASPECT_RATIO)}
|
||||||
|
${this._renderStringInput(CONF_DIMENSIONS_MAX_HEIGHT)}
|
||||||
|
${this._renderStringInput(CONF_DIMENSIONS_MIN_HEIGHT)}
|
||||||
</div>`
|
</div>`
|
||||||
: ''}
|
: ''}
|
||||||
${this._renderOptionSetHeader(
|
${this._renderOptionSetHeader(
|
||||||
|
|||||||
@@ -186,7 +186,9 @@
|
|||||||
"dynamic": "Aspect ratio adjusts to media",
|
"dynamic": "Aspect ratio adjusts to media",
|
||||||
"static": "Static aspect ratio",
|
"static": "Static aspect ratio",
|
||||||
"unconstrained": "Unconstrained aspect ratio"
|
"unconstrained": "Unconstrained aspect ratio"
|
||||||
}
|
},
|
||||||
|
"max_height": "Maximum card height in CSS units (e.g. '100vh')",
|
||||||
|
"min_height": "Minimum card height in CSS units (e.g. '100px')"
|
||||||
},
|
},
|
||||||
"image": {
|
"image": {
|
||||||
"layout": "Image Layout",
|
"layout": "Image Layout",
|
||||||
|
|||||||
@@ -186,7 +186,9 @@
|
|||||||
"dynamic": "Le proporzioni si adattano ai media",
|
"dynamic": "Le proporzioni si adattano ai media",
|
||||||
"static": "Proporzioni statiche",
|
"static": "Proporzioni statiche",
|
||||||
"unconstrained": "Proporzioni non vincolate"
|
"unconstrained": "Proporzioni non vincolate"
|
||||||
}
|
},
|
||||||
|
"max_height": "",
|
||||||
|
"min_height": ""
|
||||||
},
|
},
|
||||||
"image": {
|
"image": {
|
||||||
"layout": "Disposizione dell'immagine",
|
"layout": "Disposizione dell'immagine",
|
||||||
|
|||||||
@@ -186,7 +186,9 @@
|
|||||||
"dynamic": "A proporção se ajusta à mídia",
|
"dynamic": "A proporção se ajusta à mídia",
|
||||||
"static": "Proporção estática",
|
"static": "Proporção estática",
|
||||||
"unconstrained": "Proporção irrestrita"
|
"unconstrained": "Proporção irrestrita"
|
||||||
}
|
},
|
||||||
|
"max_height": "",
|
||||||
|
"min_height": ""
|
||||||
},
|
},
|
||||||
"image": {
|
"image": {
|
||||||
"layout": "Layout da imagem",
|
"layout": "Layout da imagem",
|
||||||
@@ -478,4 +480,4 @@
|
|||||||
},
|
},
|
||||||
"select_date": "Escolha a data"
|
"select_date": "Escolha a data"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user