diff options
author | Marvin Borner | 2020-07-09 22:33:43 +0200 |
---|---|---|
committer | Marvin Borner | 2020-07-09 22:33:43 +0200 |
commit | 1edfdf5f3a316a36108a0a853b0a2553d116d6fc (patch) | |
tree | 4b825dc642cb6eb9a060e54bf8d69288fbee4904 /src/main/resources/views/files.rocker.html | |
parent | 18edde9bd3603f3f867cebce100e7b22be9012cd (diff) |
Rewriiiiiiiiiite!
Okay, okay. I know, rewriting projects all the time is dumb.
Buuut, we really don't want to work with our old and ugly code anymore.
Furthermore we'll be using Deno now!
Diffstat (limited to 'src/main/resources/views/files.rocker.html')
-rw-r--r-- | src/main/resources/views/files.rocker.html | 147 |
1 files changed, 0 insertions, 147 deletions
diff --git a/src/main/resources/views/files.rocker.html b/src/main/resources/views/files.rocker.html deleted file mode 100644 index 7e074c4..0000000 --- a/src/main/resources/views/files.rocker.html +++ /dev/null @@ -1,147 +0,0 @@ -@import java.util.ArrayList -@import io.javalin.* -@args (ArrayList files, String path, Boolean isShared, Context ctx) - -@css => { -<link href="/css/files.css" rel="stylesheet"> -} - -@js => { -<script> - const path = "@path"; - const isShared = "@isShared"; -</script> -<script src="/js/imagePreview.js"></script> -<script src="/js/files.js"></script> -} - -@layout.template(files.size() + " Files", ctx, css, js) -> { -<div class="drop" id="drop"> - <h3 class="navigation"> - @if (!isShared) { - <a href="/"><i class="icon ion-md-home"></i></a> - <a href="/files/">Files</a> - - @if (!path.isEmpty()) { - <i class="icon ion-ios-arrow-forward"></i> - } - @for (int i = 0; i < path.split("/").length - 1; i++) { - <a href='@(new String(new char[path.split("/").length - i - 1]).replace("\0", "../"))'>@path.split("/")[i]</a> - <i class="icon ion-ios-arrow-forward"></i> - } - @if (path.split("/").length > 0) { - <a href="">@(path.split("/")[path.split("/").length - 1])</a> - } - } else { <!-- is shared --> - <a href="/"><i class="icon ion-md-home"></i></a> - <a href="">Shared</a> - <i class="icon ion-ios-arrow-forward"></i> - <a href="">@(path.split("/")[path.split("/").length - 1])</a> - } - <span class="progress" id="progress"></span> - </h3> - - <label class="upload" for="directory"><i class="icon ion-md-cloud-upload"></i></label> - <input directory id="directory" multiple type="file" webkitdirectory/> - - <label class="upload" for="file"><i class="icon ion-md-add"></i></label> - <input id="file" multiple type="file"/> - - <table id="table"> - <colgroup> - <col/> - <col/> - <col/> - <col/> - <col/> - <col/> - </colgroup> - - <thead> - <tr> - <th data-asc="true"></th> - <th data-asc="true">Name</th> - <th data-asc="true">Size</th> - <th data-asc="true">Last modified</th> - @if (!isShared) { - <th data-asc="true">Share</th> - <th data-asc="true">Download</th> - <th data-asc="true">Delete</th> - } else { - <th></th> - <th></th> - <th></th> - } - </tr> - <tr data-href="/../"> - <td></td> - <td>../</td> - <td></td> - <td></td> - <td></td> - <td></td> - <td></td> - </tr> - </thead> - - <tbody> - @for (String[] fileArray : files) { - @if (fileArray[3] == "true") { - <tr data-href="@fileArray[0]"> - } else { - <tr data-path="@fileArray[0]"> - } - - <!-- TODO: Add more icons (more specific file types) --> - @if (fileArray[4] == "true") { - <td> - <i class="icon ion-md-folder"></i> - </td> - } else if (fileArray[3] == "false") { - <td> - <i class="icon ion-md-code"></i> - </td> - } else { - <td> - <i class="icon ion-md-document"></i> - </td> - } - - <td> - @fileArray[0] - </td> - - <td data-size="@fileArray[5]"> - @fileArray[1] - </td> - - <td data-date="@fileArray[6]"> - @fileArray[2] - </td> - - @if (!isShared) { - <td> - <button class="share"><i class="icon ion-md-share"></i></button> - </td> - - <!-- TODO: Fix download of shared files --> - <td> - <button class="downloadButton"> - <a class="download" download="@fileArray[0]" href="@fileArray[0]?raw"><i class="icon ion-md-download"></i></a> - </button> - </td> - - <td> - <button class="delete"><i class="icon ion-md-trash"></i></button> - </td> - } else { - <td></td> - <td></td> - <td></td> - } - </tr> - } - </tbody> - </table> -</div> -} |