浏览代码

www: fix show/hide button

The show/hide button functionality got accidentally messed up...
H. Peter Anvin 2 年之前
父节点
当前提交
8f23f69870
共有 5 个文件被更改,包括 3 次插入4 次删除
  1. 二进制
      esp32/output/max80.ino.bin
  2. 1 1
      esp32/www/max80.js
  3. 2 3
      esp32/www/update.html
  4. 二进制
      fpga/output/v1.fw
  5. 二进制
      fpga/output/v2.fw

二进制
esp32/output/max80.ino.bin


+ 1 - 1
esp32/www/max80.js

@@ -195,7 +195,7 @@ function uploadform() {
 }
 
 // Flip the status of an INPUT element between text and password
-function showpwd(me = event.target) {
+function showpwd(me = event.currentTarget) {
     const now_visible = me.classList.toggle('hide');
     const new_type = now_visible ? 'text' : 'password';
     me.classList.toggle('show',!now_visible);

+ 2 - 3
esp32/www/update.html

@@ -8,9 +8,8 @@
   <body>
     <script>inc("head.html")</script>
     <h1 class="update">Update</h1>
-    <form id="upload" class="idle"
-	  action="sys/fwupdate" method="post" onsubmit="uploadfile()"
-	  data-ref="10" data-ref-url="status.html">
+    <form id="upload" action="sys/fwupdate" method="post"
+	  onsubmit="uploadfile()" data-ref="10" data-ref-url="status.html">
       <fieldset class="firmware">
 	<legend>Firmware</legend>
 	<input type="file" name="file" hidden accept=".fw" onchange="uploadfile()" />

二进制
fpga/output/v1.fw


二进制
fpga/output/v2.fw