diff --git a/src/cards/ha-card-chooser.html b/src/cards/ha-card-chooser.html index 89524c02da..bf182d99e3 100644 --- a/src/cards/ha-card-chooser.html +++ b/src/cards/ha-card-chooser.html @@ -3,7 +3,6 @@ - diff --git a/src/cards/ha-introduction-card.html b/src/cards/ha-introduction-card.html deleted file mode 100644 index c9b2e1c1e5..0000000000 --- a/src/cards/ha-introduction-card.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - diff --git a/src/cards/ha-persistent_notification-card.html b/src/cards/ha-persistent_notification-card.html index 068a503f2c..c1e3588965 100644 --- a/src/cards/ha-persistent_notification-card.html +++ b/src/cards/ha-persistent_notification-card.html @@ -2,6 +2,7 @@ + @@ -35,44 +49,14 @@ class HaPersistentNotificationCard extends Polymer.Element { return { hass: Object, stateObj: Object, - scriptLoaded: { - type: Number, - // 0 = not loaded, 1 = success, 2 = error - value: 0, - } }; } - static get observers() { - return [ - 'computeContent(stateObj, scriptLoaded)', - ]; - } - computeTitle(stateObj) { return (stateObj.attributes.title || window.hassUtil.computeStateName(stateObj)); } - computeContent(stateObj, scriptLoaded) { - if (scriptLoaded === 1) { - const converter = window.Markdown.getSanitizingConverter(); - this.$.pnContent.innerHTML = converter.makeHtml(stateObj.attributes.message); - } else if (scriptLoaded === 2) { - this.$.pnContent.innerText = stateObj.attributes.message; - } - } - - ready() { - super.ready(); - - Polymer.importHref( - '/static/pagedown-js.html', - () => { this.scriptLoaded = 1; }, - () => { this.scriptLoaded = 2; }, - ); - } - dismissTap(ev) { ev.preventDefault(); this.hass.callApi('DELETE', 'states/' + this.stateObj.entity_id); diff --git a/src/components/ha-cards.html b/src/components/ha-cards.html index 8a903f0b21..94311747f4 100644 --- a/src/components/ha-cards.html +++ b/src/components/ha-cards.html @@ -149,11 +149,6 @@ return { hass: Object, - showIntroduction: { - type: Boolean, - value: false, - }, - columns: { type: Number, value: 2, @@ -175,14 +170,13 @@ static get observers() { return [ - 'updateCards(columns, states, showIntroduction, panelVisible, viewVisible, orderedGroups)', + 'updateCards(columns, states, panelVisible, viewVisible, orderedGroups)', ]; } updateCards( columns, states, - showIntroduction, panelVisible, viewVisible, orderedGroups @@ -196,13 +190,13 @@ () => { // Things might have changed since it got scheduled. if (this.panelVisible && this.viewVisible) { - this.cards = this.computeCards(columns, states, showIntroduction, orderedGroups); + this.cards = this.computeCards(columns, states, orderedGroups); } } ); } - computeCards(columns, states, showIntroduction, orderedGroups) { + computeCards(columns, states, orderedGroups) { const hass = this.hass; const cards = { @@ -234,14 +228,6 @@ return minIndex; } - if (showIntroduction) { - cards.columns[getIndex(5)].push({ - hass: hass, - cardType: 'introduction', - showHideInstruction: Object.keys(states).length > 0 && !window.HASS_DEMO, - }); - } - function addEntitiesCard(name, entities, groupEntity) { if (entities.length === 0) return; diff --git a/src/components/ha-markdown.html b/src/components/ha-markdown.html new file mode 100644 index 0000000000..0f4f4d2703 --- /dev/null +++ b/src/components/ha-markdown.html @@ -0,0 +1,48 @@ + + + diff --git a/src/layouts/partial-cards.html b/src/layouts/partial-cards.html index 0b17b5cbc9..1b38e6f1cf 100644 --- a/src/layouts/partial-cards.html +++ b/src/layouts/partial-cards.html @@ -108,7 +108,6 @@ > 0 ? 'Home Assistant' : locationName; } - computeShowIntroduction(currentView, introductionLoaded, states) { - return currentView === '' && (introductionLoaded || Object.keys(states).length === 0); - } - computeStateName(stateObj) { if (stateObj.entity_id === DEFAULT_VIEW_ENTITY_ID) { if (stateObj.attributes.friendly_name && @@ -324,10 +314,6 @@ return window.hassUtil.computeLocationName(hass); } - computeIntroductionLoaded(hass) { - return window.hassUtil.isComponentLoaded(hass, 'introduction'); - } - hassChanged(hass) { if (!hass) return; var views = window.HAWS.extractViews(hass.states);