@@ -20,9 +20,11 @@ class EWDashboard extends LitElement {
20
20
protected render ( ) {
21
21
return html `
22
22
<div class= "container" >
23
- ${ supportsWebSerial
24
- ? html `<ew- connect- card> </ ew- connect- card> `
25
- : html `<ew- unsuppor ted- card> </ ew- unsuppor ted- card> ` }
23
+ ${
24
+ supportsWebSerial
25
+ ? html `<ew- connect- card> </ ew- connect- card> `
26
+ : html `<ew- unsuppor ted- card> </ ew- unsuppor ted- card> `
27
+ }
26
28
27
29
<div class= "intro" >
28
30
${ ARROW }
@@ -70,14 +72,33 @@ class EWDashboard extends LitElement {
70
72
</ p>
71
73
</ div>
72
74
</ div>
75
+
76
+ <div class= "promote promote-adopt" >
77
+ </ svg>
78
+ <div class= "text" >
79
+ <p> <b> Make Adoptable </ b>
80
+ <svg width= "48" height = "48" viewBox= "0 0 24 24"> <path d= "M21.5 9.5L20.09 10.92L17 7.83V13.5C17 17.09 14.09 20 10.5 20H4V18H10.5C13 18 15 16 15 13.5V7.83L11.91 10.91L10.5 9.5L16 4L21.5 9.5Z" /></svg>
81
+
82
+ </p>
83
+ <p>
84
+ This action will prepare your device to be adopted by your ESPHome
85
+ dashboard. Once adopted, a device can be configured and updated
86
+ wirelessly.
87
+ </p>
88
+ </div>
89
+ </div>
73
90
</div>
74
91
` ;
75
92
}
76
93
77
94
protected firstUpdated ( changedProps : PropertyValues ) : void {
78
95
super . firstUpdated ( changedProps ) ;
79
96
const highlight = location . search . substring ( 1 ) ;
80
- if ( highlight === "dashboard_install" || highlight === "dashboard_logs" ) {
97
+ if (
98
+ highlight === "dashboard_install" ||
99
+ highlight === "dashboard_logs" ||
100
+ highlight === "dashboard_wizard"
101
+ ) {
81
102
this . toggleAttribute ( highlight ) ;
82
103
}
83
104
}
@@ -128,6 +149,9 @@ class EWDashboard extends LitElement {
128
149
:host([dashboard_install]) ew-connect-card[connected] ~ .promote-install {
129
150
display: flex;
130
151
}
152
+ :host([dashboard_wizard]) ew-connect-card[connected] ~ .promote-adopt {
153
+ display: flex;
154
+ }
131
155
.text {
132
156
margin-left: 16px;
133
157
padding-right: 8px;
@@ -137,6 +161,14 @@ class EWDashboard extends LitElement {
137
161
position: relative;
138
162
top: -13px;
139
163
}
164
+ .promote-adopt p:first-child {
165
+ margin-top: 0;
166
+ }
167
+ .promote-adopt svg {
168
+ position: relative;
169
+ left: 32px;
170
+ bottom: -5px;
171
+ }
140
172
@media only screen and (max-width: 550px) {
141
173
:host {
142
174
width: 100%;
0 commit comments