]> git.immae.eu Git - perso/Immae/Projets/Nodejs/Surfer.git/blame - frontend/public.html
Add raw/tar/zip endpoints
[perso/Immae/Projets/Nodejs/Surfer.git] / frontend / public.html
CommitLineData
313dfe99
JZ
1<html>
2<head>
3 <title> Surfer </title>
4
5 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
6
7 <link rel="icon" type="image/png" href="/_admin/img/logo.png">
8
9 <link rel="stylesheet" href="/_admin/css/theme-chalk_2.11.1.css">
10 <link rel="stylesheet" href="/_admin/css/style.css">
11
12 <script src="/_admin/js/jquery-1.12.1.min.js"></script>
13 <script src="/_admin/js/vue.min.js"></script>
14 <script src="/_admin/js/element-ui_2.11.1.min.js"></script>
15 <script src="/_admin/js/element-ui_en_2.11.1.min.js"></script>
16 <script src="/_admin/js/filesize.min.js"></script>
17 <script src="/_admin/js/superagent.js"></script>
18
19</head>
20<body>
21
22<div id="app">
23
24<el-container>
25 <el-header>
26 <el-row type="flex" justify="space-between">
27 <div style="flex-grow: 2; padding: 0 7px;">
28 <p style="font-size: 24px; margin: 4px 0;">{{ path }}</p>
29 </div>
30 <div>
d34561d1
IB
31 <a v-bind:href="'/raw' + path">
32 <el-button type="primary" icon="el-icon-download" size="small">Raw (curl/wget friendly)</el-button>
33 </a>
34 <a v-bind:href="'/tar' + path">
35 <el-button type="primary" icon="el-icon-download" size="small">Download Tar.gz</el-button>
36 </a>
37 <a v-bind:href="'/zip' + path">
38 <el-button type="primary" icon="el-icon-download" size="small">Download Zip</el-button>
39 </a>
313dfe99
JZ
40 <a href="/_admin">
41 <el-button type="primary" icon="el-icon-user" size="small">Login</el-button>
42 </a>
43 </div>
44 </el-row>
45 </el-header>
46 <el-main>
47
48 <div v-show="busy">
49 <center><h1><i class="el-icon-loading"></i></h1></center>
50 </div>
51
52 <div v-show="!busy && entries.length" v-cloak>
53 <center>
54 <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">
55 <el-table-column prop="previewUrl" label="Type" width="80px" sortable>
56 <template slot-scope="scope">
57 <el-image v-bind:src="scope.row.previewUrl" class="list-icon" style="width: 32px; height: 32px" fit="cover"></el-image>
58 </template>
59 </el-table-column>
60 <el-table-column prop="filePath" label="Name" sortable></el-table-column>
61 <el-table-column prop="size" label="Size" width="150px" sortable :formatter="prettyFileSize"></el-table-column>
62 <el-table-column prop="mtime" label="Modified" width="150px" sortable :formatter="prettyDate"></el-table-column>
63 <el-table-column label="Actions" align="right" width="200px" class-name="list-actions">
64 <template slot-scope="scope">
65 <el-button size="small" icon="el-icon-download" type="text" plain circle v-show="scope.row.isFile" @click.stop="onDownload(scope.row)"></el-button>
66 </template>
67 </el-table-column>
68 </el-table>
69 </center>
70 </div>
71
72 <div v-show="!busy && !entries.length">
73 <center>
74 Folder is empty
75 </center>
76 </div>
77
78 <el-drawer :title="activeEntry.filePath":with-header="false" :visible.sync="previewDrawerVisible" direction="rtl" size="50%">
79 <div style="display: flex; flex-direction: column; height: 100%;">
80 <iframe :src="activeEntry.fullPath" style="width: 100%; height: 100%; border: none; margin: 10px;"></iframe>
81 <center>
82 <el-button size="small" icon="el-icon-download" style="margin: 10px;" @click.stop="onDownload(activeEntry)">Download</el-button>
83 <a :href="activeEntry.fullPath" target="_blank">
84 <el-button size="small" icon="el-icon-link" style="margin: 10px;">Open</el-button>
85 </a>
86 </center>
87 </div>
88 </el-drawer>
89
90 </el-main>
91</el-container>
92
93</div>
94
95<script src="/_admin/js/public.js"></script>
96
97</body>
98</html>