fix: auto-select firmware after upload, guard flash button without selection
- Auto-select uploaded firmware immediately after upload completes - Auto-select single firmware on list load (no manual click needed) - Hide flash button and show warning when no firmware is selected - Re-apply manifest on list reload to avoid stale state - Restore warning banner on firmware delete Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -262,26 +262,33 @@
|
||||
<div style="border-top:1px solid var(--border);padding-top:16px;margin-top:4px;">
|
||||
<div class="status-row" style="margin-bottom:12px;">
|
||||
<span>💾</span>
|
||||
<span id="selected-fw-info" style="font-size:14px;">선택된 펌웨어 없음 — 위 목록에서 선택하세요</span>
|
||||
<span id="selected-fw-info" style="font-size:14px;">선택된 펌웨어 없음 — 위 목록에서 클릭하여 선택하세요</span>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
esp-web-install-button 웹 컴포넌트
|
||||
manifest 속성에 백엔드 manifest URL을 동적으로 설정
|
||||
펌웨어 선택 시 selectFirmware() 함수가 manifest를 업데이트
|
||||
-->
|
||||
<esp-web-install-button id="esp-install-btn">
|
||||
<button
|
||||
slot="activate"
|
||||
class="btn btn-primary needs-serial"
|
||||
style="width:100%;justify-content:center;padding:12px;"
|
||||
>
|
||||
⚡ 플래시 실행
|
||||
</button>
|
||||
<span slot="unsupported" style="color:var(--danger);font-size:13px;">
|
||||
⚠ 이 브라우저는 Web Serial을 지원하지 않습니다 (Chrome/Edge 필요)
|
||||
</span>
|
||||
</esp-web-install-button>
|
||||
<!-- 펌웨어 미선택 경고 -->
|
||||
<div id="no-fw-warning" class="alert alert-warn" style="margin-bottom:12px;">
|
||||
<span>⚠</span>
|
||||
<div style="font-size:13px;">
|
||||
<strong>펌웨어를 먼저 선택하세요.</strong>
|
||||
위 목록에서 플래시할 펌웨어를 클릭하면 이 버튼이 활성화됩니다.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 플래시 버튼 (펌웨어 선택 후 표시) -->
|
||||
<div id="flash-btn-wrap" style="display:none;">
|
||||
<esp-web-install-button id="esp-install-btn">
|
||||
<button
|
||||
slot="activate"
|
||||
class="btn btn-primary needs-serial"
|
||||
style="width:100%;justify-content:center;padding:12px;"
|
||||
>
|
||||
⚡ 플래시 실행
|
||||
</button>
|
||||
<span slot="unsupported" style="color:var(--danger);font-size:13px;">
|
||||
⚠ 이 브라우저는 Web Serial을 지원하지 않습니다 (Chrome/Edge 필요)
|
||||
</span>
|
||||
</esp-web-install-button>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-warn" style="margin-top:14px;">
|
||||
<span>⚠</span>
|
||||
|
||||
Reference in New Issue
Block a user