]> git.immae.eu Git - perso/Immae/Projets/Nodejs/Surfer.git/blobdiff - frontend/index.html
Show preview drawer instead of directly opening files in a new tab
[perso/Immae/Projets/Nodejs/Surfer.git] / frontend / index.html
index 95fe31b45fab43632db335d49f96c800568d7f9c..41b474957716cef80e1d03cc5dce2f04fbe85c3c 100644 (file)
       </center>
     </div>
 
+    <el-drawer :title="activeEntry.filePath":with-header="false" :visible.sync="previewDrawerVisible" direction="rtl" size="50%">
+      <div style="display: flex; flex-direction: column; height: 100%;">
+        <iframe :src="activeEntry.fullPath" style="width: 100%; height: 100%; border: none; margin: 10px;"></iframe>
+        <center>
+          <el-button size="small" icon="el-icon-download" style="margin: 10px;" @click.stop="onDownload(activeEntry)">Download</el-button>
+          <a :href="activeEntry.fullPath" target="_blank">
+            <el-button size="small" icon="el-icon-link" style="margin: 10px;">Open</el-button>
+          </a>
+        </center>
+      </div>
+    </el-drawer>
+
   </el-main>
   <el-footer v-show="uploadStatus.busy">
     <el-row v-if="uploadStatus.uploadListCount">