add https server functionality - befor auth functionality implementation

This commit is contained in:
2025-10-23 11:41:03 +06:00
parent 3e1cb1e078
commit e1bd79db8c
27 changed files with 2164 additions and 97 deletions

View File

@@ -11,6 +11,15 @@ var ExecutePageScriptsTemplate = template.Must(template.New("execute_scripts").P
e.preventDefault();
return false;
}
// Валидация длины полей
const prompt = document.getElementById('prompt').value;
const maxUserMessageLength = {{.MaxUserMessageLength}};
if (prompt.length > maxUserMessageLength) {
alert('Пользовательское сообщение слишком длинное: максимум ' + maxUserMessageLength + ' символов');
e.preventDefault();
return false;
}
this.dataset.submitting = 'true';
const submitBtn = document.getElementById('submitBtn');
const loading = document.getElementById('loading');