]> git.immae.eu Git - perso/Immae/Projets/Nodejs/Surfer.git/blobdiff - app/index.html
Make directory listing navigatable
[perso/Immae/Projets/Nodejs/Surfer.git] / app / index.html
index 5807724fe85b9f2a7f470e99268af07e11f65acf..773b5cf6c35e0c691fbd5067dd5390fac23fd251 100644 (file)
@@ -2,6 +2,7 @@
 <head>
     <title> Cloudron Surfer </title>
 
+    <link rel="stylesheet" href="/admin/css/font-awesome.min.css">
     <link rel="stylesheet" href="/admin/css/bootstrap.min.css">
     <link rel="stylesheet" href="/admin/css/style.css">
 
         <div class="row">
             <div class="col-lg-12">
                 <ol class="breadcrumb">
-                    <li><a href="#">Home</a></li>
-                    <li><a href="#">Library</a></li>
-                    <li class="active">Data</li>
+                    <li><i class="fa fa-home"></i>&nbsp;</li>
+                    <li v-for="part in pathParts">
+                        {{ part }}
+                    </li>
                 </ol>
             </div>
             <div class="col-lg-12">
-                <table class="table table-hover">
+                <table class="table table-hover table-condensed">
                     <thead>
                         <tr>
                             <th>Type</th>
                             <th>Name</th>
                             <th>Size</th>
                             <th>Modified</th>
+                            <th style="text-align: right;">Action</th>
                         </tr>
                     </thead>
                     <tbody>
-                        <tr>
-                            <th>Type</th>
-                            <th>Name</th>
-                            <th>Size</th>
-                            <th>Modified</th>
+                        <tr v-show="path !== '/'" v-on:click="up()" class="hand">
+                            <th><i class="fa fa-chevron-up"></i></th>
+                            <th>..</th>
+                            <th></th>
+                            <th></th>
+                        </tr>
+                        <tr v-for="entry in entries" v-on:click="open(entry)" class="hand">
+                            <th>
+                                <i class="fa fa-folder-o" v-show="entry.isDirectory"></i>
+                                <i class="fa fa-file-o" v-show="entry.isFile"></i>
+                            </th>
+                            <th>{{ entry.filePath }}</th>
+                            <th>{{ entry.size }}</th>
+                            <th>{{ entry.mtime }}</th>
+                            <th style="text-align: right;"><button class="btn btn-sm btn-danger"><i class="fa fa-trash"></i></button></th>
                         </tr>
                     </tbody>
                 </table>