3 <title> Surfer
</title>
5 <meta name=
"viewport" content=
"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
7 <link rel=
"icon" type=
"image/png" href=
"/_admin/img/logo.png">
9 <link rel=
"stylesheet" href=
"/_admin/css/theme-chalk_2.11.1.css">
10 <link rel=
"stylesheet" href=
"/_admin/css/style.css">
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>
22 <div id=
"app" @
drop=
"drop" @
dragover=
"dragOver">
25 <input type=
"file" ref=
"upload" style=
"display: none" multiple
/>
26 <input type=
"file" ref=
"uploadFolder" style=
"display: none" multiple webkitdirectory directory
/>
28 <el-dialog title=
"Login" :visible.
sync=
"ready && !session.valid" width=
"30%" :
close-on-press-escape=
"false" :
show-close=
"false">
29 <el-form :
model=
"loginData" label-position=
"top" @submit.native.prevent
>
30 <el-form-item label=
"Username"><el-input v-model=
"loginData.username" id=
"loginUsernameInput" required autofocus :
disabled=
"loginData.busy"></el-input></el-form-item>
31 <el-form-item label=
"Password"><el-input v-model=
"loginData.password" id=
"loginPasswordInput" type=
"password" required :
disabled=
"loginData.busy"></el-input></el-form-item>
32 <input type=
"submit" @
click=
"onLogin" v-show=
"false"/>
34 <span slot=
"footer" class=
"dialog-footer">
35 <el-button type=
"primary" @
click=
"onLogin" id=
"loginSubmitButton"><i class=
"el-icon-loading" v-show=
"loginData.busy"></i><span v-show=
"!loginData.busy">Login
</span></el-button>
39 <el-dialog title=
"Access Tokens" :visible.
sync=
"accessTokensDialogVisible" width=
"40%">
40 Access tokens are useful to programmatically deploy assets for example within a CI/CD pipeline.
41 See the [docs](https://cloudron.io/documentation/apps/surfer/) for more information on how to use this token.
44 <el-alert title=
"Tokens are shared between all users." type=
"warning" show-icon :
closable=
"false"></el-alert>
47 <div v-for=
"accessToken in accessTokens">
48 <el-input suffix-icon=
"el-icon-copy-document" v-model=
"accessToken" class=
"access-token-input" @
focus=
"onCopyAccessToken" size=
"small"></el-input>
49 <el-button icon=
"el-icon-delete" type=
"danger" size=
"small" @
click=
"onDeleteAccessToken(accessToken)"></el-button>
53 <el-button @
click=
"onCreateAccessToken()" size=
"small" type=
"primary">Create Access Token
</el-button>
57 <el-row type=
"flex" justify=
"space-between">
58 <div style=
"padding: 7px;">
61 <div v-show=
"session.valid">
62 <el-button type=
"primary" size=
"small" icon=
"el-icon-arrow-left" :
disabled=
"!pathParts.slice(-1).length" @
click=
"onUp"></el-button>
64 <div style=
"flex-grow: 2; padding: 0 7px;" v-show=
"session.valid">
65 <el-breadcrumb separator-class=
"el-icon-arrow-right">
66 <el-breadcrumb-item><a href=
"#/">Path /
</a></el-breadcrumb-item>
67 <el-breadcrumb-item v-for=
"part in pathParts.slice(0, -1)"><a :
href=
"part.link">{{ part.name }}
</a></el-breadcrumb-item>
68 <el-breadcrumb-item v-show=
"pathParts.slice(-1).length">{{ pathParts.slice(-
1).length ? pathParts.slice(-
1)[
0].name : '' }}
</el-breadcrumb-item>
71 <div align=
"right" v-show=
"session.valid">
73 <el-button type=
"primary" icon=
"el-icon-upload2" size=
"small" @
click=
"onUpload">Upload File
</el-button>
74 <el-button type=
"primary" icon=
"el-icon-upload" size=
"small" @
click=
"onUploadFolder">Upload Folder
</el-button>
75 <el-button type=
"primary" icon=
"el-icon-plus" size=
"small" @
click=
"onNewFolder">New Folder
</el-button>
77 <el-dropdown @
command=
"onOptionsMenu" :
hide-on-click=
"false" trigger=
"click">
78 <el-button size=
"small" icon=
"el-icon-more" id=
"burgerMenuButton"></el-button>
79 <el-dropdown-menu slot=
"dropdown">
80 <el-dropdown-item disabled
>Public Folder Listing
</el-dropdown-item>
81 <el-dropdown-item command=
"folderListing">
82 <el-switch v-model=
"folderListingEnabled" active-text=
"Enabled" inactive-text=
"Disabled"></el-switch>
84 <el-dropdown-item disabled divided
>WebDAV Endpoint
</el-dropdown-item>
85 <el-dropdown-item><a href=
"/_webdav/" target=
"_blank">{{ origin }}/_webdav/
</a></el-dropdown-item>
86 <el-dropdown-item command=
"apiAccess" divided
><i class=
"el-icon-connection"></i> Access Tokens
</el-dropdown-item>
87 <el-dropdown-item command=
"about" divided
><i class=
"el-icon-info"></i> About
</el-dropdown-item>
88 <el-dropdown-item command=
"logout" id=
"logoutButton"><i class=
"el-icon-circle-close"></i> Logout
</el-dropdown-item>
97 <center><h1><i class=
"el-icon-loading"></i></h1></center>
100 <div v-show=
"!busy && session.valid" v-cloak
>
102 <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">
103 <el-table-column prop=
"previewUrl" label=
"Type" width=
"100px" sortable
>
104 <template slot-scope=
"scope">
105 <img v-bind:
src=
"scope.row.previewUrl" height=
"48px" width=
"48px" style=
"object-fit: cover;"/>
108 <el-table-column prop=
"filePath" label=
"Name" sortable
>
109 <template slot-scope=
"scope">
110 <el-input v-on:keyup.native.
enter=
"onRenameSubmit(scope.row)" v-on:keyup.native.
esc=
"onRenameEnd(scope.row)" @
blur=
"onRenameEnd(scope.row)" v-model=
"scope.row.filePathNew" :
id=
"'filePathRenameInputId-' + scope.$index" v-show=
"scope.row.rename"></el-input>
111 <span v-show=
"!scope.row.rename">{{ scope.row.filePath }}
</span>
114 <el-table-column prop=
"size" label=
"Size" width=
"150px" sortable :
formatter=
"prettyFileSize"></el-table-column>
115 <el-table-column prop=
"mtime" label=
"Modified" width=
"150px" sortable :
formatter=
"prettyDate"></el-table-column>
116 <el-table-column label=
"Actions" align=
"right" width=
"200px" class-name=
"list-actions">
117 <template slot-scope=
"scope">
118 <el-button size=
"small" icon=
"el-icon-edit" circle
v-show=
"!scope.row.rename" @click.
stop=
"onRename(scope.row, scope)"></el-button>
119 <el-button size=
"small" icon=
"el-icon-download" circle
v-show=
"!scope.row.rename && scope.row.isFile" @click.
stop=
"onDownload(scope.row)"></el-button>
120 <el-button size=
"small" icon=
"el-icon-delete" circle
v-show=
"!scope.row.rename" @click.
stop=
"onDelete(scope.row)"></el-button>
128 <el-footer v-show=
"uploadStatus.busy">
129 <el-row v-if=
"uploadStatus.uploadListCount">
130 <center><i class=
"el-icon-loading"></i> Fetching file information for upload
<el-badge class=
"mark" :
value=
"uploadStatus.uploadListCount"/></center>
134 Uploading {{ uploadStatus.count }} files ({{ Math.round(uploadStatus.done/
1000/
1000) }}MB / {{ Math.round(uploadStatus.size/
1000/
1000) }}MB)
137 <el-progress :
text-inside=
"true" :
stroke-width=
"18" :
percentage=
"uploadStatus.percentDone"></el-progress>
145 <script src=
"/_admin/js/app.js"></script>