]> git.immae.eu Git - perso/Immae/Projets/Nodejs/Surfer.git/commitdiff
Add button to real path
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Mon, 4 May 2020 23:17:59 +0000 (01:17 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Tue, 5 May 2020 00:17:43 +0000 (02:17 +0200)
frontend/index.html
frontend/js/app.js

index 20f2c8df4a64d67624b8d3dbe16a856754f73306..1d7a3c58463295000fb1fc085c5ded9125c17faf 100644 (file)
             <template slot-scope="scope">
               <el-button size="small" icon="el-icon-download" type="text" plain circle v-show="!scope.row.rename && scope.row.isFile" @click.stop="onDownload(scope.row)"></el-button>
               <el-button size="small" icon="el-icon-delete" type="text" plain circle v-show="!scope.row.rename" @click.stop="onDelete(scope.row)"></el-button>
+              <a :href="sanitize(path + '/' + scope.row.filePath)" target="_blank">
+                <el-button size="small" icon="el-icon-link" style="margin: 10px;">Link</el-button>
+              </a>
             </template>
           </el-table-column>
         </el-table>
index f532bc1e508515a9196329474af9e53450644ce9..61f1b46979221ea1bc77fad32444c71b042566bc 100644 (file)
@@ -500,7 +500,8 @@ var app = new Vue({
         },
         open: open,
         drop: drop,
-        dragOver: dragOver
+        dragOver: dragOver,
+        sanitize: sanitize
     }
 });