diff --git a/palette b/palette index a0fd6a8..de59f87 100755 Binary files a/palette and b/palette differ diff --git a/web.go b/web.go index df8cecf..01498d3 100644 --- a/web.go +++ b/web.go @@ -127,6 +127,7 @@ func (a *apiServer) renderPaste(w http.ResponseWriter, row *PasteRow, justCreate "LineCount": lines, "SizeBytes": len(row.Content), "CreatedAgo": agoString(row.CreatedAt), + "CreatedAtUnix": row.CreatedAt, "ViewCount": row.ViewCount, "Visibility": row.Visibility, "ExpiresAt": row.ExpiresAt.Valid, @@ -179,13 +180,13 @@ func (a *apiServer) handlePasteView(w http.ResponseWriter, r *http.Request) { a.renderPaste(w, row, false, "") return } - renderPage(w, "unlock.html", map[string]any{"Page": "unlock", "ID": row.ID, "Wrong": true, "CreatedAgo": agoString(row.CreatedAt)}) + renderPage(w, "unlock.html", map[string]any{"Page": "unlock", "ID": row.ID, "Wrong": true, "CreatedAgo": agoString(row.CreatedAt), "CreatedAtUnix": row.CreatedAt}) return } // check cookie c, err := r.Cookie("pw_" + row.ID) if err != nil || c.Value != "1" { - renderPage(w, "unlock.html", map[string]any{"Page": "unlock", "ID": row.ID, "Wrong": false, "CreatedAgo": agoString(row.CreatedAt)}) + renderPage(w, "unlock.html", map[string]any{"Page": "unlock", "ID": row.ID, "Wrong": false, "CreatedAgo": agoString(row.CreatedAt), "CreatedAtUnix": row.CreatedAt}) return } } diff --git a/web/templates/foot.html b/web/templates/foot.html index b1f3d7b..850e1fc 100644 --- a/web/templates/foot.html +++ b/web/templates/foot.html @@ -1 +1,21 @@ -{{define "foot"}}{{end}} +{{define "foot"}}{{end}} \ No newline at end of file diff --git a/web/templates/history.html b/web/templates/history.html index b06af41..b65148a 100644 --- a/web/templates/history.html +++ b/web/templates/history.html @@ -118,7 +118,7 @@ async function load() { `