Add funding URL (#213)

This commit is contained in:
Paulus Schoutsen 2022-04-11 23:24:52 -07:00 committed by GitHub
parent ec2a6e7206
commit f34fab1c0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 28 additions and 0 deletions

View File

@ -15,6 +15,7 @@ Manifest definition:
"name": "ESPHome",
"version": "2021.10.3",
"home_assistant_domain": "esphome",
"funding_url": "https://esphome.io/guides/supporters.html",
"builds": [
{
"chipFamily": "ESP32",

View File

@ -346,6 +346,7 @@
"name": "ESPHome",
"version": "2021.11.0",
"home_assistant_domain": "esphome",
"funding_url": "https://esphome.io/guides/supporters.html",
"new_install_prompt_erase": false,
"builds": [
{
@ -395,6 +396,13 @@
<code>new_install_improv_wait_time</code> to the number of seconds to
wait. Set to <code>0</code> to disable Improv Serial detection.
</p>
<p>
If your product accepts donations you can add
<code>funding_url</code> to your manifest. This allows you to link to
your page explaining the user how they can fund development. This link
is visible in the ESP Web Tools menu when connected to a device running
your firmware (as detected via Improv).
</p>
<h3 id="customize">Customizing the look and feel</h3>
<p>

View File

@ -16,6 +16,7 @@ export interface Manifest {
name: string;
version: string;
home_assistant_domain?: string;
funding_url?: string;
/** @deprecated use `new_install_prompt_erase` instead */
new_install_skip_erase?: boolean;
new_install_prompt_erase?: boolean;

View File

@ -245,6 +245,19 @@ class EwtInstallDialog extends LitElement {
}}
></ewt-button>
</div>
${this._isSameFirmware && this._manifest.funding_url
? html`
<div>
<a
class="button"
href=${this._manifest.funding_url}
target="_blank"
>
<ewt-button label="Fund Development"></ewt-button>
</a>
</div>
`
: ""}
${this._isSameVersion
? html`
<div>

View File

@ -14,4 +14,8 @@ export const dialogStyles = css`
a {
color: var(--improv-primary-color, #03a9f4);
}
a.button {
text-decoration: none;
}
`;

View File

@ -2,6 +2,7 @@
"name": "ESPHome",
"version": "2022.3.0",
"home_assistant_domain": "esphome",
"funding_url": "https://esphome.io/guides/supporters.html",
"builds": [
{
"chipFamily": "ESP32",