From e98795af1a5bed25936d1fbd057dfd39f51b39b1 Mon Sep 17 00:00:00 2001 From: nbitzz <77242831+nbitzz@users.noreply.github.com> Date: Sat, 28 Jan 2023 14:08:08 -0800 Subject: [PATCH] xcvcvxfxvbf --- README.md | 3 +-- src/server/lib/errors.ts | 4 ++-- src/style/_base.scss | 6 ++++++ src/style/app.scss | 11 ++++++++++- src/style/app/pulldown.scss | 31 +++++++++++++++++++++++++++++++ src/style/app/topbar.scss | 13 ------------- src/svelte/App.svelte | 20 +++++++++++++------- src/svelte/elem/Topbar.svelte | 14 +++++--------- 8 files changed, 68 insertions(+), 34 deletions(-) create mode 100644 src/style/app/pulldown.scss diff --git a/README.md b/README.md index f046016..d9a78eb 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,7 @@ TOKEN=KILL-YOURSELF.NOW - [X] 1.2.3 bugfixes - [ ] 1.3.0 new ui; accounts - [ ] 1.3.1 add utility endpoints: `/embed/:fileId` for discord, `/:fileId` for quick access -- [ ] 1.3.2 support multiple uploads -- [ ] 1.3.3 disable cloning of local ips +- [ ] 1.3.2 disable cloning of local ips - [ ] 1.4.0 admin panel - [ ] 2.0.0 rewrite using theUnfunny's code as a base/rewrite using monofile-core diff --git a/src/server/lib/errors.ts b/src/server/lib/errors.ts index 399b152..d3a325d 100644 --- a/src/server/lib/errors.ts +++ b/src/server/lib/errors.ts @@ -12,8 +12,8 @@ export default async function ServeError( if (!errorPage) { errorPage = ( - await readFile(`${process.cwd()}/src/pages/error.html`) - .catch(() => {res.header("Content-Type","text/plain")}) + await readFile(`${process.cwd()}/pages/error.html`) + .catch((err) => console.error(err)) || "
$code $text
" ) .toString() diff --git a/src/style/_base.scss b/src/style/_base.scss index 8ba74c2..bc2f1ce 100644 --- a/src/style/_base.scss +++ b/src/style/_base.scss @@ -46,5 +46,11 @@ $darkish: rgb(54, 62, 70); */ body { + background-color: rgb(30, 33, 36); // this is here so that + // pulling down to refresh + // on mobile looks good +} + +#appContent { background-color: $Background } \ No newline at end of file diff --git a/src/style/app.scss b/src/style/app.scss index 938ccdc..933ccb1 100644 --- a/src/style/app.scss +++ b/src/style/app.scss @@ -1,5 +1,6 @@ @use "base"; @use "app/topbar"; +@use "app/pulldown"; .menuBtn { text-decoration:none; @@ -19,4 +20,12 @@ color:slategray; transition-duration: 100ms; } -} \ No newline at end of file +} + +#appContent { + position:absolute; + left:0px; + top:40px; + width:100%; + height: calc( 100% - 40px ); +} \ No newline at end of file diff --git a/src/style/app/pulldown.scss b/src/style/app/pulldown.scss new file mode 100644 index 0000000..ed00132 --- /dev/null +++ b/src/style/app/pulldown.scss @@ -0,0 +1,31 @@ +@use "../base"; + +#overlay { + position:absolute; + left:0px; + height: 100%; + display:none; + opacity:0.5; + background-color:#AAAAAA; + + z-index: 1000; +} + +.pulldown { + position: absolute; + width: 250px; + height: 400px; + background-color: #191919; + + top:0px; + left:50%; + transform:translateX(-50%); + + @media screen and (max-width: 400px) { + width: 100%; + height: 100%; + height: 100%; + } + + z-index: 1001; +} \ No newline at end of file diff --git a/src/style/app/topbar.scss b/src/style/app/topbar.scss index 44cc9b0..f28cc46 100644 --- a/src/style/app/topbar.scss +++ b/src/style/app/topbar.scss @@ -18,17 +18,4 @@ column-gap:5px; - .monofile_ico { - width:26px; - height:26px; - border:2px solid base.$darkish; - border-radius:100%; - transition-duration: 100ms; - - &:hover { - border:2px solid #999999; - transition-duration: 100ms; - } - } - } \ No newline at end of file diff --git a/src/svelte/App.svelte b/src/svelte/App.svelte index 1aa838c..558cf48 100644 --- a/src/svelte/App.svelte +++ b/src/svelte/App.svelte @@ -1,22 +1,28 @@ - -
- +
\ No newline at end of file diff --git a/src/svelte/elem/Topbar.svelte b/src/svelte/elem/Topbar.svelte index f80f1ba..b4c0bf8 100644 --- a/src/svelte/elem/Topbar.svelte +++ b/src/svelte/elem/Topbar.svelte @@ -3,14 +3,10 @@
- - - - -
- - - + + + -
+
\ No newline at end of file