2022-07-17 18:16:00 +00:00
|
|
|
<!--
|
|
|
|
Copyright (C) 2019-2022 Nicola Murino
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Affero General Public License as published
|
|
|
|
by the Free Software Foundation, version 3.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
|
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
-->
|
2019-10-07 16:19:01 +00:00
|
|
|
{{define "base"}}
|
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
|
|
|
|
<head>
|
|
|
|
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
|
|
<meta name="description" content="">
|
|
|
|
<meta name="author" content="">
|
|
|
|
|
2022-05-13 17:40:52 +00:00
|
|
|
<title>{{.Branding.Name}} - {{template "title" .}}</title>
|
2019-10-07 16:19:01 +00:00
|
|
|
|
2022-05-13 17:40:52 +00:00
|
|
|
<link rel="shortcut icon" href="{{.StaticURL}}{{.Branding.FaviconPath}}" />
|
2019-10-07 16:19:01 +00:00
|
|
|
|
|
|
|
<!-- Custom fonts for this template-->
|
2021-04-09 20:02:48 +00:00
|
|
|
<link href="{{.StaticURL}}/vendor/fontawesome-free/css/fontawesome.min.css" rel="stylesheet" type="text/css">
|
|
|
|
<link href="{{.StaticURL}}/vendor/fontawesome-free/css/solid.min.css" rel="stylesheet" type="text/css">
|
2021-05-24 17:09:03 +00:00
|
|
|
<link href="{{.StaticURL}}/vendor/fontawesome-free/css/regular.min.css" rel="stylesheet" type="text/css">
|
2019-10-07 16:19:01 +00:00
|
|
|
|
|
|
|
<!-- Custom styles for this template-->
|
2022-05-21 09:05:58 +00:00
|
|
|
<link href="{{.StaticURL}}{{.Branding.DefaultCSS}}" rel="stylesheet">
|
2019-10-07 16:19:01 +00:00
|
|
|
<style>
|
2022-05-14 09:54:55 +00:00
|
|
|
{{template "commoncss" .}}
|
2019-10-07 16:19:01 +00:00
|
|
|
</style>
|
|
|
|
{{block "extra_css" .}}{{end}}
|
|
|
|
|
2022-05-13 17:40:52 +00:00
|
|
|
{{range .Branding.ExtraCSS}}
|
|
|
|
<link href="{{$.StaticURL}}{{.}}" rel="stylesheet" type="text/css">
|
2022-03-19 20:44:27 +00:00
|
|
|
{{end}}
|
|
|
|
|
2019-10-07 16:19:01 +00:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body id="page-top">
|
|
|
|
|
|
|
|
<!-- Page Wrapper -->
|
|
|
|
<div id="wrapper">
|
|
|
|
|
2021-05-06 19:35:43 +00:00
|
|
|
{{if .LoggedUser.Username}}
|
2019-10-07 16:19:01 +00:00
|
|
|
<!-- Sidebar -->
|
|
|
|
<ul class="navbar-nav bg-gradient-primary sidebar sidebar-dark accordion" id="accordionSidebar">
|
|
|
|
|
|
|
|
<!-- Sidebar - Brand -->
|
2021-05-06 19:35:43 +00:00
|
|
|
<div class="sidebar-brand d-flex align-items-center justify-content-center">
|
2022-05-13 17:40:52 +00:00
|
|
|
<div class="sidebar-brand-icon">
|
|
|
|
<img src="{{.StaticURL}}{{.Branding.LogoPath}}" alt="logo" style="width: 2rem; height: auto;">
|
|
|
|
</div>
|
|
|
|
<div class="sidebar-brand-text mx-3" style="text-transform: none;">{{.Branding.ShortName}}</div>
|
2021-05-06 19:35:43 +00:00
|
|
|
</div>
|
2019-10-07 16:19:01 +00:00
|
|
|
|
|
|
|
<!-- Divider -->
|
|
|
|
<hr class="sidebar-divider my-0">
|
|
|
|
|
2021-05-06 19:35:43 +00:00
|
|
|
<li class="nav-item {{if eq .CurrentURL .FilesURL}}active{{end}}">
|
|
|
|
<a class="nav-link" href="{{.FilesURL}}">
|
|
|
|
<i class="fas fa-folder-open"></i>
|
|
|
|
<span>{{.FilesTitle}}</span>
|
|
|
|
</a>
|
2021-01-22 18:42:18 +00:00
|
|
|
</li>
|
2021-11-06 13:13:20 +00:00
|
|
|
{{if .LoggedUser.CanManageShares}}
|
|
|
|
<li class="nav-item {{if eq .CurrentURL .SharesURL}}active{{end}}">
|
|
|
|
<a class="nav-link" href="{{.SharesURL}}">
|
|
|
|
<i class="fas fa-share-alt"></i>
|
|
|
|
<span>{{.SharesTitle}}</span></a>
|
|
|
|
</li>
|
|
|
|
{{end}}
|
2021-09-29 16:46:15 +00:00
|
|
|
<li class="nav-item {{if eq .CurrentURL .ProfileURL}}active{{end}}">
|
|
|
|
<a class="nav-link" href="{{.ProfileURL}}">
|
|
|
|
<i class="fas fa-user"></i>
|
|
|
|
<span>{{.ProfileTitle}}</span></a>
|
2020-12-08 10:18:34 +00:00
|
|
|
</li>
|
2021-09-04 10:11:04 +00:00
|
|
|
{{if .LoggedUser.CanManageMFA}}
|
|
|
|
<li class="nav-item {{if eq .CurrentURL .MFAURL}}active{{end}}">
|
|
|
|
<a class="nav-link" href="{{.MFAURL}}">
|
|
|
|
<i class="fas fa-user-lock"></i>
|
|
|
|
<span>{{.MFATitle}}</span></a>
|
|
|
|
</li>
|
|
|
|
{{end}}
|
2019-10-07 16:19:01 +00:00
|
|
|
<!-- Divider -->
|
|
|
|
<hr class="sidebar-divider d-none d-md-block">
|
|
|
|
|
|
|
|
<!-- Sidebar Toggler (Sidebar) -->
|
|
|
|
<div class="text-center d-none d-md-inline">
|
|
|
|
<button class="rounded-circle border-0" id="sidebarToggle"></button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
<!-- End of Sidebar -->
|
2021-01-17 21:29:08 +00:00
|
|
|
{{end}}
|
2019-10-07 16:19:01 +00:00
|
|
|
|
|
|
|
<!-- Content Wrapper -->
|
|
|
|
<div id="content-wrapper" class="d-flex flex-column">
|
|
|
|
|
|
|
|
<!-- Main Content -->
|
|
|
|
<div id="content">
|
|
|
|
|
2021-05-06 19:35:43 +00:00
|
|
|
{{if .LoggedUser.Username}}
|
2019-10-07 16:19:01 +00:00
|
|
|
<!-- Topbar -->
|
2021-01-17 21:29:08 +00:00
|
|
|
<nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">
|
|
|
|
|
|
|
|
<button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
|
|
|
|
<i class="fa fa-bars"></i>
|
|
|
|
</button>
|
|
|
|
|
|
|
|
<!-- Topbar Navbar -->
|
|
|
|
<ul class="navbar-nav ml-auto">
|
2021-10-09 12:17:28 +00:00
|
|
|
{{block "additionalnavitems" .}}{{end}}
|
2021-01-17 21:29:08 +00:00
|
|
|
|
|
|
|
<!-- Nav Item - User Information -->
|
|
|
|
<li class="nav-item dropdown no-arrow">
|
|
|
|
<a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-toggle="dropdown"
|
|
|
|
aria-haspopup="true" aria-expanded="false">
|
2021-05-06 19:35:43 +00:00
|
|
|
<span class="mr-2 d-none d-lg-inline text-gray-600 small">{{.LoggedUser.Username}}</span>
|
2021-03-28 09:02:11 +00:00
|
|
|
<i class="fas fa-user fa-fw"></i>
|
2021-01-17 21:29:08 +00:00
|
|
|
</a>
|
|
|
|
<!-- Dropdown - User Information -->
|
|
|
|
<div class="dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="userDropdown">
|
2021-09-29 16:46:15 +00:00
|
|
|
{{if .LoggedUser.CanChangePassword}}
|
|
|
|
<a class="dropdown-item" href="{{.ChangePwdURL}}">
|
|
|
|
<i class="fas fa-key fa-sm fa-fw mr-2 text-gray-400"></i>
|
|
|
|
Change password
|
|
|
|
</a>
|
|
|
|
<div class="dropdown-divider"></div>
|
|
|
|
{{end}}
|
2021-01-17 21:29:08 +00:00
|
|
|
<a class="dropdown-item" href="#" data-toggle="modal" data-target="#logoutModal">
|
|
|
|
<i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
|
|
|
|
Logout
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
</ul>
|
2019-10-07 16:19:01 +00:00
|
|
|
|
|
|
|
</nav>
|
|
|
|
<!-- End of Topbar -->
|
2021-01-17 21:29:08 +00:00
|
|
|
{{end}}
|
2019-10-07 16:19:01 +00:00
|
|
|
|
|
|
|
<!-- Begin Page Content -->
|
|
|
|
<div class="container-fluid">
|
|
|
|
|
|
|
|
{{template "page_body" .}}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<!-- /.container-fluid -->
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<!-- End of Main Content -->
|
2021-05-06 19:35:43 +00:00
|
|
|
{{if .LoggedUser.Username}}
|
2019-10-19 05:52:58 +00:00
|
|
|
<!-- Footer -->
|
|
|
|
<footer class="sticky-footer bg-white">
|
|
|
|
<div class="container my-auto">
|
|
|
|
<div class="copyright text-center my-auto">
|
|
|
|
<span>SFTPGo {{.Version}}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</footer>
|
|
|
|
<!-- End of Footer -->
|
2021-01-17 21:29:08 +00:00
|
|
|
{{end}}
|
2019-10-19 05:52:58 +00:00
|
|
|
|
2019-10-07 16:19:01 +00:00
|
|
|
</div>
|
|
|
|
<!-- End of Content Wrapper -->
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<!-- End of Page Wrapper -->
|
|
|
|
|
|
|
|
<!-- Scroll to Top Button-->
|
|
|
|
<a class="scroll-to-top rounded" href="#page-top">
|
|
|
|
<i class="fas fa-angle-up"></i>
|
|
|
|
</a>
|
|
|
|
|
2021-05-11 04:54:06 +00:00
|
|
|
{{if .LoggedUser.Username}}
|
2021-01-17 21:29:08 +00:00
|
|
|
<!-- Logout Modal-->
|
|
|
|
<div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel"
|
|
|
|
aria-hidden="true">
|
|
|
|
<div class="modal-dialog" role="document">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<h5 class="modal-title" id="modalLabel">Ready to Leave?</h5>
|
|
|
|
<button class="close" type="button" data-dismiss="modal" aria-label="Close">
|
2021-07-26 18:55:49 +00:00
|
|
|
<span aria-hidden="true">×</span>
|
2021-01-17 21:29:08 +00:00
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div class="modal-body">Select "Logout" below if you are ready to end your current session.</div>
|
|
|
|
<div class="modal-footer">
|
|
|
|
<button class="btn btn-secondary" type="button" data-dismiss="modal">Cancel</button>
|
|
|
|
<a class="btn btn-primary" href="{{.LogoutURL}}">Logout</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2021-05-11 04:54:06 +00:00
|
|
|
{{end}}
|
2021-01-17 21:29:08 +00:00
|
|
|
|
2019-10-07 16:19:01 +00:00
|
|
|
{{block "dialog" .}}{{end}}
|
|
|
|
|
|
|
|
<!-- Bootstrap core JavaScript-->
|
2021-04-09 20:02:48 +00:00
|
|
|
<script src="{{.StaticURL}}/vendor/jquery/jquery.min.js"></script>
|
|
|
|
<script src="{{.StaticURL}}/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
|
2019-10-07 16:19:01 +00:00
|
|
|
|
|
|
|
<!-- Core plugin JavaScript-->
|
2021-04-09 20:02:48 +00:00
|
|
|
<script src="{{.StaticURL}}/vendor/jquery-easing/jquery.easing.min.js"></script>
|
2019-10-07 16:19:01 +00:00
|
|
|
|
|
|
|
<!-- Custom scripts for all pages-->
|
2021-04-09 20:02:48 +00:00
|
|
|
<script src="{{.StaticURL}}/js/sb-admin-2.min.js"></script>
|
2019-10-07 16:19:01 +00:00
|
|
|
|
2021-03-04 08:48:53 +00:00
|
|
|
<script type="text/javascript">
|
2022-09-13 17:16:07 +00:00
|
|
|
function escapeHTML(str) {
|
|
|
|
var div = document.createElement('div');
|
|
|
|
div.appendChild(document.createTextNode(str));
|
|
|
|
return div.innerHTML;
|
|
|
|
}
|
|
|
|
|
|
|
|
function unescapeHTML(escapedStr) {
|
|
|
|
var div = document.createElement('div');
|
|
|
|
div.innerHTML = escapedStr;
|
|
|
|
var child = div.childNodes[0];
|
|
|
|
return child ? child.nodeValue : '';
|
|
|
|
}
|
|
|
|
|
|
|
|
function escapeHTMLForceSafe(str) {
|
|
|
|
return str
|
|
|
|
.replace(/&/g, '_')
|
|
|
|
.replace(/</g, '_')
|
|
|
|
.replace(/>/g, '_')
|
|
|
|
.replace(/\"/g, '_')
|
|
|
|
.replace(/\'/g, '_');
|
|
|
|
}
|
|
|
|
|
2021-03-04 08:48:53 +00:00
|
|
|
function fixedEncodeURIComponent(str) {
|
2022-09-13 17:16:07 +00:00
|
|
|
return encodeURIComponent(unescapeHTML(str)).replace(/[!'()*]/g, function (c) {
|
2021-03-04 08:48:53 +00:00
|
|
|
return '%' + c.charCodeAt(0).toString(16);
|
|
|
|
});
|
|
|
|
}
|
2021-07-26 18:55:49 +00:00
|
|
|
|
|
|
|
function replaceSlash(str){
|
|
|
|
return str.replace(/\//g,'\u2215');
|
|
|
|
}
|
2022-09-13 17:16:07 +00:00
|
|
|
|
|
|
|
function b64EncodeUnicode(str) {
|
|
|
|
return btoa(encodeURIComponent(str));
|
|
|
|
}
|
|
|
|
|
|
|
|
function UnicodeDecodeB64(str) {
|
|
|
|
return decodeURIComponent(atob(str));
|
|
|
|
}
|
2021-03-04 08:48:53 +00:00
|
|
|
</script>
|
|
|
|
|
2019-10-07 16:19:01 +00:00
|
|
|
<!-- Page level plugins -->
|
|
|
|
{{block "extra_js" .}}{{end}}
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|
|
|
|
{{end}}
|