Fix operations styling
authorLanius Trolling <lanius@laniustrolling.dev>
Tue, 9 Apr 2024 18:37:19 +0000 (14:37 -0400)
committerLanius Trolling <lanius@laniustrolling.dev>
Tue, 9 Apr 2024 18:37:19 +0000 (14:37 -0400)
src/jvmMain/kotlin/info/mechyrdia/data/views_files.kt

index a8801cb7d1edef3cb5498b03cc0735a686738c77..f08579c7d810b1cc066573e4d9e4c31221a7b546 100644 (file)
@@ -53,37 +53,41 @@ private fun UL.render(path: StoragePath, childNodes: Map<String, TreeNode>) {
                render(path / name, child)
        
        li {
-               form(action = href(Root.Admin.Vfs.Upload(path.elements)), method = FormMethod.post, encType = FormEncType.multipartFormData) {
-                       installCsrfToken()
-                       label {
-                               fileInput(name = "uploaded")
-                               +"Upload File"
+               style = "list-style:none"
+               
+               p {
+                       form(action = href(Root.Admin.Vfs.Upload(path.elements)), method = FormMethod.post, encType = FormEncType.multipartFormData) {
+                               installCsrfToken()
+                               label {
+                                       fileInput(name = "uploaded")
+                                       +"Upload File"
+                               }
+                               submitInput()
                        }
-                       submitInput()
                }
-       }
-       
-       li {
-               form(action = href(Root.Admin.Vfs.MkDir(path.elements)), method = FormMethod.post) {
-                       installCsrfToken()
-                       textInput {
-                               placeholder = "new-dir"
-                       }
-                       +Entities.nbsp
-                       submitInput {
-                               value = "Make Directory"
+               
+               p {
+                       form(action = href(Root.Admin.Vfs.MkDir(path.elements)), method = FormMethod.post) {
+                               installCsrfToken()
+                               textInput {
+                                       placeholder = "new-dir"
+                               }
+                               +Entities.nbsp
+                               submitInput {
+                                       value = "Make Directory"
+                               }
                        }
                }
-       }
-       
-       if (!path.isRoot)
-               li {
-                       form(action = href(Root.Admin.Vfs.RmDirConfirmPage(path.elements)), method = FormMethod.get) {
-                               submitInput(classes = "evil") {
-                                       value = "Delete (Recursive)"
+               
+               if (!path.isRoot)
+                       p {
+                               form(action = href(Root.Admin.Vfs.RmDirConfirmPage(path.elements)), method = FormMethod.get) {
+                                       submitInput(classes = "evil") {
+                                               value = "Delete (Recursive)"
+                                       }
                                }
                        }
-               }
+       }
 }
 
 context(ApplicationCall)