aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/index.html
blob: 78f5a948b96f80df8647ef4da150f30597d7f3d3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<html>
<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">

</head>
<body id="app">

    <nav class="navbar navbar-default" v-cloak>
        <div class="container-fluid">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#">Surfer</a>
            </div>

            <!-- Collect the nav links, forms, and other content for toggling -->
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                <ul class="nav navbar-nav navbar-right">
                    <li v-show="session.valid"><a href="#" ng-click="logout()">Logout</a></li>
                </ul>
            </div>
        </div>
    </nav>

    <div class="container" v-show="busy" v-cloak>
        <div class="row">
            <div class="col-lg-12">
                <center>
                    Loading...
                </center>
            </div>
        </div>
    </div>

    <div class="container" v-show="!session.valid && !busy" v-cloak>
        <div class="row">
            <div class="col-lg-6 col-lg-offset-3">
                <form v-on:submit.prevent="login()">
                    <div class="form-group">
                        <label for="inputUsername">Username</label>
                        <input type="text" class="form-control" id="inputUsername" v-model="loginData.username" placeholder="Username">
                    </div>
                    <div class="form-group">
                        <label for="inputPassword">Password</label>
                        <input type="password" class="form-control" id="inputPassword" v-model="loginData.password" placeholder="Password">
                    </div>
                    <button type="submit" class="btn btn-default">Submit</button>
                </form>
            </div>
        </div>
    </div>

    <div class="container" v-show="session.valid && !busy" v-cloak>
        <div class="row">
            <div class="col-lg-12">
                <center>
                    <button class="btn btn-primary">Upload</button>
                </center>
                <br/>
            </div>
            <div class="col-lg-12">
                <ol class="breadcrumb">
                    <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-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 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>
            </div>
        </div>
    </div>

    <script src="/admin/js/jquery-1.12.1.min.js"></script>
    <script src="/admin/js/bootstrap.min.js"></script>
    <script src="/admin/js/vue.min.js"></script>
    <script src="/admin/js/superagent.js"></script>
    <script src="/admin/js/app.js"></script>

</body>
</html>