Add import/export

This commit is contained in:
Ettore Di Giacinto
2024-04-14 00:05:19 +02:00
parent 54de6221d1
commit 7c0f615952
5 changed files with 158 additions and 5 deletions

View File

@@ -47,7 +47,7 @@
<span class="sr-only">Stop</span>
</th>
<th scope="col" class="px-6 py-3 text-center">
<span class="sr-only">Delete</span>
<span class="sr-only">Settings</span>
</th>
</tr>
</thead>
@@ -79,8 +79,8 @@
</button>
</td>
<td class="px-6 py-4 whitespace-nowrap text-center text-sm font-medium">
<a href="/delete/{{.}}" class="text-red-500 hover:text-red-400">
<i class="fas fa-trash-alt"></i> Delete
<a href="/settings/{{.}}" class="text-indigo-500 hover:text-indigo-400">
<i class="fas fa-cog"></i> Settings
</a>
</td>
</tr>
@@ -92,7 +92,19 @@
</div>
</section>
<footer class="mt-8 text-center">
<!-- Moved the button up for alignment with the table -->
<!-- File Upload Form -->
<div class="section-box">
<form id='form' hx-encoding='multipart/form-data' hx-post='/settings/import'>
<h2>Import</h2>
<label for="file">File:</label>
<input type='file' name='file' id='file'>
<button type="submit">Upload File</button>
<progress id='progress' value='0' max='100'></progress>
</form>
</div>
</footer>
</div>
</body>