mirror of
https://github.com/home-assistant/frontend.git
synced 2025-06-25 19:46:36 +00:00
Extract empty image
This commit is contained in:
parent
960bdc0c9b
commit
5ede26f162
2
src/common/empty_image_base64.js
Normal file
2
src/common/empty_image_base64.js
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/** An empty image which can be set as src of an img element. */
|
||||||
|
export default 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
|
@ -2,6 +2,7 @@ import { html } from '@polymer/polymer/lib/utils/html-tag.js';
|
|||||||
import { PolymerElement } from '@polymer/polymer/polymer-element.js';
|
import { PolymerElement } from '@polymer/polymer/polymer-element.js';
|
||||||
|
|
||||||
import computeStateName from '../../../common/entity/compute_state_name.js';
|
import computeStateName from '../../../common/entity/compute_state_name.js';
|
||||||
|
import emptyImageBase64 from '../../../common/empty_image_base64.js';
|
||||||
import EventsMixin from '../../../mixins/events-mixin.js';
|
import EventsMixin from '../../../mixins/events-mixin.js';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -67,7 +68,7 @@ class MoreInfoCamera extends EventsMixin(PolymerElement) {
|
|||||||
'?token=' + stateObj.attributes.access_token;
|
'?token=' + stateObj.attributes.access_token;
|
||||||
}
|
}
|
||||||
// Return an empty image if no stateObj (= dialog not open) or in cleanup mode.
|
// Return an empty image if no stateObj (= dialog not open) or in cleanup mode.
|
||||||
return 'data:image/gif;base64,R0lGODlhAQABAAAAACw=';
|
return emptyImageBase64;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user