From 4d1680b7f5c794c9be1ee7f7333e7e31a7951e63 Mon Sep 17 00:00:00 2001 From: Wim Brand Date: Mon, 27 Jan 2025 22:54:47 +0100 Subject: [PATCH] Use fieldset for styling form elements --- res/static/style/layout.css | 16 +++ res/template/widgets.html | 7 + svelte/src/filesystem/FileStats.svelte | 2 +- svelte/src/filesystem/Filesystem.svelte | 2 +- svelte/src/filesystem/Toolbar.svelte | 7 +- .../edit_window/AccessControl.svelte | 132 +++++++++--------- .../edit_window/BrandingOptions.svelte | 85 ++++++----- .../filesystem/edit_window/FileOptions.svelte | 41 +++--- .../edit_window/SharingOptions.svelte | 115 +++++++-------- .../filesystem/filemanager/FileManager.svelte | 1 - .../filesystem/filemanager/ListView.svelte | 10 +- 11 files changed, 233 insertions(+), 185 deletions(-) diff --git a/res/static/style/layout.css b/res/static/style/layout.css index e9ef7af..cd57e0b 100644 --- a/res/static/style/layout.css +++ b/res/static/style/layout.css @@ -386,6 +386,22 @@ ul { list-style: disc; } +fieldset { + padding: 4px; + border-radius: 8px; + border: 2px var(--separator) solid; + margin: 0; +} + +fieldset>legend { + padding: 2px 8px; + margin-left: auto; + margin-right: auto; + border-radius: 8px; + font-size: 1.1em; + border-bottom: 2px var(--separator) solid; +} + /* Forms*/ .form { diff --git a/res/template/widgets.html b/res/template/widgets.html index 5894b1e..c05b3d6 100644 --- a/res/template/widgets.html +++ b/res/template/widgets.html @@ -57,6 +57,13 @@ File
Color +
+
+ Legend +

+ Fieldset +

+


diff --git a/svelte/src/filesystem/FileStats.svelte b/svelte/src/filesystem/FileStats.svelte index 5a3faf8..0627bf0 100644 --- a/svelte/src/filesystem/FileStats.svelte +++ b/svelte/src/filesystem/FileStats.svelte @@ -147,7 +147,7 @@ const close_socket = () => { .stat { line-height: 1.2em; } -@media (max-width: 800px) { +@media (max-width: 1000px) { .label { text-align: center; padding-left: 0; diff --git a/svelte/src/filesystem/Filesystem.svelte b/svelte/src/filesystem/Filesystem.svelte index 7d9ecaf..6dbe316 100644 --- a/svelte/src/filesystem/Filesystem.svelte +++ b/svelte/src/filesystem/Filesystem.svelte @@ -252,7 +252,7 @@ const download = () => { /* 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: 800px) { +@media (max-width: 1000px) { .viewer_area { flex-direction: column-reverse; } diff --git a/svelte/src/filesystem/Toolbar.svelte b/svelte/src/filesystem/Toolbar.svelte index cc259e0..2ba1746 100644 --- a/svelte/src/filesystem/Toolbar.svelte +++ b/svelte/src/filesystem/Toolbar.svelte @@ -56,7 +56,7 @@ const toggle_fullscreen = () => { } } -let expanded = false +let expanded = true let expand = e => { e.preventDefault() e.stopPropagation() @@ -188,14 +188,14 @@ let expand = e => { /* 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: 800px) { +@media (max-width: 1000px) { .toolbar { overflow-y: hidden; max-height: 2.1em; } .toolbar.expanded { overflow-y: scroll; - max-height: 30vh; + max-height: 25vh; } .stats_container { flex-direction: row; @@ -204,7 +204,6 @@ Toolbar.svelte and the .label max-width in FileStats.svelte */ margin: 2px 0; } - .hidden_vertical { display: block; } diff --git a/svelte/src/filesystem/edit_window/AccessControl.svelte b/svelte/src/filesystem/edit_window/AccessControl.svelte index dfe2efa..27eb427 100644 --- a/svelte/src/filesystem/edit_window/AccessControl.svelte +++ b/svelte/src/filesystem/edit_window/AccessControl.svelte @@ -44,77 +44,83 @@ const del_password = (pass: string) => { have delete permissions. You can see who the owner of a file is in the Details window.

-

Link permissions

-
-
- Anyone with the link can... -
-
- -
-
- -

User permissions

-

- Enter a username here to give them access to this directory. The user will - not receive an e-mail invite. Giving write access to a user without giving - read access as well does not actually allow them to write anything. -

-
- -