]>
Commit | Line | Data |
---|---|---|
0fd8904c JZ |
1 | <html> |
2 | <head> | |
6ee80c94 | 3 | <title> Surfer </title> |
0fd8904c | 4 | |
13df9f95 JZ |
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.css"> | |
61e0b8e4 | 10 | <link rel="stylesheet" href="/_admin/css/style.css"> |
0fd8904c | 11 | |
13df9f95 JZ |
12 | <script src="/_admin/js/jquery-1.12.1.min.js"></script> |
13 | <script src="/_admin/js/vue.js"></script> | |
14 | <script src="/_admin/js/element-ui.js"></script> | |
15 | <script src="/_admin/js/filesize.min.js"></script> | |
16 | <script src="/_admin/js/superagent.js"></script> | |
17 | <script src="/_admin/js/sorttable.js"></script> | |
a58f99ad | 18 | |
0fd8904c | 19 | </head> |
13df9f95 | 20 | <body> |
6eb72d64 | 21 | |
c2483736 JZ |
22 | <div id="app" @drop="drop" @dragover="dragOver"> |
23 | ||
24 | <el-container> | |
13df9f95 | 25 | <input type="file" ref="upload" style="display: none" id="uploadInput" multiple/> |
6eb72d64 | 26 | |
13df9f95 JZ |
27 | <el-dialog title="Login" :visible.sync="ready && !session.valid" width="30%" :close-on-press-escape="false" :show-close="false"> |
28 | <el-form :model="loginData" label-position="top" @submit.native.prevent> | |
29 | <el-form-item label="Username"><el-input v-model="loginData.username" required autofocus></el-input></el-form-item> | |
30 | <el-form-item label="Password"><el-input v-model="loginData.password" type="password" required></el-input></el-form-item> | |
31 | <input type="submit" @click="onLogin" v-show="false"/> | |
32 | </el-form> | |
33 | <span slot="footer" class="dialog-footer"> | |
34 | <el-button type="primary" @click="onLogin"><i class="el-icon-loading" v-show="busy"></i><span v-show="!busy">Login</span></el-button> | |
35 | </span> | |
36 | </el-dialog> | |
6eb72d64 | 37 | |
13df9f95 JZ |
38 | <el-header> |
39 | <el-row type="flex" justify="space-between"> | |
40 | <div style="padding: 7px;"> | |
41 | <span>Surfer</span> | |
42 | </div> | |
f8693af1 | 43 | <div> |
4f9464eb | 44 | <el-button type="primary" size="small" icon="el-icon-arrow-left" :disabled="!pathParts.slice(-1).length" @click="onUp"></el-button> |
f8693af1 | 45 | </div> |
13df9f95 JZ |
46 | <div style="flex-grow: 2; padding: 0 7px;" v-show="session.valid"> |
47 | <el-breadcrumb separator-class="el-icon-arrow-right"> | |
48 | <el-breadcrumb-item><a href="#/">Path /</a></el-breadcrumb-item> | |
49 | <el-breadcrumb-item v-for="part in pathParts.slice(0, -1)"><a :href="part.link">{{ part.name }}</a></el-breadcrumb-item> | |
50 | <el-breadcrumb-item v-show="pathParts.slice(-1).length">{{ pathParts.slice(-1).length ? pathParts.slice(-1)[0].name : '' }}</el-breadcrumb-item> | |
51 | </el-breadcrumb> | |
52 | </div> | |
53 | <div align="right" v-show="session.valid"> | |
54 | <el-button-group> | |
55 | <el-button type="primary" icon="el-icon-upload" size="small" @click="onUpload">Upload</el-button> | |
56 | <el-button type="primary" icon="el-icon-plus" size="small" @click="onNewFolder">New Folder</el-button> | |
e628921a | 57 | |
13df9f95 JZ |
58 | </el-button-group> |
59 | <el-dropdown @command="onOptionsMenu"> | |
60 | <el-button size="small" icon="el-icon-more"></el-button> | |
61 | <el-dropdown-menu slot="dropdown"> | |
62 | <el-dropdown-item disabled>Public Folder Listing</el-dropdown-item> | |
63 | <el-dropdown-item command="folderListing"> | |
64 | <el-switch v-model="folderListingEnabled" active-text="Enabled" inactive-text="Disabled"> | |
65 | </el-switch> | |
66 | </el-dropdown-item> | |
67 | <el-dropdown-item command="about" divided><i class="el-icon-info"></i> About</el-dropdown-item> | |
68 | <el-dropdown-item command="logout"><i class="el-icon-circle-close"></i> Logout</el-dropdown-item> | |
69 | </el-dropdown-menu> | |
70 | </el-dropdown> | |
71 | </div> | |
72 | </el-row> | |
73 | </el-header> | |
74 | <el-main> | |
403359cf | 75 | |
13df9f95 JZ |
76 | <div v-show="busy"> |
77 | <center><h1><i class="el-icon-loading"></i></h1></center> | |
6eb72d64 JZ |
78 | </div> |
79 | ||
13df9f95 | 80 | <div v-show="!busy && session.valid" v-cloak> |
d0803a04 JZ |
81 | <center> |
82 | <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"> | |
83 | <el-table-column prop="previewUrl" label="Type" width="100px" sortable> | |
84 | <template slot-scope="scope"> | |
85 | <img v-bind:src="scope.row.previewUrl" height="48px" width="48px"/> | |
86 | </template> | |
87 | </el-table-column> | |
88 | <el-table-column prop="filePath" label="Name" sortable></el-table-column> | |
89 | <el-table-column prop="size" label="Size" width="150px" sortable :formatter="prettyFileSize"></el-table-column> | |
90 | <el-table-column prop="mtime" label="Modified" width="150px" sortable :formatter="prettyDate"></el-table-column> | |
91 | <el-table-column label="Actions" align="right" width="200px" class-name="list-actions"> | |
92 | <template slot-scope="scope"> | |
93 | <el-button size="small" icon="el-icon-download" circle v-show="scope.row.isFile" @click.stop="onDownload(scope.row)"></el-button> | |
94 | <el-button size="small" icon="el-icon-edit" circle @click.stop="onRename(scope.row)"></el-button> | |
95 | <el-button size="small" icon="el-icon-delete" circle @click.stop="onDelete(scope.row)"></el-button> | |
96 | </template> | |
97 | </el-table-column> | |
98 | </el-table> | |
99 | </center> | |
6eb72d64 JZ |
100 | </div> |
101 | ||
13df9f95 | 102 | </el-main> |
d0803a04 JZ |
103 | <el-footer v-show="uploadStatus.busy"> |
104 | <el-row> | |
105 | <el-col :span="4"> | |
106 | Uploading files ({{ uploadStatus.done }} / {{ uploadStatus.count }}) | |
107 | </el-col> | |
108 | <el-col :span="20"> | |
109 | <el-progress :text-inside="true" :stroke-width="18" :percentage="uploadStatus.percentDone"></el-progress> | |
110 | </el-col> | |
111 | </el-row> | |
112 | </el-footer> | |
13df9f95 | 113 | </el-container> |
e807872b | 114 | |
c2483736 JZ |
115 | </div> |
116 | ||
13df9f95 | 117 | <script src="/_admin/js/app.js"></script> |
0fd8904c JZ |
118 | |
119 | </body> | |
120 | </html> |