|
| 1 | +<!doctype html> |
| 2 | +<html lang="en"> |
| 3 | + <head> |
| 4 | + <meta charset="UTF-8" /> |
| 5 | + <link rel="icon" type="image/svg+xml" href="/favicon.png" /> |
| 6 | + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 7 | + <title>Install Portable Z-Wave - ZWA2 - Device Toolbox</title> |
| 8 | + <script type="module" src="/src/components/app-header.ts"></script> |
| 9 | + <script type="module" src="/src/pages/zwa2-install-portable.ts"></script> |
| 10 | + <script |
| 11 | + type="module" |
| 12 | + src="/src/components/troubleshooting-portable.ts" |
| 13 | + ></script> |
| 14 | + <script type="module" src="/src/utils/dark-mode.ts"></script> |
| 15 | + <link |
| 16 | + rel="stylesheet" |
| 17 | + href="https://early.webawesome.com/webawesome@3.0.0-beta.6/dist/styles/webawesome.css" |
| 18 | + /> |
| 19 | + <style> |
| 20 | + @import url('/src/styles/shoelace.css'); |
| 21 | + @import url('/src/styles/theme.css'); |
| 22 | + |
| 23 | + body { |
| 24 | + margin: 0; |
| 25 | + font-family: |
| 26 | + -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; |
| 27 | + --color-blue-600: #03a9f4; |
| 28 | + --color-blue-500: #0288d1; |
| 29 | + } |
| 30 | + .installer-wrapper { |
| 31 | + max-width: 1200px; |
| 32 | + margin: 0 auto; |
| 33 | + } |
| 34 | + |
| 35 | + .installer-card { |
| 36 | + background: var(--app-bg-card); |
| 37 | + border-radius: 16px; |
| 38 | + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); |
| 39 | + margin: 20px 0; |
| 40 | + } |
| 41 | + |
| 42 | + .installer-card install-esphome-firmware { |
| 43 | + width: 100%; |
| 44 | + border: none; |
| 45 | + min-height: 600px; |
| 46 | + border-radius: 16px; |
| 47 | + } |
| 48 | + |
| 49 | + warning-card::part(container) { |
| 50 | + margin: 10px 20px 20px; |
| 51 | + } |
| 52 | + |
| 53 | + install-esphome-firmware .min-h-screen { |
| 54 | + min-height: auto !important; |
| 55 | + } |
| 56 | + |
| 57 | + a { |
| 58 | + color: #03a9f4; |
| 59 | + text-decoration: none; |
| 60 | + } |
| 61 | + |
| 62 | + a:hover { |
| 63 | + text-decoration: underline; |
| 64 | + } |
| 65 | + |
| 66 | + @media (max-width: 1200px) { |
| 67 | + .installer-wrapper { |
| 68 | + padding: 0 20px; |
| 69 | + } |
| 70 | + } |
| 71 | + </style> |
| 72 | + </head> |
| 73 | + <body class="wa-palette-shoelace wa-theme-shoelace"> |
| 74 | + <app-header></app-header> |
| 75 | + <zwa2-install-portable></zwa2-install-portable> |
| 76 | + <div class="installer-wrapper" id="installer-container"> |
| 77 | + <div class="installer-card" id="installer"> |
| 78 | + <install-esphome-firmware></install-esphome-firmware> |
| 79 | + </div> |
| 80 | + </div> |
| 81 | + <script type="module"> |
| 82 | + import '/src/components/warning-card.js'; |
| 83 | + import { isSerialUnavailable } from '/src/utils/const.ts'; |
| 84 | + |
| 85 | + // Wait for DOM to be ready before loading the installer |
| 86 | + document.addEventListener('DOMContentLoaded', () => { |
| 87 | + // Load the installer script dynamically |
| 88 | + const installerScript = document.createElement('script'); |
| 89 | + installerScript.type = 'module'; |
| 90 | + installerScript.src = |
| 91 | + 'https://home-assistant.github.io/zwa2-toolbox/standalone/install-esphome-firmware.js'; |
| 92 | + document.head.appendChild(installerScript); |
| 93 | + }); |
| 94 | + |
| 95 | + if (isSerialUnavailable) { |
| 96 | + const installerContainer = document.getElementById( |
| 97 | + 'installer-container' |
| 98 | + ); |
| 99 | + installerContainer.className = ''; |
| 100 | + installerContainer.innerHTML = ''; |
| 101 | + |
| 102 | + const warningCard = document.createElement('warning-card'); |
| 103 | + installerContainer.appendChild(warningCard); |
| 104 | + } |
| 105 | + </script> |
| 106 | + <troubleshooting-portable></troubleshooting-portable> |
| 107 | + </body> |
| 108 | +</html> |
0 commit comments