Integrate Obfuscator file picker into Contracts
Deploy contracts-flask / validate (push) Canceled after 0s
Deploy contracts-flask / validate (push) Canceled after 0s
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
/**
|
||||
* Форматирует размер файла в человекочитаемый вид.
|
||||
* Используется в renderTable() для колонки "Размер".
|
||||
* Используется в модальном окне документа.
|
||||
*/
|
||||
function formatSize(bytes) {
|
||||
if (!bytes || bytes === 0) return '—';
|
||||
@@ -17,7 +17,7 @@ function formatSize(bytes) {
|
||||
|
||||
/**
|
||||
* Форматирует timestamp в российскую дату + время.
|
||||
* Используется в renderTable() для колонки "Изменён".
|
||||
* Используется в модальном окне документа.
|
||||
*/
|
||||
function formatDate(ts) {
|
||||
if (!ts) return '—';
|
||||
@@ -33,15 +33,8 @@ function formatDate(ts) {
|
||||
* Если очередь опустела — сбрасывает state.contractId.
|
||||
*/
|
||||
function removeFile(i) {
|
||||
state.files.splice(i, 1);
|
||||
if (state.files.length === 0) state.contractId = null;
|
||||
render(state);
|
||||
// Синхронизировать БД с таблицей
|
||||
if (typeof syncDB === 'function') syncDB();
|
||||
// Сбросить прогресс при изменении состава файлов
|
||||
if (typeof resetStepper === 'function') resetStepper('stepUpload');
|
||||
// Разблокировать кнопку классификации при изменении состава файлов
|
||||
if (typeof showClassifyBtn === 'function') showClassifyBtn();
|
||||
var file = state.files[i];
|
||||
if (file && filePicker) filePicker.remove(file.pickerId);
|
||||
}
|
||||
window.removeFile = removeFile;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user