diff --git a/templates/webadmin/twofactor-recovery.html b/templates/webadmin/twofactor-recovery.html
index 9142acb8..4b551300 100644
--- a/templates/webadmin/twofactor-recovery.html
+++ b/templates/webadmin/twofactor-recovery.html
@@ -19,7 +19,7 @@ along with this program. If not, see
.
{{define "content"}}
-
{{.Branding.Name}} - {{.Version}}
+ {{.Branding.Name}}
{{if .Error}}
diff --git a/templates/webadmin/twofactor.html b/templates/webadmin/twofactor.html
index fbaaed61..0e7045d0 100644
--- a/templates/webadmin/twofactor.html
+++ b/templates/webadmin/twofactor.html
@@ -19,7 +19,7 @@ along with this program. If not, see
.
{{define "content"}}
-
{{.Branding.Name}} - {{.Version}}
+ {{.Branding.Name}}
{{if .Error}}
diff --git a/templates/webclient/base.html b/templates/webclient/base.html
index 5fa4b8b0..02c319b8 100644
--- a/templates/webclient/base.html
+++ b/templates/webclient/base.html
@@ -17,7 +17,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
-
{{.Branding.Name}} - {{template "title" .}}
+
@@ -36,7 +36,10 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
{{- template "theme-setup" .CSPNonce }}
-
+
+
+
+
{{- if .LoggedUser.Username}}
@@ -143,7 +146,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
-
+
{{.LoggedUser.Username}}
@@ -152,19 +155,19 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
{{- if .LoggedUser.CanChangePassword}}
{{- end}}
@@ -201,7 +204,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
-
+
{{- if .LoggedUser.CanManageShares}}
@@ -217,7 +220,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
-
+
{{- end}}
@@ -230,7 +233,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
-
+
{{- end}}
@@ -294,7 +297,13 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
{{- block "modals" .}}{{- end}}
- {{- template "basejs" .CSPNonce }}
+
+
+
+
+
+
+ {{- template "basejs" . }}
- {{- template "basejs" .CSPNonce }}
+
+
+
+
+
+
+ {{- template "basejs" . }}
diff --git a/templates/webclient/shareupload.html b/templates/webclient/shareupload.html
index ab6b2e11..c9191810 100644
--- a/templates/webclient/shareupload.html
+++ b/templates/webclient/shareupload.html
@@ -15,8 +15,6 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
-->
{{- template "base" .}}
-{{- define "title"}}{{.Title}}{{- end}}
-
{{- define "page_body"}}
@@ -29,7 +27,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
{{- template "errmsg" ""}}
@@ -39,13 +37,13 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
-
Drop files here or click to upload.
+ Drop files here or click to upload.
-
+
@@ -69,9 +67,9 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
KTApp.hidePageLoading();
if (!has_errors) {
ModalAlert.fire({
- text: `File/s uploaded successfully`,
+ text: $.t('fs.upload.success'),
icon: "success",
- confirmButtonText: "OK",
+ confirmButtonText: $.t('general.ok'),
customClass: {
confirmButton: 'btn btn-primary'
}
@@ -90,13 +88,17 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
try {
lastModified = f.lastModified;
} catch (e) {
- console.log("unable to get last modified time from file: " + e.message);
+ console.error("unable to get last modified time from file: " + e.message);
lastModified = "";
}
let uploadTxt = f.name;
if (files.length > 1){
- uploadTxt = `Upload ${index+1}/${files.length}: ${uploadTxt}`;
+ uploadTxt = $.t('fs.uploading', {
+ idx: index + 1,
+ total: files.length,
+ name: uploadTxt
+ });
}
$('#loading_message').text(uploadTxt);
@@ -123,18 +125,23 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
success++;
uploadFile();
}).catch(function (error) {
- let errorMessage = "Error uploading files";
+ let errorMessage;
if (error && error.response) {
- if (error.response.data.message) {
- errorMessage = error.response.data.message;
- }
- if (error.response.data.error) {
- errorMessage += ": " + error.response.data.error;
+ switch (error.response.status) {
+ case 403:
+ errorMessage = "fs.upload.err_403";
+ break;
+ case 429:
+ errorMessage = "fs.upload.err_429";
+ break;
}
}
+ if (!errorMessage){
+ errorMessage = "fs.upload.err_generic";
+ }
index++;
has_errors = true;
- $('#errorTxt').text(errorMessage);
+ setI18NData($('#errorTxt'), errorMessage);
$('#errorMsg').removeClass("d-none");
uploadFile();
});
diff --git a/templates/webclient/twofactor-recovery.html b/templates/webclient/twofactor-recovery.html
index 09025e48..4db0c29b 100644
--- a/templates/webclient/twofactor-recovery.html
+++ b/templates/webclient/twofactor-recovery.html
@@ -15,8 +15,6 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
-->
{{- template "baselogin" .}}
-{{- define "title"}}{{.Title}}{{- end}}
-
{{- define "content"}}