aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/index.html')
-rw-r--r--frontend/index.html175
1 files changed, 175 insertions, 0 deletions
diff --git a/frontend/index.html b/frontend/index.html
new file mode 100644
index 0000000..80f9bdd
--- /dev/null
+++ b/frontend/index.html
@@ -0,0 +1,175 @@
1<html>
2<head>
3 <title> Cloudron Surfer </title>
4
5 <link rel="stylesheet" href="/_admin/css/font-awesome.min.css">
6 <link rel="stylesheet" href="/_admin/css/bootstrap.min.css">
7 <link rel="stylesheet" href="/_admin/css/style.css">
8
9 <link href="/_admin/img/logo.png" rel="icon" type="image/png">
10
11</head>
12<body id="app">
13
14 <nav class="navbar navbar-default" v-cloak>
15 <div class="container-fluid">
16 <!-- Brand and toggle get grouped for better mobile display -->
17 <div class="navbar-header">
18 <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
19 <span class="sr-only">Toggle navigation</span>
20 <span class="icon-bar"></span>
21 <span class="icon-bar"></span>
22 <span class="icon-bar"></span>
23 </button>
24 <a class="navbar-brand" href="#">Surfer</a>
25 </div>
26
27 <!-- Collect the nav links, forms, and other content for toggling -->
28 <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
29 <ul class="nav navbar-nav navbar-right">
30 <li v-show="session.valid"><a href="#" v-on:click="logout()" id="logoutButton">Logout</a></li>
31 </ul>
32 </div>
33 </div>
34 </nav>
35
36 <div class="modal fade" tabindex="-1" role="dialog" id="modalDelete">
37 <div class="modal-dialog">
38 <div class="modal-content">
39 <div class="modal-header">
40 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
41 </div>
42 <div class="modal-body">
43 <h5 v-show="deleteData.isFile">Really delete <span style="font-weight: bold;">{{ deleteData.filePath }}</span>?</h5>
44 <h5 v-show="deleteData.isDirectory">Really delete directory <span style="font-weight: bold;">{{ deleteData.filePath }}</span> and all its content?</h5>
45 </div>
46 <div class="modal-footer">
47 <button type="button" class="btn btn-default" data-dismiss="modal">No</button>
48 <button type="button" class="btn btn-danger" v-on:click="del(deleteData)">Yes</button>
49 </div>
50 </div>
51 </div>
52 </div>
53
54 <div class="modal fade" tabindex="-1" role="dialog" id="modalcreateDirectory">
55 <div class="modal-dialog">
56 <div class="modal-content">
57 <div class="modal-header">
58 <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
59 <h4 class="modal-title">New Directory Name</h4>
60 </div>
61 <div class="modal-body">
62 <form v-on:submit.prevent="createDirectory(createDirectoryData)">
63 <div class="form-group" v-bind:class="{ 'has-error': createDirectoryError }">
64 <input type="text" class="form-control" v-model="createDirectoryData" id="inputDirectoryName" placeholder="Name" autofocus="true">
65 <label class="control-label" for="inputDirectoryName">{{ createDirectoryError }}</label>
66 </div>
67 <button type="submit" style="display: none;"></button>
68 </form>
69 </div>
70 <div class="modal-footer">
71 <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
72 <button type="button" class="btn btn-primary" v-on:click="createDirectory(createDirectoryData)">Create</button>
73 </div>
74 </div>
75 </div>
76 </div>
77
78 <div class="container" v-show="busy" v-cloak>
79 <div class="row">
80 <div class="col-lg-12">
81 <center>
82 <i class="fa fa-refresh fa-4x fa-spin"></i>
83 </center>
84 </div>
85 </div>
86 </div>
87
88 <div class="container" v-show="!session.valid && !busy" v-cloak>
89 <div class="row">
90 <div class="col-lg-6 col-lg-offset-3">
91 <form id="loginForm" v-on:submit.prevent="login()">
92 <div class="form-group">
93 <label for="inputUsername">Username</label>
94 <input type="text" class="form-control" id="inputUsername" v-model="loginData.username" placeholder="Username">
95 </div>
96 <div class="form-group">
97 <label for="inputPassword">Password</label>
98 <input type="password" class="form-control" id="inputPassword" v-model="loginData.password" placeholder="Password">
99 </div>
100 <button type="submit" class="btn btn-default">Submit</button>
101 </form>
102 </div>
103 </div>
104 </div>
105
106 <div class="container main" v-show="session.valid && !busy" v-cloak>
107 <div class="row">
108 <div class="col-lg-12">
109 <center>
110 <form id="fileUploadForm">
111 <input type="file" v-el:upload style="display: none" id="uploadInput" multiple/>
112 <button class="btn btn-primary" v-on:click.stop.prevent="upload()" id="uploadButton">Upload</button>
113 </form>
114 </center>
115 <br/>
116 </div>
117 <div class="col-lg-12">
118 <ol class="breadcrumb">
119 <li><a href="#/"><i class="fa fa-home"></i></a></li>
120 <li v-for="part in pathParts">
121 <a href="{{ part.link }}">{{ part.name }}</a>
122 </li>
123 </ol>
124 </div>
125 <div class="col-lg-12" style="text-align: right;">
126 <button class="btn btn-default btn-sm" v-on:click="createDirectoryAsk()">Create Directory</button>
127 </div>
128 <div class="col-lg-12">
129 <table class="table table-hover table-condensed">
130 <thead>
131 <tr>
132 <th>Type</th>
133 <th>Name</th>
134 <th>Size</th>
135 <th>Modified</th>
136 <th style="text-align: right;">Action</th>
137 </tr>
138 </thead>
139 <tbody>
140 <tr v-show="path !== '/'" v-on:click="up()" class="hand">
141 <th><i class="fa fa-chevron-up"></i></th>
142 <th>..</th>
143 <th></th>
144 <th></th>
145 <th></th>
146 </tr>
147 <tr v-for="entry in entries" v-on:click="open(entry)" class="hand">
148 <th>
149 <img v-bind:src="entry.previewUrl" height="48px" width="48px"/>
150 </th>
151 <th>{{ entry.filePath }}</th>
152 <th>{{ entry.size | prettyFileSize }}</th>
153 <th><span v-my-tooltip="foobar" data-toggle="tooltip" title="{{ entry.mtime }}">{{ entry.mtime | prettyDate }}</span></th>
154 <th style="text-align: right;"><button class="btn btn-sm btn-danger" v-on:click.stop="delAsk(entry)"><i class="fa fa-trash"></i></button></th>
155 </tr>
156 </tbody>
157 </table>
158 </div>
159 </div>
160 </div>
161
162 <!-- Footer -->
163 <footer class="text-center">
164 <span class="text-muted">Created by the <a href="https://cloudron.io" target="_blank">Cloudron</a> team <a href="https://github.com/nebulade/surfer" target="_blank">hosted on Github</a></span>
165 </footer>
166
167 <script src="/_admin/js/jquery-1.12.1.min.js"></script>
168 <script src="/_admin/js/bootstrap.min.js"></script>
169 <script src="/_admin/js/vue.min.js"></script>
170 <script src="/_admin/js/filesize.min.js"></script>
171 <script src="/_admin/js/superagent.js"></script>
172 <script src="/_admin/js/app.js"></script>
173
174</body>
175</html>