rotate log to be chronological starting with newest

This commit is contained in:
Riley L. 2024-11-04 13:47:45 +01:00
parent 8643a7a303
commit 2b5aa684f1
2 changed files with 12 additions and 2 deletions

View file

@ -354,7 +354,7 @@ end
local function r_log(filter) local function r_log(filter)
return respond(200, "Abrechnungen", function() return respond(200, "Abrechnungen", function()
print([[<table class="log"]]) print([[<table class="log"]])
print([[<tr> print([[<thead><tr>
<th>Time</th> <th>Time</th>
<th>Username</th> <th>Username</th>
<th>Amount</th> <th>Amount</th>
@ -362,7 +362,8 @@ local function r_log(filter)
<th>P.-Count</th> <th>P.-Count</th>
<th>Comment</th> <th>Comment</th>
<th>Actions</th> <th>Actions</th>
</tr>]]) </tr></thead>]])
print("<tbody>")
for time, username, amount, pcode, pcount, comment in read_log() do for time, username, amount, pcode, pcount, comment in read_log() do
if filter == nil or filter == username then if filter == nil or filter == username then
print(string.format([[ print(string.format([[
@ -394,6 +395,7 @@ local function r_log(filter)
)) ))
end end
end end
print("</tbody>")
print("</table>") print("</table>")
end) end)
end end

View file

@ -284,6 +284,14 @@ tr:nth-child(2n) {
background-color: var(--b0); background-color: var(--b0);
} }
table.log > tbody {
transform: rotate(180deg);
}
table.log > tbody > tr {
transform: rotate(180deg);
}
input { input {
background-color: inherit; background-color: inherit;
color: white; color: white;