Small improvements

- Removed fake favicon in favor of 204
- Improved table actions (mobile)
This commit is contained in:
adro 2022-02-22 10:34:45 +01:00
parent e171a7fa09
commit 68845fc715
3 changed files with 24 additions and 19 deletions

View File

@ -24,7 +24,8 @@
<td>{{$d.Alias}}</td> <td>{{$d.Alias}}</td>
<td>{{$d.MAC}}</td> <td>{{$d.MAC}}</td>
<td>{{$d.IP}}</td> <td>{{$d.IP}}</td>
<td class="actions"> <td>
<div class="actions">
<form action="/wake" method="post"> <form action="/wake" method="post">
<input type="text" name="Alias" value="{{$d.Alias}}" hidden> <input type="text" name="Alias" value="{{$d.Alias}}" hidden>
<input type="text" name="MAC" value="{{$d.MAC}}" hidden> <input type="text" name="MAC" value="{{$d.MAC}}" hidden>
@ -37,6 +38,7 @@
<input type="text" name="IP" value="{{$d.IP}}" hidden> <input type="text" name="IP" value="{{$d.IP}}" hidden>
<input type="submit" value="Remove"> <input type="submit" value="Remove">
</form> </form>
</div>
</td> </td>
</tr> </tr>
{{end}} {{end}}
@ -63,10 +65,9 @@
} }
.actions { .actions {
text-align: center; flex-flow: row wrap;
} justify-content: center;
padding: 0;
.actions > form { gap: 0.5rem;
display: contents;
} }
</style> </style>

View File

@ -5,7 +5,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Small web server to send Wake-on-LAN requests to its local network"> <meta name="description" content="Small web server to send Wake-on-LAN requests to its local network">
<meta http-equiv="X-UA-Compatible" content="ie=edge"> <meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="icon" href="data:,">
<link rel="stylesheet" href="/style.css"> <link rel="stylesheet" href="/style.css">
<title>{{ .Title }} - miniwol</title> <title>{{ .Title }} - miniwol</title>
</head> </head>

View File

@ -28,6 +28,7 @@ func Run() error {
e.GET("/", index) e.GET("/", index)
e.GET("/style.css", style) e.GET("/style.css", style)
e.GET("/favicon.ico", favicon)
e.POST("/auth", auth) e.POST("/auth", auth)
e.POST("/deauth", withAuth(deauth)) e.POST("/deauth", withAuth(deauth))
e.POST("/add", withAuth(add)) e.POST("/add", withAuth(add))
@ -76,3 +77,7 @@ func style(c echo.Context) error {
} }
return c.Blob(200, "text/css", styleData) return c.Blob(200, "text/css", styleData)
} }
func favicon(c echo.Context) error {
return c.NoContent(204)
}