WebClient: add support for more languages to the editor

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino 2023-11-18 14:17:28 +01:00
parent 271d958acf
commit 59bdd4bc4e
No known key found for this signature in database
GPG key ID: 935D2952DEC4EECF
3 changed files with 6 additions and 3 deletions

View file

@ -184,7 +184,7 @@ const (
MaxRestoreSize = 20 * 1048576 // 20 MB MaxRestoreSize = 20 * 1048576 // 20 MB
maxRequestSize = 1048576 // 1MB maxRequestSize = 1048576 // 1MB
maxLoginBodySize = 262144 // 256 KB maxLoginBodySize = 262144 // 256 KB
httpdMaxEditFileSize = 1048576 // 1 MB httpdMaxEditFileSize = 2 * 1048576 // 2 MB
maxMultipartMem = 10 * 1048576 // 10 MB maxMultipartMem = 10 * 1048576 // 10 MB
osWindows = "windows" osWindows = "windows"
otpHeaderCode = "X-SFTPGO-OTP" otpHeaderCode = "X-SFTPGO-OTP"

File diff suppressed because one or more lines are too long

View file

@ -150,8 +150,11 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
//{{- end}} //{{- end}}
KTUtil.onDOMContentLoaded(function () { KTUtil.onDOMContentLoaded(function () {
let filename = "{{.Name}}";
let extension = filename.slice((filename.lastIndexOf(".") - 1 >>> 0) + 2).toLowerCase();
let options = { let options = {
oneDark: KTThemeMode.getMode() == "dark" oneDark: KTThemeMode.getMode() == "dark",
fileExt: extension
}; };
//{{- if .ReadOnly}} //{{- if .ReadOnly}}
options.readOnly = true; options.readOnly = true;