aboutsummaryrefslogtreecommitdiff
path: root/src/main/resources/views
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/resources/views')
-rw-r--r--src/main/resources/views/files.rocker.html19
-rw-r--r--src/main/resources/views/upload.rocker.html4
2 files changed, 16 insertions, 7 deletions
diff --git a/src/main/resources/views/files.rocker.html b/src/main/resources/views/files.rocker.html
index 7a2d432..1373eca 100644
--- a/src/main/resources/views/files.rocker.html
+++ b/src/main/resources/views/files.rocker.html
@@ -1,13 +1,22 @@
@import java.util.ArrayList
-@args (ArrayList files)
+@args (ArrayList files, String path)
@css => {
<link href="/css/files.css" rel="stylesheet">
}
-@layout.template(files.size() + " Files", css, RockerContent.NONE) -> {
-@for (String file : files) {
-<a class="filename" href="@file">@file</a><br>
-<hr>
+@js => {
+<script>const path = "@path";</script>
+<script src="/js/files.js"></script>
}
+
+@layout.template(files.size() + " Files", css, js) -> {
+<div class="drop" id="drop">
+ <a class="filename" href="../">../</a><br>
+ <hr>
+ @for (String file : files) {
+ <a class="filename" href="@file">@file</a><br>
+ <hr>
+ }
+</div>
}
diff --git a/src/main/resources/views/upload.rocker.html b/src/main/resources/views/upload.rocker.html
index b36abdc..ec5daa2 100644
--- a/src/main/resources/views/upload.rocker.html
+++ b/src/main/resources/views/upload.rocker.html
@@ -1,8 +1,8 @@
@args (String content)
@layout.template("Upload", RockerContent.NONE, RockerContent.NONE) -> {
-<form action="/api/upload?dir=test" enctype="multipart/form-data" method="post">
- <input multiple name="files" type="file">
+<form action="/upload/test" enctype="multipart/form-data" method="post">
+ <input multiple name="file" type="file">
<button>Submit</button>
</form>
}