50 lines
2.4 KiB
HTML
50 lines
2.4 KiB
HTML
<!doctype html>
|
|
<html lang="ru">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>Upload Platform {{ version }}</title>
|
|
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
|
</head>
|
|
<body>
|
|
<main class="page">
|
|
<header>
|
|
<p class="eyebrow">FILE INTAKE / {{ version }}</p>
|
|
<h1>Загрузка документов</h1>
|
|
<p class="lede">Выберите отдельные файлы или целую папку. Архивы будут раскрыты автоматически.</p>
|
|
</header>
|
|
<section class="toolbar" aria-label="Выбор файлов">
|
|
<input id="file-input" type="file" multiple hidden>
|
|
<input id="folder-input" type="file" webkitdirectory directory multiple hidden>
|
|
<button id="files-btn" type="button">Выбрать файлы</button>
|
|
<button id="folder-btn" type="button" class="secondary">Выбрать папку</button>
|
|
<button id="clear-btn" type="button" class="quiet">Очистить</button>
|
|
</section>
|
|
<p id="status" class="status" role="status"></p>
|
|
<div class="table-wrap">
|
|
<table>
|
|
<thead><tr><th>Путь</th><th>Размер</th><th>Статус</th><th></th></tr></thead>
|
|
<tbody id="table-body"></tbody>
|
|
</table>
|
|
</div>
|
|
<p id="count" class="count"></p>
|
|
</main>
|
|
<script src="{{ url_for('static', filename='vendor/fflate.min.js') }}"></script>
|
|
<script type="module">
|
|
import { initUploadTable } from "/upload-frontend/table/init_upload_table.js";
|
|
|
|
const cfg = {{ config|tojson }};
|
|
const table = initUploadTable({
|
|
...cfg,
|
|
fileInputEl: document.querySelector('#file-input'),
|
|
folderInputEl: document.querySelector('#folder-input'),
|
|
tableBodyEl: document.querySelector('#table-body'),
|
|
countEl: document.querySelector('#count'),
|
|
});
|
|
const status = document.querySelector('#status');
|
|
document.querySelector('#files-btn').onclick = () => table.pickFiles();
|
|
document.querySelector('#folder-btn').onclick = () => table.pickFolder();
|
|
document.querySelector('#clear-btn').onclick = () => table.clear();
|
|
</script>
|
|
</body>
|
|
</html> |