38 lines
1.3 KiB
HTML
38 lines
1.3 KiB
HTML
{% extends "base.html" %}
|
|
{% block content %}
|
|
<h1>Vault</h1>
|
|
<p class="muted">Your identity documents, encrypted at rest with a key generated on this machine.</p>
|
|
|
|
<form method="post" action="{{ url_for('vault_upload') }}" enctype="multipart/form-data" class="form">
|
|
<label>Upload document (20 MB max)
|
|
<input type="file" name="file" required>
|
|
</label>
|
|
<button type="submit" class="btn primary">Encrypt & store</button>
|
|
</form>
|
|
|
|
{% if docs %}
|
|
<table class="table">
|
|
<thead><tr><th>File</th><th>Type</th><th>SHA-256</th><th>Uploaded</th><th></th></tr></thead>
|
|
<tbody>
|
|
{% for d in docs %}
|
|
<tr>
|
|
<td>{{ d['filename'] }}</td>
|
|
<td>{{ d['mime'] }}</td>
|
|
<td class="mono">{{ d['sha256'][:16] }}…</td>
|
|
<td>{{ d['uploaded_at'] }}</td>
|
|
<td class="row-actions">
|
|
<a class="btn small" href="{{ url_for('vault_download', doc_id=d['id']) }}">Download</a>
|
|
<form method="post" action="{{ url_for('vault_delete', doc_id=d['id']) }}" class="inline"
|
|
onsubmit="return confirm('Delete this document?');">
|
|
<button type="submit" class="btn small danger">Delete</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% else %}
|
|
<p class="muted">No documents stored yet.</p>
|
|
{% endif %}
|
|
{% endblock %}
|