From afcb4d72f588fc58970f3444037ff58b4ba6c921 Mon Sep 17 00:00:00 2001 From: Bram Date: Thu, 26 Mar 2026 16:14:13 +0100 Subject: [PATCH] fix styling on some pages --- internal/file/handlers.go | 6 +- internal/web/handler.go | 2 +- templates/complete.html | 113 ++++++++++------- templates/error.html | 64 ++++++++-- templates/index.html | 260 ++++++++++++++++++++++++++------------ 5 files changed, 302 insertions(+), 143 deletions(-) diff --git a/internal/file/handlers.go b/internal/file/handlers.go index d662050..2b36440 100644 --- a/internal/file/handlers.go +++ b/internal/file/handlers.go @@ -111,7 +111,7 @@ func (h *Handler) View(c *gin.Context) { record, err := h.service.DownloadFile(id) if err != nil { - c.HTML(http.StatusOK, "fileNotFound.html", nil) + c.HTML(http.StatusOK, "error.html", nil) return } name := util.SafeFilename(record.Filename) @@ -135,7 +135,7 @@ func (h *Handler) Download(c *gin.Context) { record, err := h.service.DownloadFile(id) if err != nil { - c.HTML(http.StatusOK, "fileNotFound.html", nil) + c.HTML(http.StatusOK, "error.html", nil) return } name := util.SafeFilename(record.Filename) @@ -151,7 +151,7 @@ func (h *Handler) Delete(c *gin.Context) { _, err := h.service.DeleteFileByDeletionID(id) if err != nil { - c.HTML(http.StatusOK, "fileNotFound.html", nil) + c.HTML(http.StatusOK, "error.html", nil) return } diff --git a/internal/web/handler.go b/internal/web/handler.go index 4b2544d..af3800c 100644 --- a/internal/web/handler.go +++ b/internal/web/handler.go @@ -50,7 +50,7 @@ func (h *Handler) FileView(c *gin.Context) { fileRecord, err := h.fileService.GetFileByViewID(id) if err != nil { - c.HTML(404, "fileNotFound.html", nil) + c.HTML(404, "error.html", nil) return } diff --git a/templates/complete.html b/templates/complete.html index 1ccab5b..560f451 100644 --- a/templates/complete.html +++ b/templates/complete.html @@ -6,105 +6,136 @@ Send.it - File Ready - - + -
+
- Send.it logo + +
+
+ Send.it logo +

Send_It

+
+
+
+
-
-

FILE READY

-
- -
- -
- UPLOAD COMPLETE + +
+ ✓ File_Uploaded
- - - - - - +
- +
- +
- +
- +
- +
-
-

- A service by Brammie15 -

+ +
+ A_Service_By_Brammie15 +
+ TOS + SUDO +
+
@@ -112,21 +143,17 @@ function copy(id) { const el = document.getElementById(id); el.select(); - el.setSelectionRange(0, 99999); // mobile support + el.setSelectionRange(0, 99999); document.execCommand('copy'); } const downloadKey = "{{.DownloadID}}"; const deleteKey = "{{.DeleteID}}"; - const base = window.location.origin; document.getElementById("res-url").value = `${base}/api/files/view/${downloadKey}`; document.getElementById("res-del").value = `${base}/api/files/delete/${deleteKey}`; -SUDO -TOS - \ No newline at end of file diff --git a/templates/error.html b/templates/error.html index 9ac12a6..47c3757 100644 --- a/templates/error.html +++ b/templates/error.html @@ -6,7 +6,6 @@ Nothing to see here -
+
+
+ Send.it logo +

Send_It

+
+
+
@@ -93,6 +121,14 @@
+
+ A_Service_By_Brammie15 +
+ TOS + SUDO +
+
+
diff --git a/templates/index.html b/templates/index.html index 93225b9..36aa728 100644 --- a/templates/index.html +++ b/templates/index.html @@ -7,47 +7,65 @@ - + - -
- Send.it logo +
+ + +
+
+ Send.it logo +

Send_It

+
+
+ +
-
-

Send it

-
-
-
+ +
+ + +
- Click to select or drop file +
+
-