add file counter

This commit is contained in:
split / May 2022-12-31 20:06:09 -08:00
parent 9d0e06f67e
commit 1f590313dd
4 changed files with 9 additions and 4 deletions

View file

@ -18,9 +18,10 @@ TOKEN=KILL-YOURSELF.NOW
- [X] 1.1.3 display current version on pages - [X] 1.1.3 display current version on pages
- [X] 1.1.4 serve /assets as static files & make /server endpoint - [X] 1.1.4 serve /assets as static files & make /server endpoint
- [X] 1.2.0 add file parameters section + custom ids - [X] 1.2.0 add file parameters section + custom ids
- [ ] 1.2.1 clean up this shitty code - [ ] 1.2.1 add file counter to main page
- [ ] 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.2 clean up this shitty code
- [ ] 1.2.3 prevent cloning of local/private ip addresses - [ ] 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 - [ ] 1.3.0 add simple moderation tools
- [ ] 2.0.0 rewrite using theUnfunny's code as a base/rewrite using monofile-core - [ ] 2.0.0 rewrite using theUnfunny's code as a base/rewrite using monofile-core

View file

@ -1,6 +1,6 @@
{ {
"name": "monofile", "name": "monofile",
"version": "1.2.0", "version": "1.2.1",
"description": "Discord-based file sharing", "description": "Discord-based file sharing",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {

View file

@ -140,6 +140,8 @@
</div> </div>
<p style="font-family:monospace;position:relative;width:calc( 100% - 50px );left:25px;text-align: center;"> <p style="font-family:monospace;position:relative;width:calc( 100% - 50px );left:25px;text-align: center;">
Max filesize on instance: $MaxInstanceFilesize Max filesize on instance: $MaxInstanceFilesize
<br />
Hosting <strong style="font-family:monospace">$FileNum</strong> files
</p> </p>
<p style="font-family:monospace;position:relative;width:calc( 100% - 50px );left:25px;text-align: center;font-size:12px;color:gray;">made by nbitzz — <a style="color:gray;font-family:monospace;font-size:12px;" href="https://github.com/nbitzz/monofile">github</a><a style="color:gray;font-family:monospace;font-size:12px;" href="$otherPath">$otherText</a></p> <p style="font-family:monospace;position:relative;width:calc( 100% - 50px );left:25px;text-align: center;font-size:12px;color:gray;">made by nbitzz — <a style="color:gray;font-family:monospace;font-size:12px;" href="https://github.com/nbitzz/monofile">github</a><a style="color:gray;font-family:monospace;font-size:12px;" href="$otherPath">$otherText</a></p>
<div style="width:100%;height:25px"></div> <div style="width:100%;height:25px"></div>

View file

@ -120,6 +120,7 @@ app.get("/", function(req,res) {
.replace(/\$UploadButtonText/g,"Upload file") .replace(/\$UploadButtonText/g,"Upload file")
.replace(/\$otherPath/g,"/clone") .replace(/\$otherPath/g,"/clone")
.replace(/\$otherText/g,"clone from url...") .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(/\$UploadButtonText/g,"Input a URL")
.replace(/\$otherPath/g,"/") .replace(/\$otherPath/g,"/")
.replace(/\$otherText/g,"upload file...") .replace(/\$otherText/g,"upload file...")
.replace(/\$FileNum/g,Object.keys(files).length.toString())
) )
}) })
}) })