| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516 |
- <!--
- Copyright (C) 2023 Nicola Murino
- This WebUI uses the KeenThemes Mega Bundle, a proprietary theme:
- https://keenthemes.com/products/templates-mega-bundle
- KeenThemes HTML/CSS/JS components are allowed for use only within the
- SFTPGo product and restricted to be used in a resealable HTML template
- that can compete with KeenThemes products anyhow.
- This WebUI is allowed for use only within the SFTPGo product and
- therefore cannot be used in derivative works/products without an
- explicit grant from the SFTPGo Team ([email protected]).
- -->
- {{- define "errmsg"}}
- <div id="errorMsg" class="{{if not . }}d-none {{end}}alert alert-dismissible bg-light-warning d-flex align-items-center p-5 mb-10">
- <i class="ki-duotone ki-information-5 fs-3x text-warning me-5">
- <span class="path1"></span>
- <span class="path2"></span>
- <span class="path3"></span>
- </i>
- <div class="text-gray-800 fw-bold fs-5 d-flex flex-column pe-0 pe-sm-10">
- <span id="errorTxt">{{.}}</span>
- </div>
- <button id="id_dismiss_error_msg" type="button" class="position-absolute position-sm-relative m-2 m-sm-0 top-0 end-0 btn btn-icon btn-sm btn-active-light-primary ms-sm-auto">
- <i class="ki-duotone ki-cross fs-2x text-primary">
- <span class="path1"></span>
- <span class="path2"></span>
- </i>
- </button>
- </div>
- {{- end}}
- {{- define "theme-setup"}}
- <script type="text/javascript" {{- if .}} nonce="{{.}}"{{- end}}>
- var defaultThemeMode = "system";
- var themeMode;
- if ( document.documentElement ) {
- if ( document.documentElement.hasAttribute("data-bs-theme-mode")) {
- themeMode = document.documentElement.getAttribute("data-bs-theme-mode");
- } else {
- if ( localStorage.getItem("data-bs-theme") !== null ) {
- themeMode = localStorage.getItem("data-bs-theme");
- } else {
- themeMode = defaultThemeMode;
- }
- }
- if (themeMode === "system") {
- themeMode = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
- }
- document.documentElement.setAttribute("data-bs-theme", themeMode);
- }
- </script>
- {{- end }}
- {{- define "commonjs"}}
- <script type="text/javascript" {{- if .}} nonce="{{.}}"{{- end}}>
- window.addEventListener("pageshow", function (event) {
- if (event.persisted) {
- let loadings = document.querySelectorAll('[data-kt-indicator=on]');
- if (loadings){
- [].forEach.call(loadings, function (loading) {
- loading.removeAttribute('data-kt-indicator');
- loading.disabled = false;
- });
- }
- }
- });
- </script>
- {{- end}}
- {{- define "basejs"}}
- <script type="text/javascript" {{- if .}} nonce="{{.}}"{{- end}}>
- 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, '_');
- }
- function fixedEncodeURIComponent(str) {
- return encodeURIComponent(unescapeHTML(str)).replace(/[!'()*]/g, function (c) {
- return '%' + c.charCodeAt(0).toString(16);
- });
- }
- function replaceSlash(str){
- return str.replace(/\//g,'\u2215');
- }
- function b64EncodeUnicode(str) {
- return btoa(encodeURIComponent(str));
- }
- function UnicodeDecodeB64(str) {
- return decodeURIComponent(atob(str));
- }
- function fileSizeIEC(a,b,c,d,e){
- return (b=Math,c=b.log,d=1024,e=c(a)/c(d)|0,a/b.pow(d,e)).toFixed(1)
- +' '+(e?'KMGTPEZY'[--e]+'iB':'Bytes')
- }
- function initRepeaterItems() {
- let repeaterDeleteButtons = document.querySelectorAll('[data-repeater-delete]');
- let repeaterCreateButtons = document.querySelectorAll('[data-repeater-create]');
- repeaterDeleteButtons.forEach(d => {
- d.addEventListener("click", function(e){
- e.preventDefault();
- });
- });
- repeaterCreateButtons.forEach(d => {
- d.addEventListener("click", function(e){
- e.preventDefault();
- });
- });
- }
- function initRepeater(selector) {
- $(selector).repeater({
- initEmpty: false,
- show: function () {
- $(this).slideDown();
- $(this).find('[data-repeater-delete]').on("click", function(e){
- e.preventDefault();
- });
- },
- hide: function (deleteElement) {
- $(this).slideUp(deleteElement);
- }
- });
- }
- function clearChilds(el) {
- while (el.firstChild) {
- el.removeChild(el.firstChild);
- }
- }
- KTUtil.onDOMContentLoaded(function () {
- var dismissErrorBtn = $('#id_dismiss_error_msg');
- if (dismissErrorBtn){
- dismissErrorBtn.on("click", function(){
- $('#errorMsg').addClass("d-none");
- });
- }
- var logoutBtn = $('#id_logout_link');
- if (logoutBtn){
- logoutBtn.on("click", function(){
- doLogout();
- });
- }
- });
- </script>
- {{- end}}
- {{- define "globalstyle"}}
- <style {{- if .}} nonce="{{.}}"{{- end}}>
- .text-sidebar {
- color: var(--bs-white);
- }
- [data-bs-theme="dark"] .text-sidebar {
- color: var(--bs-white);
- }
- .wrap-word {
- overflow-wrap: break-word;
- }
- .line-through {
- text-decoration: line-through;
- }
- </style>
- {{- end}}
- {{- define "fonts"}}
- <style {{- if .}} nonce="{{.CSPNonce}}"{{- end}}>
- /* cyrillic-ext */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 300;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa2JL7SUc.woff2) format('woff2');
- unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
- }
- /* cyrillic */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 300;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa0ZL7SUc.woff2) format('woff2');
- unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
- }
- /* greek-ext */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 300;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa2ZL7SUc.woff2) format('woff2');
- unicode-range: U+1F00-1FFF;
- }
- /* greek */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 300;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa1pL7SUc.woff2) format('woff2');
- unicode-range: U+0370-03FF;
- }
- /* vietnamese */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 300;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa2pL7SUc.woff2) format('woff2');
- unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
- }
- /* latin-ext */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 300;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa25L7SUc.woff2) format('woff2');
- unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
- }
- /* latin */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 300;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa1ZL7.woff2) format('woff2');
- unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
- }
- /* cyrillic-ext */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 400;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa2JL7SUc.woff2) format('woff2');
- unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
- }
- /* cyrillic */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 400;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa0ZL7SUc.woff2) format('woff2');
- unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
- }
- /* greek-ext */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 400;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa2ZL7SUc.woff2) format('woff2');
- unicode-range: U+1F00-1FFF;
- }
- /* greek */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 400;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa1pL7SUc.woff2) format('woff2');
- unicode-range: U+0370-03FF;
- }
- /* vietnamese */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 400;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa2pL7SUc.woff2) format('woff2');
- unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
- }
- /* latin-ext */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 400;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa25L7SUc.woff2) format('woff2');
- unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
- }
- /* latin */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 400;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa1ZL7.woff2) format('woff2');
- unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
- }
- /* cyrillic-ext */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 500;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa2JL7SUc.woff2) format('woff2');
- unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
- }
- /* cyrillic */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 500;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa0ZL7SUc.woff2) format('woff2');
- unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
- }
- /* greek-ext */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 500;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa2ZL7SUc.woff2) format('woff2');
- unicode-range: U+1F00-1FFF;
- }
- /* greek */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 500;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa1pL7SUc.woff2) format('woff2');
- unicode-range: U+0370-03FF;
- }
- /* vietnamese */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 500;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa2pL7SUc.woff2) format('woff2');
- unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
- }
- /* latin-ext */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 500;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa25L7SUc.woff2) format('woff2');
- unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
- }
- /* latin */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 500;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa1ZL7.woff2) format('woff2');
- unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
- }
- /* cyrillic-ext */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 600;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa2JL7SUc.woff2) format('woff2');
- unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
- }
- /* cyrillic */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 600;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa0ZL7SUc.woff2) format('woff2');
- unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
- }
- /* greek-ext */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 600;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa2ZL7SUc.woff2) format('woff2');
- unicode-range: U+1F00-1FFF;
- }
- /* greek */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 600;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa1pL7SUc.woff2) format('woff2');
- unicode-range: U+0370-03FF;
- }
- /* vietnamese */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 600;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa2pL7SUc.woff2) format('woff2');
- unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
- }
- /* latin-ext */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 600;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa25L7SUc.woff2) format('woff2');
- unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
- }
- /* latin */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 600;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa1ZL7.woff2) format('woff2');
- unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
- }
- /* cyrillic-ext */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 700;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa2JL7SUc.woff2) format('woff2');
- unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
- }
- /* cyrillic */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 700;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa0ZL7SUc.woff2) format('woff2');
- unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
- }
- /* greek-ext */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 700;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa2ZL7SUc.woff2) format('woff2');
- unicode-range: U+1F00-1FFF;
- }
- /* greek */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 700;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa1pL7SUc.woff2) format('woff2');
- unicode-range: U+0370-03FF;
- }
- /* vietnamese */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 700;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa2pL7SUc.woff2) format('woff2');
- unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
- }
- /* latin-ext */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 700;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa25L7SUc.woff2) format('woff2');
- unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
- }
- /* latin */
- @font-face {
- font-family: 'Inter';
- font-style: normal;
- font-weight: 700;
- src: url({{.StaticURL}}/vendor/fonts/inter/v12/UcC73FwrK3iLTeHuS_fvQtMwCp50KnMa1ZL7.woff2) format('woff2');
- unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
- }
- </style>
- {{- end}}
|