浏览代码

modificato il display delle password - devo anche rivedere il passaggio tra multifile e singolofile

Mauro 4 月之前
父节点
当前提交
ffc905d7e3
共有 3 个文件被更改,包括 8 次插入12 次删除
  1. 二进制
      PasswordWeb
  2. 4 6
      password.go
  3. 4 6
      templates/index.tmpl

二进制
PasswordWeb


+ 4 - 6
password.go

@@ -37,18 +37,16 @@ func main() {
     c.HTML(http.StatusOK,"index.tmpl",gin.H{
     c.HTML(http.StatusOK,"index.tmpl",gin.H{
       "Password1":mod.Run(elementidaleggere,verbose),
       "Password1":mod.Run(elementidaleggere,verbose),
       "Password2":mod.Run(elementidaleggere,verbose),
       "Password2":mod.Run(elementidaleggere,verbose),
-      "Password3":mod.Run(elementidaleggere,verbose),
-      "Password4":mod.Run(elementidaleggere,verbose),
-      "Password5":mod.Run(elementidaleggere,verbose),
+      "Password3":mod.RunNumber(7,verbose),
+      "Password4":mod.RunNumber(10,verbose),
     })
     })
   })
   })
   r.GET("/json", func(c *gin.Context) {
   r.GET("/json", func(c *gin.Context) {
     c.JSON(http.StatusOK,gin.H{
     c.JSON(http.StatusOK,gin.H{
       "Password1":mod.Run(elementidaleggere,verbose),
       "Password1":mod.Run(elementidaleggere,verbose),
       "Password2":mod.Run(elementidaleggere,verbose),
       "Password2":mod.Run(elementidaleggere,verbose),
-      "Password3":mod.Run(elementidaleggere,verbose),
-      "Password4":mod.Run(elementidaleggere,verbose),
-      "Password5":mod.Run(elementidaleggere,verbose),
+      "Password3":mod.RunNumber(7,verbose),
+      "Password4":mod.RunNumber(10,verbose),
     })
     })
   })
   })
   
   

+ 4 - 6
templates/index.tmpl

@@ -24,20 +24,18 @@ Generatore di password del menga!
     <tr>
     <tr>
       <td><div class="text-center p-2 m-2 bg-info text-white shadow rounded-2 justify-content-center" id='Password1' onclick="copyVal('Password1');" value='{{ .Password1 }}'>{{ .Password1 }}</div></td>
       <td><div class="text-center p-2 m-2 bg-info text-white shadow rounded-2 justify-content-center" id='Password1' onclick="copyVal('Password1');" value='{{ .Password1 }}'>{{ .Password1 }}</div></td>
     </tr>
     </tr>
-    </tr>
+    <tr>
       <td><div class="text-center p-2 m-2 bg-info text-white shadow rounded-2 justify-content-center" id='Password2' onclick="copyVal('Password2');" value='{{ .Password2 }}'>{{ .Password2 }}</div></td>
       <td><div class="text-center p-2 m-2 bg-info text-white shadow rounded-2 justify-content-center" id='Password2' onclick="copyVal('Password2');" value='{{ .Password2 }}'>{{ .Password2 }}</div></td>
      </tr>
      </tr>
-     </tr>
+     <tr>
        <td><div class="text-center p-2 m-2 bg-info text-white shadow rounded-2 justify-content-center" id='Password3' onclick="copyVal('Password3');" value='{{ .Password3 }}'>{{ .Password3 }}</div></td>
        <td><div class="text-center p-2 m-2 bg-info text-white shadow rounded-2 justify-content-center" id='Password3' onclick="copyVal('Password3');" value='{{ .Password3 }}'>{{ .Password3 }}</div></td>
      </tr>
      </tr>
-     </tr>
+     <tr>
        <td><div class="text-center p-2 m-2 bg-info text-white shadow rounded-2 justify-content-center" id='Password4' onclick="copyVal('Password4');" value='{{ .Password4 }}'>{{ .Password4 }}</div></td>
        <td><div class="text-center p-2 m-2 bg-info text-white shadow rounded-2 justify-content-center" id='Password4' onclick="copyVal('Password4');" value='{{ .Password4 }}'>{{ .Password4 }}</div></td>
      </tr>
      </tr>
-     </tr>
-      <td><div class="text-center p-2 m-2 bg-info text-white shadow rounded-2 justify-content-center" id='Password5' onclick="copyVal('Password5');" value='{{ .Password5 }}'>{{ .Password5 }}</div></td>
-    </tr>
   </table>
   </table>
 </div>
 </div>
+<p></p>
 <div class="d-flex align-items-center justify-content-center" style="height: 200px"><h3>
 <div class="d-flex align-items-center justify-content-center" style="height: 200px"><h3>
 Copyright: Il mio!<br>
 Copyright: Il mio!<br>
 Liberi di generarvi tutte le password che volete<br>
 Liberi di generarvi tutte le password che volete<br>