mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-06 14:20:55 +03:00
WebClient: propose to add files for empty dirs
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
NFPM_VERSION=2.35.0
|
NFPM_VERSION=2.35.1
|
||||||
NFPM_ARCH=${NFPM_ARCH:-amd64}
|
NFPM_ARCH=${NFPM_ARCH:-amd64}
|
||||||
if [ -z ${SFTPGO_VERSION} ]
|
if [ -z ${SFTPGO_VERSION} ]
|
||||||
then
|
then
|
||||||
|
|||||||
@@ -78,7 +78,6 @@
|
|||||||
"invalid_token": "Invalid permissions",
|
"invalid_token": "Invalid permissions",
|
||||||
"confirm_logout": "Are you sure you want to sign out?",
|
"confirm_logout": "Are you sure you want to sign out?",
|
||||||
"wait": "Please wait...",
|
"wait": "Please wait...",
|
||||||
"or": "or",
|
|
||||||
"ok": "OK",
|
"ok": "OK",
|
||||||
"none": "None",
|
"none": "None",
|
||||||
"cancel": "No, back",
|
"cancel": "No, back",
|
||||||
@@ -224,6 +223,7 @@
|
|||||||
"text": "Upload Files",
|
"text": "Upload Files",
|
||||||
"success": "Files uploaded successfully",
|
"success": "Files uploaded successfully",
|
||||||
"message": "Drop files here or click to upload.",
|
"message": "Drop files here or click to upload.",
|
||||||
|
"message_empty": "This directory is empty. $t(fs.upload.message)",
|
||||||
"err_generic": "Error uploading files",
|
"err_generic": "Error uploading files",
|
||||||
"err_403": "$t(fs.upload.err_generic). $t(fs.err_403)",
|
"err_403": "$t(fs.upload.err_generic). $t(fs.err_403)",
|
||||||
"err_429": "$t(fs.upload.err_generic). $t(fs.err_429)"
|
"err_429": "$t(fs.upload.err_generic). $t(fs.err_429)"
|
||||||
@@ -287,7 +287,7 @@
|
|||||||
"save_err": "Failed to save configuration",
|
"save_err": "Failed to save configuration",
|
||||||
"auth_code_required": "The authentication code is required",
|
"auth_code_required": "The authentication code is required",
|
||||||
"no_protocol": "Please select at least a protocol",
|
"no_protocol": "Please select at least a protocol",
|
||||||
"required_protocols": "The security policy configured for your account requires two-factor authentication for the following protocols: {{val}}",
|
"required_protocols": "Unable to disable two-factor authentication. The security policy configured for your account requires two-factor authentication for the following protocols: {{val}}",
|
||||||
"recovery_codes_generate": "Generate new recovery codes",
|
"recovery_codes_generate": "Generate new recovery codes",
|
||||||
"recovery_codes_view": "View recovery codes"
|
"recovery_codes_view": "View recovery codes"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -78,7 +78,6 @@
|
|||||||
"invalid_token": "Permessi non validi",
|
"invalid_token": "Permessi non validi",
|
||||||
"confirm_logout": "Sei sicuro di volerti disconnettere?",
|
"confirm_logout": "Sei sicuro di volerti disconnettere?",
|
||||||
"wait": "Attendere prego...",
|
"wait": "Attendere prego...",
|
||||||
"or": "o",
|
|
||||||
"ok": "OK",
|
"ok": "OK",
|
||||||
"none": "Nessuna",
|
"none": "Nessuna",
|
||||||
"cancel": "No, indietro",
|
"cancel": "No, indietro",
|
||||||
@@ -224,6 +223,7 @@
|
|||||||
"text": "Carica file",
|
"text": "Carica file",
|
||||||
"success": "File caricati correttamente",
|
"success": "File caricati correttamente",
|
||||||
"message": "Rilascia i file qui o fai clic per caricarli.",
|
"message": "Rilascia i file qui o fai clic per caricarli.",
|
||||||
|
"message_empty": "Questa cartella è vuota. $t(fs.upload.message)",
|
||||||
"err_generic": "Errore caricamento file",
|
"err_generic": "Errore caricamento file",
|
||||||
"err_403": "$t(fs.upload.err_generic). $t(fs.err_403)",
|
"err_403": "$t(fs.upload.err_generic). $t(fs.err_403)",
|
||||||
"err_429": "$t(fs.upload.err_generic). $t(fs.err_429)"
|
"err_429": "$t(fs.upload.err_generic). $t(fs.err_429)"
|
||||||
@@ -287,7 +287,7 @@
|
|||||||
"save_err": "Impossibile salvare la configurazione",
|
"save_err": "Impossibile salvare la configurazione",
|
||||||
"auth_code_required": "Il codice di autenticazione è obbligatorio",
|
"auth_code_required": "Il codice di autenticazione è obbligatorio",
|
||||||
"no_protocol": "Seleziona almeno un protocollo",
|
"no_protocol": "Seleziona almeno un protocollo",
|
||||||
"required_protocols": "La politica di sicurezza configurata per il tuo account richiede l'autenticazione a due fattori per i seguenti protocolli: {{val}}",
|
"required_protocols": "Impossibile disabilitare l'autenticazione a due fattori. La politica di sicurezza configurata per il tuo account richiede l'autenticazione a due fattori per i seguenti protocolli: {{val}}",
|
||||||
"recovery_codes_generate": "Genera nuovi codici di ripristino",
|
"recovery_codes_generate": "Genera nuovi codici di ripristino",
|
||||||
"recovery_codes_view": "Visualizza codici di ripristino"
|
"recovery_codes_view": "Visualizza codici di ripristino"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -145,24 +145,47 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||||||
<div class="new_folder_divider py-2 d-none">
|
<div class="new_folder_divider py-2 d-none">
|
||||||
<hr>
|
<hr>
|
||||||
</div>
|
</div>
|
||||||
<table id="file_manager_list" class="table align-middle table-row-dashed fs-6 gy-5">
|
<div id="upload_files_empty_container" class="d-none mt-10">
|
||||||
<thead>
|
<form id="upload_files_empty_form" action="{{.FilesURL}}?path={{.CurrentDir}}" method="POST" enctype="multipart/form-data">
|
||||||
<tr class="text-start text-muted fw-bold fs-6 gs-0 text-gray-500">
|
<div class="fv-row">
|
||||||
<th class="w-10px pe-2">
|
<div class="dropzone" id="upload_files_empty">
|
||||||
<div class="form-check form-check-sm form-check-custom form-check-solid me-3">
|
<div class="dz-message needsclick align-items-center">
|
||||||
<input id="select_checkbox" class="form-check-input" type="checkbox"/>
|
<i class="ki-duotone ki-file-up fs-3x text-primary">
|
||||||
|
<span class="path1"></span>
|
||||||
|
<span class="path2"></span>
|
||||||
|
</i>
|
||||||
|
<div class="ms-4">
|
||||||
|
<h3 data-i18n="fs.upload.message_empty" class="fs-5 fw-bold text-gray-900 mb-1"></h3>
|
||||||
|
<!-- <span class="fs-7 fw-semibold text-gray-500">Upload up to 30 files</span> -->
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</th>
|
</div>
|
||||||
<th></th>
|
</div>
|
||||||
<th data-i18n="general.name" class="min-w-250px">Name</th>
|
</form>
|
||||||
<th data-i18n="general.size" class="min-w-10px">Size</th>
|
<div class="d-flex justify-content-end mt-5">
|
||||||
<th data-i18n="general.last_modified" class="min-w-125px">Last Modified</th>
|
<button data-i18n="general.submit" type="button" id="upload_files_empty_button" class="btn btn-primary">Submit</button>
|
||||||
<th class="w-125px"></th>
|
</div>
|
||||||
</tr>
|
</div>
|
||||||
</thead>
|
<div id="file_manager_list_container">
|
||||||
<tbody id="file_manager_list_body" class="text-gray-700 fw-semibold">
|
<table id="file_manager_list" class="table align-middle table-row-dashed fs-6 gy-5">
|
||||||
</tbody>
|
<thead>
|
||||||
</table>
|
<tr class="text-start text-muted fw-bold fs-6 gs-0 text-gray-500">
|
||||||
|
<th class="w-10px pe-2">
|
||||||
|
<div class="form-check form-check-sm form-check-custom form-check-solid me-3">
|
||||||
|
<input id="select_checkbox" class="form-check-input" type="checkbox" />
|
||||||
|
</div>
|
||||||
|
</th>
|
||||||
|
<th></th>
|
||||||
|
<th data-i18n="general.name" class="min-w-250px">Name</th>
|
||||||
|
<th data-i18n="general.size" class="min-w-10px">Size</th>
|
||||||
|
<th data-i18n="general.last_modified" class="min-w-125px">Last Modified</th>
|
||||||
|
<th class="w-125px"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody id="file_manager_list_body" class="text-gray-700 fw-semibold">
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -720,6 +743,15 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||||||
//table = dt.$;
|
//table = dt.$;
|
||||||
|
|
||||||
dt.on('draw', function () {
|
dt.on('draw', function () {
|
||||||
|
//{{- if .CanAddFiles}}
|
||||||
|
if (dt.rows().count() === 0) {
|
||||||
|
$('#file_manager_list_container').addClass("d-none");
|
||||||
|
$('#upload_files_empty_container').removeClass("d-none");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
$('#upload_files_empty_container').addClass("d-none");
|
||||||
|
$('#file_manager_list_container').removeClass("d-none");
|
||||||
|
//{{- end}}
|
||||||
lightbox.reload();
|
lightbox.reload();
|
||||||
KTMenu.createInstances();
|
KTMenu.createInstances();
|
||||||
|
|
||||||
@@ -1690,6 +1722,27 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||||||
file.previewElement.querySelector(".dz-progress").style.display = 'none';
|
file.previewElement.querySelector(".dz-progress").style.display = 'none';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var dropzoneEmpty = new Dropzone("#upload_files_empty", {
|
||||||
|
url: "{{.FilesURL}}?path={{.CurrentDir}}",
|
||||||
|
paramName: "filenames",
|
||||||
|
maxFiles: 250,
|
||||||
|
maxFilesize: null,
|
||||||
|
autoQueue: false,
|
||||||
|
addRemoveLinks: true,
|
||||||
|
autoProcessQueue: false,
|
||||||
|
filesizeBase: 1000,
|
||||||
|
init: function() {
|
||||||
|
var dropzoneEmpty = this;
|
||||||
|
$("#upload_files_empty_button").click(function(){
|
||||||
|
uploadFiles(dropzoneEmpty.getAcceptedFiles());
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
dropzoneEmpty.on("addedfile", file => {
|
||||||
|
file.previewElement.querySelector(".dz-progress").style.display = 'none';
|
||||||
|
});
|
||||||
|
|
||||||
$('#modal_video_player').on('hide.bs.modal', function () {
|
$('#modal_video_player').on('hide.bs.modal', function () {
|
||||||
$("#video_player").get(0).pause();
|
$("#video_player").get(0).pause();
|
||||||
if (playerKeepAlive != null) {
|
if (playerKeepAlive != null) {
|
||||||
|
|||||||
@@ -70,10 +70,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||||||
</button>
|
</button>
|
||||||
{{- end}}
|
{{- end}}
|
||||||
{{- if .OpenIDLoginURL}}
|
{{- if .OpenIDLoginURL}}
|
||||||
{{- if not .FormDisabled}}
|
<a href="{{.OpenIDLoginURL}}" class="btn btn-flex btn-outline flex-center {{if .FormDisabled}}btn-primary{{else}}btn-active-color-primary bg-state-light{{end}} btn-lg w-100 my-5">
|
||||||
<div data-i18n="general.or" class="text-center text-muted text-uppercase fw-bold mb-5">or</div>
|
|
||||||
{{- end}}
|
|
||||||
<a href="{{.OpenIDLoginURL}}" class="btn btn-flex btn-outline flex-center btn-active-color-primary bg-state-light btn-lg w-100 mb-5">
|
|
||||||
<img alt="Logo" src="{{.StaticURL}}/img/openid-logo.png" class="h-20px me-3" />
|
<img alt="Logo" src="{{.StaticURL}}/img/openid-logo.png" class="h-20px me-3" />
|
||||||
<span data-i18n="login.signin_openid">Sign in with OpenID</span>
|
<span data-i18n="login.signin_openid">Sign in with OpenID</span>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user