Skip to content

Commit

Permalink
Add readme links. Bump patch number.
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasloven committed Mar 9, 2022
1 parent 4773f01 commit 466df9c
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 36 deletions.
61 changes: 30 additions & 31 deletions layout-card.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "layout-card",
"version": "2.4.1",
"version": "2.4.2",
"description": "",
"private": true,
"scripts": {
Expand Down
15 changes: 15 additions & 0 deletions src/layout-card-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,17 @@ class LayoutCardEditor extends LitElement {
...this._config,
};
return html`
<p>
See
<a
href="https://github.com/thomasloven/lovelace-layout-card"
target="_blank"
rel="no referrer"
>
layout-card on github
</a>
for usage instructions.
</p>
<ha-form
.hass=${this.hass}
.data=${data}
Expand Down Expand Up @@ -294,6 +305,10 @@ class LayoutCardEditor extends LitElement {
.gui-mode-button {
margin-right: auto;
}
a {
color: var(--primary-color);
}
`,
];
}
Expand Down
7 changes: 4 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import "./patches/hui-view-editor";
import "./gap-card.ts";
import pjson from "../package.json";

console.info(
console.groupCollapsed(
`%cLAYOUT-CARD ${pjson.version} IS INSTALLED`,
"color: green; font-weight: bold",
""
"color: green; font-weight: bold"
);
console.log("Readme:", "https://github.com/thomasloven/lovelace-layout-card");
console.groupEnd();
18 changes: 18 additions & 0 deletions src/patches/hui-view-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,24 @@ customElements.whenDefined("hui-view-editor").then(() => {
return retval;
};

const helpLink = document.createElement("p");
helpLink.innerHTML = `
You have layout-card installed which adds some options to this dialog. <br/>
Please see
<a
href="https://github.com/thomasloven/lovelace-layout-card"
target="_blank"
rel="no referrer"
>
layout-card on github
</a>
for usage instructions.
<style>
p {padding: 16px 0 0; margin-bottom: 0;}
a {color: var(--primary-color);}
</style>
`;
this.shadowRoot.appendChild(helpLink);
this.requestUpdate();
};
});

0 comments on commit 466df9c

Please sign in to comment.