UNPKG

5.06 kBJavaScriptView Raw
1import{d as e,r as t,_ as o,n as l,s as i,$ as n,y as a}from"./connect-f67814ca.js";const s=a`
2 <svg
3 version="1.1"
4 id="Capa_1"
5 xmlns="http://www.w3.org/2000/svg"
6 xmlns:xlink="http://www.w3.org/1999/xlink"
7 x="0px"
8 y="0px"
9 viewBox="0 0 510.322 510.322"
10 xml:space="preserve"
11 style="width: 28px; vertical-align: middle;"
12 >
13 <g>
14 <path
15 style="fill:currentColor;"
16 d="M429.064,159.505c0-0.151,0.086-1.057,0.086-1.057c0-75.282-61.261-136.521-136.543-136.521 c-52.244,0-97.867,30.587-120.753,76.339c-11.67-9.081-25.108-15.682-40.273-15.682c-37.166,0-67.387,30.199-67.387,67.387 c0,0,0.453,3.279,0.798,5.824C27.05,168.716,0,203.423,0,244.516c0,25.389,9.901,49.268,27.848,67.171 c17.968,17.99,41.804,27.869,67.193,27.869h130.244v46.83h-54.66l97.694,102.008l95.602-102.008h-54.66v-46.83H419.25 c50.174,0,91.072-40.855,91.072-90.986C510.3,201.827,474.428,164.639,429.064,159.505z M419.207,312.744H309.26v-55.545h-83.975 v55.545H95.019c-18.184,0-35.333-7.075-48.211-19.996c-12.878-12.878-19.953-30.005-19.953-48.189 c0-32.68,23.21-60.808,55.264-66.956l12.511-2.394l-2.092-14.431l-1.488-10.785c0-22.347,18.184-40.51,40.531-40.51 c13.266,0,25.691,6.514,33.305,17.408l15.229,21.873l8.52-25.303c15.013-44.652,56.796-74.656,103.906-74.656 c60.506,0,109.709,49.203,109.709,109.644l-1.337,25.712l15.121,0.302l3.149-0.086c35.419,0,64.216,28.797,64.216,64.216 C483.401,283.969,454.604,312.744,419.207,312.744z"
17 />
18 </g>
19 </svg>
20`;let r=class extends i{render(){return n`
21 <ewt-dialog
22 open
23 heading="No port selected"
24 scrimClickAction
25 @closed=${this._handleClose}
26 >
27 <div>
28 If you didn't select a port because you didn't see your device listed,
29 try the following steps:
30 </div>
31 <ol>
32 <li>
33 Make sure that the device is connected to this computer (the one
34 that runs the browser that shows this website)
35 </li>
36 <li>
37 Most devices have a tiny light when it is powered on. If yours has
38 one, make sure it is on.
39 </li>
40 <li>
41 Make sure that the USB cable you use can be used for data and is not
42 a power-only cable.
43 </li>
44 <li>
45 Make sure you have the right drivers installed. Below are the
46 drivers for common chips used in ESP devices:
47 <ul>
48 <li>
49 CP2102 drivers:
50 <a
51 href="https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers"
52 target="_blank"
53 rel="noopener"
54 >Windows & Mac</a
55 >
56 </li>
57 <li>
58 CH342, CH343, CH9102 drivers:
59 <a
60 href="https://www.wch.cn/downloads/CH343SER_ZIP.html"
61 target="_blank"
62 rel="noopener"
63 >Windows</a
64 >,
65 <a
66 href="https://www.wch.cn/downloads/CH34XSER_MAC_ZIP.html"
67 target="_blank"
68 rel="noopener"
69 >Mac</a
70 >
71 <br />
72 (download via blue button with ${s} icon)
73 </li>
74 <li>
75 CH340, CH341 drivers:
76 <a
77 href="https://www.wch.cn/downloads/CH341SER_ZIP.html"
78 target="_blank"
79 rel="noopener"
80 >Windows</a
81 >,
82 <a
83 href="https://www.wch.cn/downloads/CH341SER_MAC_ZIP.html"
84 target="_blank"
85 rel="noopener"
86 >Mac</a
87 >
88 <br />
89 (download via blue button with ${s} icon)
90 </li>
91 </ul>
92 </li>
93 </ol>
94 ${this.doTryAgain?n`
95 <ewt-button
96 slot="primaryAction"
97 dialogAction="close"
98 label="Try Again"
99 @click=${this.doTryAgain}
100 ></ewt-button>
101
102 <ewt-button
103 no-attention
104 slot="secondaryAction"
105 dialogAction="close"
106 label="Cancel"
107 ></ewt-button>
108 `:n`
109 <ewt-button
110 slot="primaryAction"
111 dialogAction="close"
112 label="Close"
113 ></ewt-button>
114 `}
115 </ewt-dialog>
116 `}async _handleClose(){this.parentNode.removeChild(this)}};r.styles=[e,t`
117 li + li,
118 li > ul {
119 margin-top: 8px;
120 }
121 ul,
122 ol {
123 margin-bottom: 0;
124 padding-left: 1.5em;
125 }
126 `],r=o([l("ewt-no-port-picked-dialog")],r);const c=async e=>{const t=document.createElement("ewt-no-port-picked-dialog");return t.doTryAgain=e,document.body.append(t),!0};export{c as openNoPortPickedDialog};