From f97b51a9151d0d886e2a4703c91494de55e6d5ef Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Sun, 5 Jan 2020 19:27:30 +0100 Subject: Show preview drawer instead of directly opening files in a new tab --- frontend/css/style.css | 4 ++++ frontend/index.html | 12 ++++++++++++ frontend/js/app.js | 8 +++++++- 3 files changed, 23 insertions(+), 1 deletion(-) (limited to 'frontend') diff --git a/frontend/css/style.css b/frontend/css/style.css index 7be973a..1046e50 100644 --- a/frontend/css/style.css +++ b/frontend/css/style.css @@ -89,6 +89,10 @@ a:hover, a:focus { transition: background-color .1s ease; } +.el-drawer__header { + margin-bottom: 10px; +} + /* welcome and 404 page */ .container-center { display: flex; diff --git a/frontend/index.html b/frontend/index.html index 95fe31b..41b4749 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -121,6 +121,18 @@ + +
+ +
+ Download + + Open + +
+
+
+ diff --git a/frontend/js/app.js b/frontend/js/app.js index d99a91e..9ce073e 100644 --- a/frontend/js/app.js +++ b/frontend/js/app.js @@ -146,7 +146,11 @@ function open(row, column, event) { return; } - window.open(encode(path)); + app.activeEntry = row; + app.activeEntry.fullPath = encode(sanitize(app.path + '/' + row.filePath)); + app.previewDrawerVisible = true + + // window.open(encode(path)); } function uploadFiles(files) { @@ -280,6 +284,8 @@ var app = new Vue({ password: '', busy: false }, + previewDrawerVisible: false, + activeEntry: {}, entries: [], accessTokens: [], accessTokensDialogVisible: false -- cgit v1.2.3