mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-15 21:36:36 +00:00
Fix placeholder camera image flash as broken image
This commit is contained in:
parent
5ede26f162
commit
059eda861e
@ -51,7 +51,9 @@ import LocalizeMixin from '../mixins/localize-mixin.js';
|
||||
}
|
||||
</style>
|
||||
|
||||
<img src="[[cameraFeedSrc]]" class="camera-feed" hidden\$="[[!imageLoaded]]" alt="[[_computeStateName(stateObj)]]">
|
||||
<template is="dom-if" if="[[cameraFeedSrc]]">
|
||||
<img src="[[cameraFeedSrc]]" class="camera-feed" alt="[[_computeStateName(stateObj)]]">
|
||||
</template>
|
||||
<div class="caption">
|
||||
[[_computeStateName(stateObj)]]
|
||||
<template is="dom-if" if="[[!imageLoaded]]">
|
||||
@ -68,7 +70,10 @@ import LocalizeMixin from '../mixins/localize-mixin.js';
|
||||
type: Object,
|
||||
observer: 'updateCameraFeedSrc',
|
||||
},
|
||||
cameraFeedSrc: String,
|
||||
cameraFeedSrc: {
|
||||
type: String,
|
||||
value: '',
|
||||
},
|
||||
imageLoaded: {
|
||||
type: Boolean,
|
||||
value: true,
|
||||
|
Loading…
x
Reference in New Issue
Block a user