From 1f590313dd125e185c3b5b2150e3c686aa344411 Mon Sep 17 00:00:00 2001 From: stringsplit <77242831+nbitzz@users.noreply.github.com> Date: Sat, 31 Dec 2022 20:06:09 -0800 Subject: [PATCH] add file counter --- README.md | 7 ++++--- package.json | 2 +- pages/base.html | 2 ++ src/index.ts | 2 ++ 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 42019f8..ab9e27b 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,10 @@ TOKEN=KILL-YOURSELF.NOW - [X] 1.1.3 display current version on pages - [X] 1.1.4 serve /assets as static files & make /server endpoint - [X] 1.2.0 add file parameters section + custom ids -- [ ] 1.2.1 clean up this shitty code -- [ ] 1.2.2 add id locks, allowing you to set a key for a file that allows you to overwrite the file in the future -- [ ] 1.2.3 prevent cloning of local/private ip addresses +- [ ] 1.2.1 add file counter to main page +- [ ] 1.2.2 clean up this shitty code +- [ ] 1.2.3 add id locks, allowing you to set a key for a file that allows you to overwrite the file in the future +- [ ] 1.2.4 prevent cloning of local/private ip addresses - [ ] 1.3.0 add simple moderation tools - [ ] 2.0.0 rewrite using theUnfunny's code as a base/rewrite using monofile-core diff --git a/package.json b/package.json index 13238d4..b4218bb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "monofile", - "version": "1.2.0", + "version": "1.2.1", "description": "Discord-based file sharing", "main": "index.js", "scripts": { diff --git a/pages/base.html b/pages/base.html index a495e1d..36ddfcc 100644 --- a/pages/base.html +++ b/pages/base.html @@ -140,6 +140,8 @@

Max filesize on instance: $MaxInstanceFilesize +
+ Hosting $FileNum files

made by nbitzz — github$otherText

diff --git a/src/index.ts b/src/index.ts index 52224af..c1a035c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -120,6 +120,7 @@ app.get("/", function(req,res) { .replace(/\$UploadButtonText/g,"Upload file") .replace(/\$otherPath/g,"/clone") .replace(/\$otherText/g,"clone from url...") + .replace(/\$FileNum/g,Object.keys(files).length.toString()) ) }) }) @@ -135,6 +136,7 @@ app.get("/clone", function(req,res) { .replace(/\$UploadButtonText/g,"Input a URL") .replace(/\$otherPath/g,"/") .replace(/\$otherText/g,"upload file...") + .replace(/\$FileNum/g,Object.keys(files).length.toString()) ) }) })