diff --git a/src/server/index.ts b/src/server/index.ts index 6712fc7..868e885 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -6,7 +6,7 @@ import bodyParser from "body-parser" import multer, {memoryStorage} from "multer" import Discord, { IntentsBitField, Client } from "discord.js" import express from "express" -import fs from "fs" +import fs, { link } from "fs" import axios, { AxiosResponse } from "axios" import ServeError from "./lib/errors" @@ -129,18 +129,20 @@ app.get("/file/:fileId",async (req,res) => { }) }) -app.get("*",(req,res) => { - ServeError(res,404,"page not found") -}) - app.get("/server",(req,res) => { res.send(JSON.stringify({ ...config, version:pkg.version, - files:files.files.length + files:Object.keys(files.files).length })) }) +app.get("*",(req,res) => { + ServeError(res,404,"page not found") +}) + + + // listen on 3000 or MONOFILE_PORT app.listen(process.env.MONOFILE_PORT || 3000,function() { diff --git a/src/style/app.scss b/src/style/app.scss index 933ccb1..fa1402d 100644 --- a/src/style/app.scss +++ b/src/style/app.scss @@ -1,6 +1,7 @@ @use "base"; @use "app/topbar"; @use "app/pulldown"; +@use "app/uploads"; .menuBtn { text-decoration:none; diff --git a/src/style/app/pulldown.scss b/src/style/app/pulldown.scss index ed00132..6df7347 100644 --- a/src/style/app/pulldown.scss +++ b/src/style/app/pulldown.scss @@ -24,7 +24,6 @@ @media screen and (max-width: 400px) { width: 100%; height: 100%; - height: 100%; } z-index: 1001; diff --git a/src/style/app/uploads.scss b/src/style/app/uploads.scss new file mode 100644 index 0000000..19c2e60 --- /dev/null +++ b/src/style/app/uploads.scss @@ -0,0 +1,37 @@ +#uploadWindow { + position:absolute; + left:50%; + top:50%; + transform:translate(-50%,-50%); + padding:10px; + border-radius:8px; + + background-color:#222222; + color:#ddd; + + h1, p { + margin: 0px; + font-size: 14px; + } + + h1 { + font-weight:600; + font-size: 25px; + } + + .number { + font-family: "Inconsolata", monospace; + } + + @media screen and (max-width: 500px) { + width: calc( 100% - 20px ); + height: calc( 100% - 20px ); + border-radius:0px; + background-color:#00000000; + + transform:none; + left:10px; + top:10px; + padding:0px; + } +} \ No newline at end of file diff --git a/src/svelte/App.svelte b/src/svelte/App.svelte index 558cf48..cd213bc 100644 --- a/src/svelte/App.svelte +++ b/src/svelte/App.svelte @@ -1,6 +1,7 @@