Skip to content

Commit f176f12

Browse files
committed
Start of the review
1 parent e5ea340 commit f176f12

File tree

12 files changed

+107
-239
lines changed

12 files changed

+107
-239
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
5-
<link rel="icon" type="image/svg+xml" href="/open-home-foundation.svg" />
5+
<link rel="icon" type="image/svg+xml" href="/favicon.png" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
77
<title>Device Toolbox</title>
88
<!-- ESP Web Tools -->

public/favicon.png

356 Bytes
Loading

public/svgs/doc.svg

Lines changed: 1 addition & 1 deletion
Loading

src/components/details.ts

Lines changed: 43 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ export interface DetailsConfig {
1919
subtitle?: string;
2020
description: string;
2121
secondaryDescription?: string;
22+
tertiaryDescription?: string;
23+
learnMoreHref?: string;
24+
learnMoreLabel?: string;
2225
};
2326
actions: DetailsAction[];
2427
heroCtaLabel?: string;
@@ -114,6 +117,13 @@ export class DetailsPage extends LitElement {
114117
font-size: 1.05rem;
115118
}
116119
120+
.hero .tertiary-description {
121+
color: #666;
122+
line-height: 1.6;
123+
font-size: 1.05rem;
124+
margin: 0;
125+
}
126+
117127
@media (max-width: 768px) {
118128
.hero h1 {
119129
margin-top: 0;
@@ -139,7 +149,8 @@ export class DetailsPage extends LitElement {
139149
140150
.hero-cta {
141151
margin: 16px 0 24px 0;
142-
display: inline-flex;
152+
display: block;
153+
width: 100%;
143154
}
144155
145156
.hero-cta button.install {
@@ -247,6 +258,10 @@ export class DetailsPage extends LitElement {
247258
display: none;
248259
}
249260
261+
.hero[data-expanded='false'] .tertiary-description {
262+
display: none;
263+
}
264+
250265
.read-more {
251266
display: inline-block;
252267
}
@@ -330,24 +345,40 @@ export class DetailsPage extends LitElement {
330345
>
331346
${hero.description}
332347
</p>
333-
${heroCta
334-
? html`<div class="hero-cta">${heroCta}</div>`
335-
: heroCtaLabel
336-
? html`<div class="hero-cta">
337-
<wa-button variant="primary">${heroCtaLabel}</wa-button>
338-
</div>`
339-
: hero.secondaryDescription
340-
? html`<p class="secondary-description">
341-
${hero.secondaryDescription}
342-
</p>`
343-
: nothing}
348+
${hero.secondaryDescription
349+
? html`<p class="secondary-description">
350+
${hero.secondaryDescription}
351+
</p>`
352+
: nothing}
353+
${hero.tertiaryDescription
354+
? html`<p class="tertiary-description">
355+
${hero.tertiaryDescription}
356+
</p>`
357+
: nothing}
358+
${hero.learnMoreHref
359+
? html`<p class="secondary-description">
360+
<a
361+
href="${hero.learnMoreHref}"
362+
target="_blank"
363+
rel="noopener noreferrer"
364+
>${hero.learnMoreLabel || 'Learn more'}</a
365+
>
366+
</p>`
367+
: nothing}
344368
${html`<button
345369
class="read-more"
346370
@click=${() =>
347371
(this.isDescriptionExpanded = !this.isDescriptionExpanded)}
348372
>
349373
${this.isDescriptionExpanded ? 'Read less' : 'Read more'}
350374
</button>`}
375+
${heroCta
376+
? html`<div class="hero-cta">${heroCta}</div>`
377+
: heroCtaLabel
378+
? html`<div class="hero-cta">
379+
<wa-button variant="primary">${heroCtaLabel}</wa-button>
380+
</div>`
381+
: nothing}
351382
</div>
352383
353384
${actions && actions.length

src/main-app.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,8 @@ import { customElement } from 'lit/decorators.js';
44

55
import './components/app-header.js';
66

7-
import './pages/bluetooth-proxy-details';
8-
import './pages/empty-esphome-details';
9-
import './pages/esphome-details';
107
import './pages/home-page.js';
118
import './pages/improv-details';
12-
import './pages/media-player-details';
139
import './pages/vpe-details';
1410
import './pages/zbt1-details';
1511
import './pages/zwa2-details';
@@ -44,11 +40,7 @@ export class MainApp extends LitElement {
4440
{ path: '/zwa2/install', component: 'zwa2-install-original' },
4541
{ path: '/zwa2/install-portable', component: 'zwa2-install-portable' },
4642
{ path: '/zbt1', component: 'zbt1-details' },
47-
{ path: '/esphome', component: 'esphome-details' },
48-
{ path: '/media-player', component: 'media-player-details' },
4943
{ path: '/improv', component: 'improv-details' },
50-
{ path: '/empty-esphome', component: 'empty-esphome-details' },
51-
{ path: '/bluetooth-proxy', component: 'bluetooth-proxy-details' },
5244
{ path: '(.*)', redirect: '/' },
5345
]);
5446
}

src/pages/bluetooth-proxy-details.ts

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/pages/empty-esphome-details.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/pages/esphome-details.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/pages/media-player-details.ts

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/pages/zwa2-install-portable.ts

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,33 @@ export class Zwa2InstallPortablePage extends LitElement {
2020
);
2121
}
2222

23+
handleLearnMore() {
24+
// Placeholder link for future blog post
25+
window.open(
26+
'https://www.home-assistant.io/blog/',
27+
'_blank',
28+
'noopener,noreferrer'
29+
);
30+
}
31+
2332
render() {
2433
const config = {
2534
hero: {
2635
title: 'Install portable Z-Wave firmware',
2736
subtitle: 'Place ZWA-2 optimally and connect via Wi‑Fi',
2837
description:
29-
'This installation will flash the portable Z-Wave firmware to your ZWA-2, enabling Wi‑Fi connectivity so you can place it in the best location for coverage.',
38+
'This firmware is experimental. If you experience any issues, revert back to the original firmware.',
39+
secondaryDescription:
40+
'This experiment allows you to put your ZWA-2 in the most optimal location to reach your Z-Wave devices, which might very well not have been the basement where you have tucked away your Home Assistant hub!',
41+
tertiaryDescription:
42+
'It does this by activating the ESP32-S3 wifi chip in the Home Assistant Connect ZWA-2 and turning the ZWA-2 into a wirelessly connected Z-Wave proxy that seamlessly integrates with Home Assistant.',
43+
learnMoreHref: 'https://www.home-assistant.io/blog/',
44+
learnMoreLabel: 'Learn more',
3045
},
3146
actions: [],
32-
heroCta: html`<button class="install" @click=${this.handleInstall}>
33-
Install
34-
</button>`,
47+
heroCta: html`
48+
<button class="install" @click=${this.handleInstall}>Install</button>
49+
`,
3550
} as const;
3651

3752
return html`<details-page

0 commit comments

Comments
 (0)