diff --git a/res/static/style/layout.css b/res/static/style/layout.css index 5ca5953..e1d0383 100644 --- a/res/static/style/layout.css +++ b/res/static/style/layout.css @@ -314,7 +314,7 @@ h4, h5, h6 { line-height: 1; - margin: 0.5em 0; + margin: 0.3em 0; font-weight: lighter; font-family: 'Open Sans Light', sans-serif; } @@ -365,7 +365,7 @@ a { } p { - margin: 1em 0; + margin: 0.5em 0; } /* Forms*/ diff --git a/svelte/src/filesystem/FileStats.svelte b/svelte/src/filesystem/FileStats.svelte index 42a42a2..c6557c6 100644 --- a/svelte/src/filesystem/FileStats.svelte +++ b/svelte/src/filesystem/FileStats.svelte @@ -130,7 +130,7 @@ onDestroy(close_socket) line-height: 0.75em; margin-top: 0.5em; } -@media (max-width: 600px) { +@media (max-width: 700px) { .label { text-align: center; padding-left: 0; diff --git a/svelte/src/filesystem/Filesystem.svelte b/svelte/src/filesystem/Filesystem.svelte index 735e034..05e3740 100644 --- a/svelte/src/filesystem/Filesystem.svelte +++ b/svelte/src/filesystem/Filesystem.svelte @@ -55,7 +55,7 @@ const keydown = e => { if (edit_visible) { edit_visible = false } else { - edit_window.edit(state.base, true) + edit_window.edit(state.base, true, "file") } break; case "s": @@ -242,7 +242,10 @@ const update_css = path => document.documentElement.style = branding_from_path(p flex-direction: row; overflow: hidden; } -@media (max-width: 600px) { + +/* This max-width needs to be synced with the .toolbar max-width in +Toolbar.svelte and the .label max-width in FileStats.svelte */ +@media (max-width: 700px) { .viewer_area { flex-direction: column-reverse; } diff --git a/svelte/src/filesystem/Toolbar.svelte b/svelte/src/filesystem/Toolbar.svelte index 7c97abf..7011c2d 100644 --- a/svelte/src/filesystem/Toolbar.svelte +++ b/svelte/src/filesystem/Toolbar.svelte @@ -25,7 +25,7 @@ $: share_url = generate_share_url(state.path) let link_copied = false export const copy_link = () => { if (share_url === "") { - edit_window.edit(state.base, "share", true) + edit_window.edit(state.base, true, "share") return } @@ -119,7 +119,7 @@ let expand = e => { {#if state.base.id !== "me" && state.permissions.update === true} - @@ -161,7 +161,10 @@ let expand = e => { .button_expand { display: none; } -@media (max-width: 600px) { + +/* This max-width needs to be synced with the .viewer_area max-width in +Toolbar.svelte and the .label max-width in FileStats.svelte */ +@media (max-width: 700px) { .toolbar { overflow-y: hidden; max-height: 2.5em; diff --git a/svelte/src/filesystem/edit_window/EditWindow.svelte b/svelte/src/filesystem/edit_window/EditWindow.svelte index 7cbacb6..49efb1a 100644 --- a/svelte/src/filesystem/edit_window/EditWindow.svelte +++ b/svelte/src/filesystem/edit_window/EditWindow.svelte @@ -1,11 +1,11 @@ @@ -152,55 +144,33 @@ const delete_file = async e => { -
+
save(false)}>
- {#if tab === "file"} -
-

File settings

- {#if is_root_dir} -
- Filesystem root cannot be renamed. If this shared directory - is in - your filesystem - you can rename it from there -
- {/if} -
- - -
-

Delete

-

- Delete this file or directory. If this is a directory then all - subfiles will be deleted as well. This action cannot be undone. -

-
- {:else if tab === "share"} -
-

Share this file/directory

-

- When a file or directory is shared it can be accessed - through a unique link. You can get the URL with the 'Copy - link' button on the toolbar, or share the link with the - 'Share' button. If you share a directory all the files - within the directory are also accessible from the link. -

-
- - -
-
- {:else if tab === "branding"} -
+
+ {#if tab === "file"} + + {:else if tab === "share"} + save(true)} + /> + {:else if tab === "branding"} custom_css = branding_from_node(file)} /> -
- {/if} + {/if} +
diff --git a/svelte/src/filesystem/edit_window/FileOptions.svelte b/svelte/src/filesystem/edit_window/FileOptions.svelte new file mode 100644 index 0000000..de1d55f --- /dev/null +++ b/svelte/src/filesystem/edit_window/FileOptions.svelte @@ -0,0 +1,66 @@ + + +

File settings

+{#if is_root_dir} +
+ Filesystem root cannot be renamed. If this shared directory + is in + your filesystem + you can rename it from there +
+{/if} +
+ + +
+

Delete

+

+ Delete this file or directory. If this is a directory then all + subfiles will be deleted as well. This action cannot be undone. +

+ + + {#if is_shared} + Your sharing link: {share_link} + + + + +
+ + diff --git a/svelte/src/filesystem/filemanager/FileManager.svelte b/svelte/src/filesystem/filemanager/FileManager.svelte index c503f16..3b6c50d 100644 --- a/svelte/src/filesystem/filemanager/FileManager.svelte +++ b/svelte/src/filesystem/filemanager/FileManager.svelte @@ -71,7 +71,7 @@ const node_select = e => { state.children[index].fm_selected = !state.children[index].fm_selected } -const node_settings = e => edit_window.edit(state.children[e.detail], false) +const node_settings = e => edit_window.edit(state.children[e.detail], false, "file") const node_branding = e => edit_window.edit(state.children[e.detail], false, "branding") const navigate_up = () => {