From: Johannes Zellner Date: Sun, 5 Jan 2020 18:27:30 +0000 (+0100) Subject: Show preview drawer instead of directly opening files in a new tab X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;ds=sidebyside;h=f97b51a9151d0d886e2a4703c91494de55e6d5ef;p=perso%2FImmae%2FProjets%2FNodejs%2FSurfer.git Show preview drawer instead of directly opening files in a new tab --- 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