Rework ui to try to fit into screen

This commit is contained in:
nemunaire 2021-09-24 09:54:55 +02:00
parent e486ad0c1b
commit bf556753b3
1 changed files with 3 additions and 2 deletions

View File

@ -33,6 +33,7 @@ func Serve(w http.ResponseWriter, r *http.Request) {
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous">
<style>.table > tbody > tr > th, .table > tbody > tr > td { vertical-align: middle; }
td.danger { text-align: center; }
.hash { max-width: 150px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: inline-block; }
</style>
<script type="text/javascript">
function disp(rendus) {
@ -50,7 +51,7 @@ function disp(rendus) {
if (work) {
var col = document.createElement("td");
col.className = "success";
col.innerHTML = work["date"] + "<br>" + work["hash"];
col.innerHTML = (new Intl.DateTimeFormat('default', { weekday: 'short', month: 'short', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric' }).format(new Date(work["date"]))) + '<br><span class="hash" title="' + work["hash"] + '">' + work["hash"] + '</span>';
row.appendChild(col);
} else {
var col = document.createElement("td");
@ -82,7 +83,7 @@ function disp_std(rendus, login) {
if (work) {
var col = document.createElement("td");
col.className = "success";
col.innerHTML = work["date"] + "<br>" + work["hash"];
col.innerHTML = (new Intl.DateTimeFormat('default', { weekday: 'long', month: 'long', day: 'numeric', year: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric' }).format(new Date(work["date"]))) + '<br>' + work["hash"];
row.appendChild(col);
} else {
var col = document.createElement("td");