diff options
author | Marvin Borner | 2019-04-14 01:02:09 +0200 |
---|---|---|
committer | Marvin Borner | 2019-04-14 01:02:09 +0200 |
commit | c6e874ed068a640ad5ca2406b9abf93123bfb92e (patch) | |
tree | dad74a5ad09de113b26e85a39445ab7baf080b57 /src/main/resources/views | |
parent | 7117f01a3e64726f4e069df21634647613325d4a (diff) |
Added multi user directory support
Diffstat (limited to 'src/main/resources/views')
-rw-r--r-- | src/main/resources/views/index.rocker.html | 12 | ||||
-rw-r--r-- | src/main/resources/views/login.rocker.html | 2 | ||||
-rw-r--r-- | src/main/resources/views/upload.rocker.html | 8 |
3 files changed, 12 insertions, 10 deletions
diff --git a/src/main/resources/views/index.rocker.html b/src/main/resources/views/index.rocker.html index 3389ba9..4f5d32b 100644 --- a/src/main/resources/views/index.rocker.html +++ b/src/main/resources/views/index.rocker.html @@ -1,3 +1,13 @@ +@args (String username) + @layout.template("Index", RockerContent.NONE, RockerContent.NONE) -> { -<h1>Welcome to Kloud!</h1> +<h1>Welcome to Kloud <i>@username</i>!</h1> + +@if(username.length() > 0) { +<button><a href="/logout/">Logout</a></button> +} else { +<button><a href="/login/">Login</a></button> +} + +<button><a href="/files/">Files</a></button> } diff --git a/src/main/resources/views/login.rocker.html b/src/main/resources/views/login.rocker.html index bcee9df..6cd28f2 100644 --- a/src/main/resources/views/login.rocker.html +++ b/src/main/resources/views/login.rocker.html @@ -6,7 +6,7 @@ } @layout.template("Login", RockerContent.NONE, js) -> { -<form action="login" id="login-form" method="post"> +<form action="/login" id="login-form" method="post"> <div> <label for="username">Username:</label> <input id="username" name="username" type="text"/> diff --git a/src/main/resources/views/upload.rocker.html b/src/main/resources/views/upload.rocker.html deleted file mode 100644 index ec5daa2..0000000 --- a/src/main/resources/views/upload.rocker.html +++ /dev/null @@ -1,8 +0,0 @@ -@args (String content) - -@layout.template("Upload", RockerContent.NONE, RockerContent.NONE) -> { -<form action="/upload/test" enctype="multipart/form-data" method="post"> - <input multiple name="file" type="file"> - <button>Submit</button> -</form> -} |