From 851fc95f1e17366477fcabbb32bd7b7a72487de8 Mon Sep 17 00:00:00 2001 From: Greirson Lee-Thorp Date: Fri, 31 Jan 2025 01:26:55 -0800 Subject: [PATCH] Add customizable site title feature via DUMBDROP_TITLE environment variable --- .env.example | 5 ++-- README.md | 3 ++- public/index.html | 4 ++-- public/login.html | 4 ++-- server.js | 58 ++++++++++++++++++++--------------------------- 5 files changed, 33 insertions(+), 41 deletions(-) diff --git a/.env.example b/.env.example index bbbe88d..685d3f1 100644 --- a/.env.example +++ b/.env.example @@ -1,12 +1,13 @@ # Server Configuration PORT=3000 # The port the server will listen on +DUMBDROP_TITLE=DumbDrop # Site title displayed in header (default: DumbDrop) # Upload Limits MAX_FILE_SIZE=1024 # Maximum file size in MB (default: 1024 MB / 1 GB) # Security -DUMBDROP_PIN= # Optional 4-digit PIN protection (leave empty to disable) +DUMBDROP_PIN= # Optional PIN protection (4-10 digits, leave empty to disable) # Notifications APPRISE_URL= # Apprise URL for notifications (leave empty to disable) -APPRISE_MESSAGE= # Custom message for notifications (default: "File uploaded: {filename}") \ No newline at end of file +APPRISE_MESSAGE= # Custom message for notifications (default: "File uploaded: {filename}") diff --git a/README.md b/README.md index 5e15e18..2d5d14f 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,9 @@ No auth (unless you want it now!), no storage, no nothing. Just a simple file up | PORT | Server port | 3000 | No | | MAX_FILE_SIZE| Maximum file size in MB | 1024 | No | | DUMBDROP_PIN | PIN protection (4-10 digits) | None | No | +| DUMBDROP_TITLE| Site title displayed in header | DumbDrop| No | | APPRISE_URL | Apprise URL for notifications | None | No | -| APPRISE_MESSAGE| Notification message template | "File uploaded: {filename}" | No | +| APPRISE_MESSAGE| Notification message template | "File uploaded: {filename}" | No | ## Security Features diff --git a/public/index.html b/public/index.html index 6ae75f2..71757ef 100644 --- a/public/index.html +++ b/public/index.html @@ -3,7 +3,7 @@ - DumbDrop - Simple File Upload + {{SITE_TITLE}} - Simple File Upload @@ -26,7 +26,7 @@