From 82afdcd8609342bd7080460e152b6a0e3db5aaff Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 1 May 2019 20:42:16 +0200 Subject: Cleaned up code Co-authored-by: LarsVomMars --- src/main/resources/js/files.js | 2 +- src/main/resources/views/files.rocker.html | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'src/main/resources') diff --git a/src/main/resources/js/files.js b/src/main/resources/js/files.js index de52635..35a25b4 100644 --- a/src/main/resources/js/files.js +++ b/src/main/resources/js/files.js @@ -116,7 +116,7 @@ function setListeners() { request.onload = () => { if (request.status === 200 && request.readyState === 4) { if (request.responseText) - window.location = `/share?id=${request.responseText}`; + window.location = `/shared?id=${request.responseText}`; else alert('File not found!'); } }; diff --git a/src/main/resources/views/files.rocker.html b/src/main/resources/views/files.rocker.html index eef3bb4..3fa4a3e 100644 --- a/src/main/resources/views/files.rocker.html +++ b/src/main/resources/views/files.rocker.html @@ -43,9 +43,15 @@ Name Size Last modified + @if (!isShared) { Share Download Delete + } else { + + + + } @@ -93,10 +99,12 @@ @fileArray[2] + @if (!isShared) { + + } else { + + + + } } -- cgit v1.2.3