diff --git a/README.md b/README.md
index 777e6f2..47857f2 100644
--- a/README.md
+++ b/README.md
@@ -21,10 +21,9 @@ TOKEN=KILL-YOURSELF.NOW
- [X] 1.2.1 add file counter to main page
- [X] 1.2.2 clean up this shitty code
- [X] 1.2.3 bugfixes
-- [ ] 1.3.0 new ui; accounts; utility endpoints; multi file uploads
-- [ ] 1.3.1 organize svelte code
-- [ ] 1.3.2 self-destructing files
-- [ ] 1.3.3 disable cloning of local ips
+- [ ] 1.3.0 new ui; collections; accounts; utility endpoints; multi file uploads
+- [ ] 1.3.1 self-destructing files
+- [ ] 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/assets/script/clone_file.js b/assets/script/clone_file.js
deleted file mode 100644
index 5b31f64..0000000
--- a/assets/script/clone_file.js
+++ /dev/null
@@ -1,30 +0,0 @@
-document.getElementById("uploadButton").addEventListener("click",() => {
- let ask = prompt("Input a URL to clone.")
-
- if (ask) {
- let opt = getOptionsForUploading()
- updateBtnTxt("Requesting clone. Please wait.")
-
- let xmlhttp = new XMLHttpRequest()
-
- xmlhttp.addEventListener("error",function(e) {
- updateBtnTxt(`Upload failed. ${e.toString()}`)
- console.error(e)
- })
-
- xmlhttp.addEventListener("load",function() {
- if (xmlhttp.status == 200) {
- document.getElementById("CopyTB").value = `https://${location.hostname}/download/${xmlhttp.responseText}`
- updateBtnTxt(`Upload complete.Copy URL View URL `)
- } else {
- updateBtnTxt(`Upload failed. ${xmlhttp.responseText}`)
- }
- })
-
- xmlhttp.open("POST","/clone")
- xmlhttp.send(JSON.stringify({
- url: ask,
- ...opt
- }))
- }
-})
\ No newline at end of file
diff --git a/assets/script/upload_file.js b/assets/script/upload_file.js
deleted file mode 100644
index 9bf54c3..0000000
--- a/assets/script/upload_file.js
+++ /dev/null
@@ -1,37 +0,0 @@
-let FileUpload = document.createElement("input")
-FileUpload.setAttribute("type","file")
-
-document.getElementById("uploadButton").addEventListener("click",() => FileUpload.click())
-
-FileUpload.addEventListener("input",() => {
- if (FileUpload.files[0]) {
- let opt = getOptionsForUploading()
- let file = FileUpload.files[0]
-
- updateBtnTxt("Uploading file. This may take a while, so stay put.")
-
- let xmlhttp = new XMLHttpRequest()
-
- xmlhttp.addEventListener("error",function(e) {
- updateBtnTxt(`Upload failed. ${e.toString()}`)
- console.error(e)
- })
-
- xmlhttp.addEventListener("load",function() {
- if (xmlhttp.status == 200) {
- document.getElementById("CopyTB").value = `https://${location.hostname}/download/${xmlhttp.responseText}`
- updateBtnTxt(`Upload complete.Copy URL View URL `)
- } else {
- updateBtnTxt(`Upload failed. ${xmlhttp.responseText}`)
- }
- })
-
- let fd = new FormData()
- fd.append('file',file)
-
- xmlhttp.open("POST","/upload")
- xmlhttp.setRequestHeader("monofile-upload-id",opt.uploadId)
- xmlhttp.send(fd)
-
- }
-})
\ No newline at end of file
diff --git a/pages/collection.html b/pages/collection.html
new file mode 100644
index 0000000..a163bef
--- /dev/null
+++ b/pages/collection.html
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+ monofile
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/download.html b/pages/download.html
index b6f9314..f2a4be0 100644
--- a/pages/download.html
+++ b/pages/download.html
@@ -16,20 +16,22 @@
>
-
-
- $FileName
-
-
- file id $FileId
-
+
+
+
+ $FileName
+
+
+ file id $FileId
+
-
-
- download
-
-
-
+
+
+ download
+
+
+
+
diff --git a/pages/index.html b/pages/index.html
index 13776d6..7ce46d9 100644
--- a/pages/index.html
+++ b/pages/index.html
@@ -18,7 +18,7 @@
content="width=device-width, initial-scale=1.0, user-scalable=0"
>
-
+
monofile
diff --git a/rollup.config.mjs b/rollup.config.mjs
index 42a94b2..490eac5 100644
--- a/rollup.config.mjs
+++ b/rollup.config.mjs
@@ -1,15 +1,29 @@
import svelte from 'rollup-plugin-svelte'
import resolve from "@rollup/plugin-node-resolve"
-export default {
- input: "src/client/main.js",
- output: {
- file: 'out/client/bundle.js',
- format: 'esm',
- sourcemap:true
+export default [
+ {
+ input: "src/client/index.js",
+ output: {
+ file: 'out/client/index.js',
+ format: 'esm',
+ sourcemap:true
+ },
+ plugins: [
+ resolve(),
+ svelte({})
+ ]
},
- plugins: [
- resolve(),
- svelte({})
- ]
-}
\ No newline at end of file
+ {
+ input: "src/client/collection.js",
+ output: {
+ file: 'out/client/collection.js',
+ format: 'esm',
+ sourcemap:true
+ },
+ plugins: [
+ resolve(),
+ svelte({})
+ ]
+ }
+]
\ No newline at end of file
diff --git a/src/client/collection.js b/src/client/collection.js
new file mode 100644
index 0000000..a1aaefe
--- /dev/null
+++ b/src/client/collection.js
@@ -0,0 +1,5 @@
+import App from "../svelte/Collections.svelte"
+
+new App({
+ target: document.body
+})
\ No newline at end of file
diff --git a/src/client/main.js b/src/client/index.js
similarity index 100%
rename from src/client/main.js
rename to src/client/index.js
diff --git a/src/style/_base.scss b/src/style/_base.scss
index bc2f1ce..0462952 100644
--- a/src/style/_base.scss
+++ b/src/style/_base.scss
@@ -53,4 +53,31 @@ body {
#appContent {
background-color: $Background
+}
+
+/*
+ scrollbars
+*/
+
+* {
+ /* nice scrollbars aren't needed on mobile so */
+ @media screen and (min-width:500px) {
+
+ &::-webkit-scrollbar {
+ width:5px;
+ }
+
+ &::-webkit-scrollbar-track {
+ background-color:#191919;
+ }
+
+ &::-webkit-scrollbar-thumb {
+ background-color:#333;
+
+ &:hover {
+ background-color:#373737;
+ }
+ }
+
+ }
}
\ No newline at end of file
diff --git a/src/style/app/pulldown.scss b/src/style/app/pulldown.scss
index cf9c199..f18c83c 100644
--- a/src/style/app/pulldown.scss
+++ b/src/style/app/pulldown.scss
@@ -4,8 +4,11 @@
position:absolute;
left:0px;
height: 100%;
- display:none;
- opacity:0.5;
+ width:100%;
+ top:0px;
+ opacity:0.25;
+ border:none;
+ outline:none;
background-color:#AAAAAA;
z-index: 1000;
@@ -13,9 +16,10 @@
.pulldown {
position: absolute;
- width: 250px;
+ width: 300px;
height: 400px;
background-color: #191919;
+ color: #dddddd;
top:0px;
left:50%;
@@ -26,5 +30,9 @@
height: 100%;
}
+ p, h1, h2 {
+ margin:0px;
+ }
+
z-index: 1001;
}
\ No newline at end of file
diff --git a/src/style/app/uploader/add_new_files.scss b/src/style/app/uploader/add_new_files.scss
index 248e30e..d6ac942 100644
--- a/src/style/app/uploader/add_new_files.scss
+++ b/src/style/app/uploader/add_new_files.scss
@@ -11,18 +11,26 @@
font-size: 30px;
span {
- font-size:16px;
position:relative;
- top:-4px;
- left:10px;
+
+ &._add_files_txt {
+ font-size:16px;
+ top:-4px;
+ left:10px;
+
+ @media screen and (max-width:500px) {
+ font-size:20px;
+ top:-6px;
+ left:10px;
+ }
+ }
}
@media screen and (max-width:500px) {
font-size: 40px;
- span {
+ span._add_files_txt {
font-size:20px;
- position:relative;
top:-6px;
left:10px;
}
diff --git a/src/style/downloads.scss b/src/style/downloads.scss
index c1c88b5..a11863d 100644
--- a/src/style/downloads.scss
+++ b/src/style/downloads.scss
@@ -6,6 +6,15 @@
@use "app/uploads";
@use "base";
-body {
- background-color: base.$Background;
+#appContent {
+ position:absolute;
+ left:0px;
+ top:0px;
+ width:100%;
+ height:100%;
+ background-image: linear-gradient(#333,base.$Background);
+
+ @media screen and (max-width:500px) {
+ background-image: linear-gradient(#303030,base.$Background);
+ }
}
\ No newline at end of file
diff --git a/src/svelte/App.svelte b/src/svelte/App.svelte
index 87d1846..0811c3d 100644
--- a/src/svelte/App.svelte
+++ b/src/svelte/App.svelte
@@ -1,33 +1,23 @@
-
+
-
-
monofile
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/svelte/Collections.svelte b/src/svelte/Collections.svelte
new file mode 100644
index 0000000..ae69250
--- /dev/null
+++ b/src/svelte/Collections.svelte
@@ -0,0 +1,12 @@
+
+
+
+
+
{collection.name}
+
{collection.id}  â€” by @{collection.owner}
+
+
\ No newline at end of file
diff --git a/src/svelte/elem/PulldownManager.svelte b/src/svelte/elem/PulldownManager.svelte
new file mode 100644
index 0000000..b6b44e1
--- /dev/null
+++ b/src/svelte/elem/PulldownManager.svelte
@@ -0,0 +1,36 @@
+
+
+
+{#if $pulldownOpen}
+
+
+
+
+
+{/if}
\ No newline at end of file
diff --git a/src/svelte/elem/Topbar.svelte b/src/svelte/elem/Topbar.svelte
index b4c0bf8..83ea9d0 100644
--- a/src/svelte/elem/Topbar.svelte
+++ b/src/svelte/elem/Topbar.svelte
@@ -1,9 +1,24 @@
-
+ {#if $pulldownOpen}
+
+ {/if}
+
diff --git a/src/svelte/elem/transition/_void.js b/src/svelte/elem/transition/_void.js
index 8bf599c..8f4ca0f 100644
--- a/src/svelte/elem/transition/_void.js
+++ b/src/svelte/elem/transition/_void.js
@@ -1,6 +1,6 @@
import { circIn, circOut } from "svelte/easing"
-export function _void(node, { duration, easingFunc, op }) {
+export function _void(node, { duration, easingFunc, op, prop }) {
let rect = node.getBoundingClientRect()
return {
@@ -10,7 +10,7 @@ export function _void(node, { duration, easingFunc, op }) {
return `
white-space: nowrap;
- height: ${(eased)*(rect.height)}px;
+ ${prop||"height"}: ${(eased)*(rect[prop||"height"])}px;
padding: 0px;
opacity:${eased};
overflow: clip;
diff --git a/src/svelte/elem/uploader/AttachmentZone.svelte b/src/svelte/elem/uploader/AttachmentZone.svelte
index 98b9046..58dce10 100644
--- a/src/svelte/elem/uploader/AttachmentZone.svelte
+++ b/src/svelte/elem/uploader/AttachmentZone.svelte
@@ -1,6 +1,7 @@