]> git.immae.eu Git - perso/Immae/Projets/Nodejs/Surfer.git/commitdiff
Carry over public.html fixes to index.html
authorJohannes Zellner <johannes@cloudron.io>
Tue, 3 Mar 2020 16:59:17 +0000 (17:59 +0100)
committerJohannes Zellner <johannes@cloudron.io>
Tue, 3 Mar 2020 16:59:17 +0000 (17:59 +0100)
frontend/index.html
frontend/js/app.js

index 190589447c502cafb1786d52183e3ddb0a27388c..3a2f7f7fddb8b39654cf63a1e3fdc59cb9c3bfd6 100644 (file)
@@ -96,8 +96,8 @@
 
     <div v-show="!busy && session.valid" v-cloak>
       <center>
-        <el-table :data="entries" style="max-width: 1280px;width: 100%" height="100%" empty-text="Folder is emtpy" :default-sort="{ prop: 'filePath', order: 'descending' }" @row-click="open">
-          <el-table-column prop="previewUrl" label="Type" width="100px" sortable>
+        <el-table :data="entries" style="max-width: 1280px; width: 100%" height="100%" empty-text="Folder is emtpy" :default-sort="{ prop: 'filePath', order: 'descending' }" @row-click="open">
+          <el-table-column prop="previewUrl" label="Type" width="80px" sortable>
             <template slot-scope="scope">
               <el-image v-bind:src="scope.row.previewUrl" class="list-icon" style="width: 32px; height: 32px" fit="cover"></el-image>
             </template>
index 9ce073e39383afa76c0a2ad189bfeabdce131e33..f532bc1e508515a9196329474af9e53450644ce9 100644 (file)
@@ -150,7 +150,15 @@ function open(row, column, event) {
     app.activeEntry.fullPath = encode(sanitize(app.path + '/' + row.filePath));
     app.previewDrawerVisible = true
 
-    // window.open(encode(path));
+    // need to wait for DOM element to exist
+    setTimeout(function () {
+        $('iframe').on('load', function (e) {
+            if (!e.target.contentWindow.document.body) return;
+
+            e.target.contentWindow.document.body.style.display = 'flex'
+            e.target.contentWindow.document.body.style.justifyContent = 'center'
+        });
+    }, 0);
 }
 
 function uploadFiles(files) {