203 lines
9.8 KiB
HTML
203 lines
9.8 KiB
HTML
<!DOCTYPE html>
|
|
<html ng-app="Application" ng-controller="FileManagerController">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height" />
|
|
|
|
<title> FileManager </title>
|
|
|
|
<link id="favicon" href="/api/v1/cloudron/avatar" rel="icon" type="image/png">
|
|
<link rel="apple-touch-icon" href="/api/v1/cloudron/avatar">
|
|
<link rel="icon" href="/api/v1/cloudron/avatar">
|
|
|
|
<!-- CSS -->
|
|
<link type="text/css" rel="stylesheet" href="/3rdparty/angular-ui-notification.css"/>
|
|
<link type="text/css" rel="stylesheet" href="/theme.css">
|
|
|
|
<!-- Custom Fonts -->
|
|
<link type="text/css" rel="stylesheet" href="/3rdparty/fontawesome/css/all.min.css">
|
|
|
|
<!-- jQuery-->
|
|
<script type="text/javascript" src="/3rdparty/js/jquery.min.js"></script>
|
|
|
|
<!-- async -->
|
|
<script type="text/javascript" src="/3rdparty/js/async-3.2.0.min.js"></script>
|
|
|
|
<!-- Showdown (markdown converter) -->
|
|
<script type="text/javascript" src="/3rdparty/js/showdown-1.6.4.min.js?<%= revision %>"></script>
|
|
<script type="text/javascript" src="/3rdparty/js/showdown-target-blank.min.js?<%= revision %>"></script>
|
|
|
|
<!-- Bootstrap Core JavaScript -->
|
|
<script type="text/javascript" src="/3rdparty/js/bootstrap.min.js"></script>
|
|
|
|
<!-- Angularjs scripts -->
|
|
<script type="text/javascript" src="/3rdparty/js/angular.min.js"></script>
|
|
<script type="text/javascript" src="/3rdparty/js/angular-loader.min.js"></script>
|
|
<script type="text/javascript" src="/3rdparty/js/angular-animate.min.js"></script>
|
|
<script type="text/javascript" src="/3rdparty/js/angular-base64.min.js"></script>
|
|
<script type="text/javascript" src="/3rdparty/js/angular-md5.min.js"></script>
|
|
<script type="text/javascript" src="/3rdparty/js/angular-sanitize.min.js"></script>
|
|
<script type="text/javascript" src="/3rdparty/js/angular-ui-notification.js"></script>
|
|
|
|
<!-- Angular directives for bootstrap https://angular-ui.github.io/bootstrap/ -->
|
|
<script type="text/javascript" src="/3rdparty/js/ui-bootstrap-tpls-1.3.3.min.js"></script>
|
|
|
|
<!-- colors -->
|
|
<script type="text/javascript" src="/3rdparty/js/colors.js"></script>
|
|
|
|
<!-- moment -->
|
|
<script type="text/javascript" src="/3rdparty/js/moment.min.js"></script>
|
|
|
|
<!-- Main Application -->
|
|
<script type="text/javascript" src="/js/filemanager.js"></script>
|
|
|
|
</head>
|
|
|
|
<body class="filemanager">
|
|
|
|
<a class="offline-banner animateMe" ng-show="client.offline" ng-cloak href="https://cloudron.io/documentation/troubleshooting/" target="_blank"><i class="fa fa-circle-notch fa-spin"></i> Cloudron is offline. Reconnecting...</a>
|
|
|
|
<!-- Modal remove entry -->
|
|
<div class="modal fade" id="entryRemoveModal" tabindex="-1" role="dialog">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-body">
|
|
<p class="text-bold text-danger" ng-show="entryRemove.error">{{ entryRemove.error }}</p>
|
|
<h4 ng-hide="entryRemove.error">Really delete {{ entryRemove.entry.fileName }}?</h4>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">No</button>
|
|
<button type="button" class="btn btn-danger" ng-click="entryRemove.submit()" ng-hide="entryRemove.error" ng-disabled="entryRemove.busy"><i class="fa fa-circle-notch fa-spin" ng-show="entryRemove.busy"></i> Yes</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Modal new directory -->
|
|
<div class="modal fade" id="newDirectoryModal" tabindex="-1" role="dialog">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h4 class="modal-title">New Folder</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<form role="form" name="newDirectoryForm" ng-submit="newDirectory.submit()" autocomplete="off">
|
|
<fieldset>
|
|
<div class="form-group" ng-class="{ 'has-error': newDirectory.error || (newDirectoryForm.directoryName.$dirty && newDirectoryForm.directoryName.$invalid) }">
|
|
<input type="text" class="form-control" id="inputDirectoryName" name="directoryName" ng-model="newDirectory.name" required autofocus>
|
|
<div class="control-label" ng-show="newDirectory.error">{{ newDirectory.error }}</div>
|
|
</div>
|
|
<input class="ng-hide" type="submit" ng-disabled="newDirectoryForm.$invalid || newDirectory.busy"/>
|
|
</fieldset>
|
|
</form>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
<button type="button" class="btn btn-danger" ng-click="newDirectory.submit()" ng-disabled="newDirectory.busy"><i class="fa fa-circle-notch fa-spin" ng-show="newDirectory.busy"></i> Create</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Modal rename entry -->
|
|
<div class="modal fade" id="renameEntryModal" tabindex="-1" role="dialog">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h4 class="modal-title">Rename {{ renameEntry.entry.fileName }}</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<form role="form" name="renameEntryForm" ng-submit="renameEntry.submit()" autocomplete="off">
|
|
<fieldset>
|
|
<div class="form-group" ng-class="{ 'has-error': (renameEntryForm.newName.$dirty && renameEntryForm.newName.$invalid) }">
|
|
<label class="control-label">New Name</label>
|
|
<div class="control-label" ng-show="renameEntry.error">{{ renameEntry.error }}</div>
|
|
<input type="text" class="form-control" id="inputNewName" name="newName" ng-model="renameEntry.newName" required>
|
|
</div>
|
|
<input class="ng-hide" type="submit" ng-disabled="renameEntryForm.$invalid || renameEntry.busy"/>
|
|
</fieldset>
|
|
</form>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
|
|
<button type="button" class="btn btn-danger" ng-click="renameEntry.submit()" ng-hide="renameEntry.error" ng-disabled="renameEntry.busy"><i class="fa fa-circle-notch fa-spin" ng-show="renameEntry.busy"></i> Rename</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="main-container animateMe ng-hide layout-root" ng-show="initialized">
|
|
<div class="layout-content container">
|
|
<br/>
|
|
<div class="row" ng-hide="app">
|
|
<div class="col-md-12 text-center">
|
|
<h3>App not found</h3>
|
|
</div>
|
|
</div>
|
|
<div class="row" ng-show="app">
|
|
<div class="col-md-12">
|
|
<div class="card card-large">
|
|
|
|
<input type="file" id="uploadFileInput" style="display: none" multiple/>
|
|
<input type="file" id="uploadFolderInput" style="display: none" multiple webkitdirectory directory/>
|
|
|
|
<h4 class="text-center">{{ app.fqdn }}</h4>
|
|
|
|
<div>
|
|
<div class="btn-group" role="group">
|
|
<button class="btn btn-primary" ng-click="goDirectoryUp()" ng-disabled="cwd === '/'"><i class="fas fa-arrow-left"></i></button>
|
|
<button class="btn btn-primary" ng-click="refresh()"><i class="fas fa-sync-alt"></i></button>
|
|
</div>
|
|
<div class="btn-group" role="group">
|
|
<button class="btn btn-default" ng-disabled="cwd === '/'" ng-click="changeDirectory('/')"><i class="fas fa-home"></i> / </button>
|
|
<button class="btn btn-default" ng-disabled="part.path === cwd" ng-click="changeDirectory(part.path)" ng-repeat="part in cwdParts">{{ part.name }}</button>
|
|
</div>
|
|
<div class="btn-group pull-right" role="group">
|
|
<button class="btn btn-primary" ng-click="newDirectory.show()">New Folder</button>
|
|
<button class="btn btn-primary" ng-click="onUploadFile()">Upload File</button>
|
|
<button class="btn btn-primary" ng-click="onUploadFolder()">Upload Folder</button>
|
|
</div>
|
|
</div>
|
|
|
|
<br/>
|
|
|
|
<table class="table table-hover" style="margin: 0;">
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 3%;"> </th>
|
|
<th style="width:67%">Name</th>
|
|
<th style="width:10%">Size</th>
|
|
<th style="width:10%">Owner</th>
|
|
<th style="width: 10%" class="text-right">Actions</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr ng-repeat="entry in entries">
|
|
<td ng-click="open(entry)" class="hand text-center">
|
|
<i class="fas fa-folder fa-lg" ng-show="entry.isDirectory"></i>
|
|
<i class="far fa-file fa-lg" ng-show="entry.isFile"></i>
|
|
</td>
|
|
<td class="hand elide-table-cell" ng-click="open(entry)">{{ entry.fileName }}</td>
|
|
<td class="hand elide-table-cell" ng-click="open(entry)">{{ entry.size | prettyDiskSize }}</td>
|
|
<td class="hand elide-table-cell" ng-click="open(entry)">{{ entry.uid | prettyOwner }}</td>
|
|
<td class="text-right no-wrap" style="vertical-align: bottom">
|
|
<button class="btn btn-xs btn-default" ng-click="renameEntry.show(entry)"><i class="far fa-edit"></i></button>
|
|
<button class="btn btn-xs btn-danger" ng-click="entryRemove.show(entry)"><i class="far fa-trash-alt"></i></button>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<footer class="text-center ng-cloak">
|
|
<span class="text-muted" ng-bind-html="status.footer | markdown2html"></span>
|
|
<span class="version">v{{status.version}}</span>
|
|
</footer>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|