From 1edfdf5f3a316a36108a0a853b0a2553d116d6fc Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Thu, 9 Jul 2020 22:33:43 +0200 Subject: 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! --- src/main/resources/views/admin.rocker.html | 26 ----- src/main/resources/views/files.rocker.html | 147 -------------------------- src/main/resources/views/fileview.rocker.html | 40 ------- src/main/resources/views/index.rocker.html | 48 --------- src/main/resources/views/layout.rocker.html | 30 ------ src/main/resources/views/login.rocker.html | 44 -------- src/main/resources/views/register.rocker.html | 40 ------- src/main/resources/views/setup.rocker.html | 39 ------- 8 files changed, 414 deletions(-) delete mode 100644 src/main/resources/views/admin.rocker.html delete mode 100644 src/main/resources/views/files.rocker.html delete mode 100644 src/main/resources/views/fileview.rocker.html delete mode 100644 src/main/resources/views/index.rocker.html delete mode 100644 src/main/resources/views/layout.rocker.html delete mode 100644 src/main/resources/views/login.rocker.html delete mode 100644 src/main/resources/views/register.rocker.html delete mode 100644 src/main/resources/views/setup.rocker.html (limited to 'src/main/resources/views') diff --git a/src/main/resources/views/admin.rocker.html b/src/main/resources/views/admin.rocker.html deleted file mode 100644 index aa4fff6..0000000 --- a/src/main/resources/views/admin.rocker.html +++ /dev/null @@ -1,26 +0,0 @@ -@import io.javalin.* -@args (String message, Context ctx) - -@layout.template("Index", ctx, RockerContent.NONE, RockerContent.NONE) -> { - -
-
-

Add new user

-
- - - -
-
-
- @if (message.length() > 0) { - @message - } -
-
-} 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 => { - -} - -@js => { - - - -} - -@layout.template(files.size() + " Files", ctx, css, js) -> { -
- - - - - - - - - - - - - - - - - - - - - - - - - @if (!isShared) { - - - - } else { - - - - } - - - - - - - - - - - - - - @for (String[] fileArray : files) { - @if (fileArray[3] == "true") { - - } else { - - } - - - @if (fileArray[4] == "true") { - - } else if (fileArray[3] == "false") { - - } else { - - } - - - - - - - - @if (!isShared) { - - - - - - - } else { - - - - } - - } - -
NameSizeLast modifiedShareDownloadDelete
../
- - - - - - - @fileArray[0] - - @fileArray[1] - - @fileArray[2] - - - - - - -
-
-} diff --git a/src/main/resources/views/fileview.rocker.html b/src/main/resources/views/fileview.rocker.html deleted file mode 100644 index 6be08fd..0000000 --- a/src/main/resources/views/fileview.rocker.html +++ /dev/null @@ -1,40 +0,0 @@ -@import space.anity.DatabaseController -@import space.anity.UserHandler -@import io.javalin.* -@args (String content, String filename, String extension, Context ctx) - -@css => { - - - -@if((new DatabaseController()).isDarkTheme((new UserHandler()).getVerifiedUserId(ctx))) { - -} else { - -} -} - -@js => { - - - - -} - -@layout.template("File " + filename, ctx, css, js) -> { - - - - - -
@content
- - -} diff --git a/src/main/resources/views/index.rocker.html b/src/main/resources/views/index.rocker.html deleted file mode 100644 index 7c9f46c..0000000 --- a/src/main/resources/views/index.rocker.html +++ /dev/null @@ -1,48 +0,0 @@ -@import space.anity.DatabaseController -@import space.anity.UserHandler -@import io.javalin.* -@args (String username, Context ctx) - -@css => { - -} - -@js => { - -} - -@layout.template("Index", ctx, css, js) -> { - -
- @if (username.length() > 0) { - - } - -

Welcome to Kloud@(username == "" ? "" : ", " + username)!

- -
- @if(username.length() > 0) { - Logout - @if((new UserHandler()).isAdmin(username)) { - Admin - } - } else if (!(new DatabaseController()).isSetup()) { - Setup - } else { - Login - } - - Files -
-
-} diff --git a/src/main/resources/views/layout.rocker.html b/src/main/resources/views/layout.rocker.html deleted file mode 100644 index 9963aad..0000000 --- a/src/main/resources/views/layout.rocker.html +++ /dev/null @@ -1,30 +0,0 @@ -@import space.anity.DatabaseController -@import space.anity.UserHandler -@import io.javalin.* -@args (String title, Context ctx, RockerContent css, RockerContent js, RockerBody content) - - - - - - - - - - @css - - @if((new DatabaseController()).isDarkTheme((new UserHandler()).getVerifiedUserId(ctx))) { - - } - - @title - - -
- @content -
- -@js - - diff --git a/src/main/resources/views/login.rocker.html b/src/main/resources/views/login.rocker.html deleted file mode 100644 index b811025..0000000 --- a/src/main/resources/views/login.rocker.html +++ /dev/null @@ -1,44 +0,0 @@ -@import io.javalin.* -@args (String message, Integer counter, Context ctx) - -@js => { - - -} - -@layout.template("Login", ctx, RockerContent.NONE, js) -> { - -
-

Login

- -
-
- - -
-
- - -
- -
- @if(message.length() > 0) { - @message - } - - @if(counter > 0) { - Please try again in @counter seconds. - } -
- -
- -
-
-
-} diff --git a/src/main/resources/views/register.rocker.html b/src/main/resources/views/register.rocker.html deleted file mode 100644 index c89eef3..0000000 --- a/src/main/resources/views/register.rocker.html +++ /dev/null @@ -1,40 +0,0 @@ -@import io.javalin.* -@args (String username, String token, String message, Context ctx) - -@layout.template("Register", ctx, RockerContent.NONE, RockerContent.NONE) -> { - -
-

Register

- -
-

Please set a password for user "@username"

-
- - -
-
- - -
-
- - -
- -
- @if (message.length() > 0) { - @message - } -
- -
- -
-
-
-} diff --git a/src/main/resources/views/setup.rocker.html b/src/main/resources/views/setup.rocker.html deleted file mode 100644 index 7fa312c..0000000 --- a/src/main/resources/views/setup.rocker.html +++ /dev/null @@ -1,39 +0,0 @@ -@import io.javalin.* -@args (String message, Context ctx) - -@layout.template("Setup", ctx, RockerContent.NONE, RockerContent.NONE) -> { - -
-

Setup

- -
-
- - -
-
- - -
-
- - -
- -
- @if (message.length() > 0) { - @message - } -
- -
- -
-
-
-} -- cgit v1.2.3