104 lines
2.3 KiB
HTML
104 lines
2.3 KiB
HTML
{{ define "share_list" }}
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<title>ckpool Share Browser</title>
|
|
<style>
|
|
body {
|
|
font-family: sans-serif;
|
|
background: #111;
|
|
color: #eee;
|
|
padding: 20px;
|
|
}
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
margin-bottom: 20px;
|
|
}
|
|
th,
|
|
td {
|
|
padding: 8px 12px;
|
|
border: 1px solid #444;
|
|
text-align: left;
|
|
white-space: nowrap;
|
|
}
|
|
th {
|
|
background-color: #222;
|
|
}
|
|
a.page-link {
|
|
margin: 0 5px;
|
|
text-decoration: none;
|
|
color: #0af;
|
|
}
|
|
a.page-link.current {
|
|
font-weight: bold;
|
|
color: #fff;
|
|
}
|
|
a {
|
|
color: #0af;
|
|
text-decoration: none;
|
|
}
|
|
li {
|
|
display: inline;
|
|
margin: 0 10px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>☀️ Pool Share Browser</h1>
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Time</th>
|
|
<th>Worker</th>
|
|
<th>Address</th>
|
|
<th>SDiff</th>
|
|
<th>Result</th>
|
|
<th>Hash</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{{ range .Shares }}
|
|
<tr>
|
|
<td>{{ formatCreateDate .CreateDate }}</td>
|
|
<td>{{ .WorkerName }}</td>
|
|
<td>{{ .Address }}</td>
|
|
<td>{{ humanDiff .SDiff }}</td>
|
|
<td>{{ if .Result }}✔️{{ else }}❌{{ end }}</td>
|
|
<td><code style="font-size: small">{{ .Hash }}</code></td>
|
|
</tr>
|
|
{{ else }}
|
|
<tr>
|
|
<td colspan="6">No shares found.</td>
|
|
</tr>
|
|
{{ end }}
|
|
</tbody>
|
|
</table>
|
|
|
|
<div>
|
|
{{ if gt .Page 1 }}
|
|
<a class="page-link" href="?page={{ sub .Page 1 }}">« Prev</a>
|
|
{{ end }} {{ if gt .Page 2 }}
|
|
<a class="page-link" href="?page=1">1</a>
|
|
{{ if gt .Page 3 }}
|
|
<span class="page-link">...</span>
|
|
{{ end }} {{ end }}
|
|
|
|
<a class="page-link current" href="?page={{ .Page }}">{{ .Page }}</a>
|
|
|
|
{{ if .HasMore }}
|
|
<span class="page-link">...</span>
|
|
<a class="page-link" href="?page={{ add .Page 1 }}">Next »</a>
|
|
{{ end }}
|
|
</div>
|
|
|
|
<ul>
|
|
<li><a href="/">Home</a></li>
|
|
<li><a href="/shares">View Shares</a></li>
|
|
</ul>
|
|
</body>
|
|
</html>
|
|
{{ end }}
|