]>
Commit | Line | Data |
---|---|---|
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> | |
31 | <a href="/_admin"> | |
32 | <el-button type="primary" icon="el-icon-user" size="small">Login</el-button> | |
33 | </a> | |
34 | </div> | |
35 | </el-row> | |
36 | </el-header> | |
37 | <el-main> | |
38 | ||
39 | <div v-show="busy"> | |
40 | <center><h1><i class="el-icon-loading"></i></h1></center> | |
41 | </div> | |
42 | ||
43 | <div v-show="!busy && entries.length" v-cloak> | |
44 | <center> | |
45 | <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"> | |
46 | <el-table-column prop="previewUrl" label="Type" width="80px" sortable> | |
47 | <template slot-scope="scope"> | |
48 | <el-image v-bind:src="scope.row.previewUrl" class="list-icon" style="width: 32px; height: 32px" fit="cover"></el-image> | |
49 | </template> | |
50 | </el-table-column> | |
51 | <el-table-column prop="filePath" label="Name" sortable></el-table-column> | |
52 | <el-table-column prop="size" label="Size" width="150px" sortable :formatter="prettyFileSize"></el-table-column> | |
53 | <el-table-column prop="mtime" label="Modified" width="150px" sortable :formatter="prettyDate"></el-table-column> | |
54 | <el-table-column label="Actions" align="right" width="200px" class-name="list-actions"> | |
55 | <template slot-scope="scope"> | |
56 | <el-button size="small" icon="el-icon-download" type="text" plain circle v-show="scope.row.isFile" @click.stop="onDownload(scope.row)"></el-button> | |
57 | </template> | |
58 | </el-table-column> | |
59 | </el-table> | |
60 | </center> | |
61 | </div> | |
62 | ||
63 | <div v-show="!busy && !entries.length"> | |
64 | <center> | |
65 | Folder is empty | |
66 | </center> | |
67 | </div> | |
68 | ||
69 | <el-drawer :title="activeEntry.filePath":with-header="false" :visible.sync="previewDrawerVisible" direction="rtl" size="50%"> | |
70 | <div style="display: flex; flex-direction: column; height: 100%;"> | |
71 | <iframe :src="activeEntry.fullPath" style="width: 100%; height: 100%; border: none; margin: 10px;"></iframe> | |
72 | <center> | |
73 | <el-button size="small" icon="el-icon-download" style="margin: 10px;" @click.stop="onDownload(activeEntry)">Download</el-button> | |
74 | <a :href="activeEntry.fullPath" target="_blank"> | |
75 | <el-button size="small" icon="el-icon-link" style="margin: 10px;">Open</el-button> | |
76 | </a> | |
77 | </center> | |
78 | </div> | |
79 | </el-drawer> | |
80 | ||
81 | </el-main> | |
82 | </el-container> | |
83 | ||
84 | </div> | |
85 | ||
86 | <script src="/_admin/js/public.js"></script> | |
87 | ||
88 | </body> | |
89 | </html> |