]> git.immae.eu Git - perso/Immae/Projets/Nodejs/Surfer.git/blobdiff - frontend/js/app.js
Show preview drawer instead of directly opening files in a new tab
[perso/Immae/Projets/Nodejs/Surfer.git] / frontend / js / app.js
index d99a91e05f0b20bcb73ca1db072dc09f74614a93..9ce073e39383afa76c0a2ad189bfeabdce131e33 100644 (file)
@@ -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