diff --git a/res/template/directory_upload.html b/res/template/directory_upload.html new file mode 100644 index 0000000..4ebbdf6 --- /dev/null +++ b/res/template/directory_upload.html @@ -0,0 +1,25 @@ +{{define "directory_upload"}} + + + {{template "meta_tags" "Directory upload"}} + {{template "user_style" . }} + {{template "user_style_js" . }} + + + + + + + + {{template "page_top" .}} + +
+ + {{template "page_bottom" .}} + {{template "analytics"}} + + +{{end}} diff --git a/svelte/rollup.config.js b/svelte/rollup.config.js index 95832cc..44b350f 100644 --- a/svelte/rollup.config.js +++ b/svelte/rollup.config.js @@ -37,6 +37,7 @@ export default [ "user_file_manager", "admin_panel", "home_page", + "directory_upload", ].map((name, index) => ({ input: `src/${name}.js`, output: { diff --git a/svelte/src/directory_upload.js b/svelte/src/directory_upload.js new file mode 100644 index 0000000..b92bfe4 --- /dev/null +++ b/svelte/src/directory_upload.js @@ -0,0 +1,8 @@ +import App from './directory_upload/Uploader.svelte'; + +const app = new App({ + target: document.getElementById("page_content"), + props: {} +}); + +export default app; diff --git a/svelte/src/directory_upload/DirectoryUploader.svelte b/svelte/src/directory_upload/DirectoryUploader.svelte new file mode 100644 index 0000000..e5447e3 --- /dev/null +++ b/svelte/src/directory_upload/DirectoryUploader.svelte @@ -0,0 +1,52 @@ + + +{#if bucket_state !== null } + +{/if} diff --git a/svelte/src/directory_upload/Uploader.svelte b/svelte/src/directory_upload/Uploader.svelte new file mode 100644 index 0000000..175d663 --- /dev/null +++ b/svelte/src/directory_upload/Uploader.svelte @@ -0,0 +1,61 @@ + + + { dragging = true }} + on:dragenter|preventDefault|stopPropagation={() => { dragging = true }} + on:dragleave|preventDefault|stopPropagation={() => { dragging = false }} + on:drop={drop} + on:paste={paste} /> + +
+

Directory uploader

+ +
+
+ Pixeldrain's filesystem feature is still under development. Please + don't upload anything you can't afford to lose +
+
+
+ + +
+ + + +
+ + diff --git a/svelte/src/filesystem/FilesystemAPI.svelte b/svelte/src/filesystem/FilesystemAPI.svelte index 4e38c4e..b6badbd 100644 --- a/svelte/src/filesystem/FilesystemAPI.svelte +++ b/svelte/src/filesystem/FilesystemAPI.svelte @@ -1,15 +1,17 @@