89 lines
4.2 KiB
HTML
89 lines
4.2 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Data & backups · Steady{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="page-heading">
|
|
<div>
|
|
<p class="eyebrow">Portable and recoverable</p>
|
|
<h1>Data & backups</h1>
|
|
<p>Capture a list, download your data, or restore a Steady backup.</p>
|
|
</div>
|
|
</div>
|
|
|
|
{% if undo_batch %}
|
|
<aside class="undo-banner" aria-labelledby="undo-heading">
|
|
<div>
|
|
<h2 id="undo-heading">Completed tasks were cleared</h2>
|
|
<p>They are safely hidden, not permanently deleted.</p>
|
|
</div>
|
|
<form method="post" action="{{ url_for('tasks.undo_completed_clear', batch_id=undo_batch) }}">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
<button class="button" type="submit">Undo clear</button>
|
|
</form>
|
|
</aside>
|
|
{% endif %}
|
|
|
|
<div class="transfer-grid">
|
|
<section class="transfer-card" aria-labelledby="text-import-heading">
|
|
<h2 id="text-import-heading">Import a task list</h2>
|
|
<p>Upload UTF-8 Markdown or plain text. Each non-empty line becomes a normal-priority task; headings and code blocks are ignored.</p>
|
|
<pre class="format-example"><code># Weekend
|
|
- [ ] Buy groceries
|
|
- [x] Book appointment
|
|
1. Water the plants</code></pre>
|
|
<p class="field__help">Maximum 200 tasks. Checked items import as completed.</p>
|
|
<form method="post" enctype="multipart/form-data" action="{{ url_for('tasks.import_markdown_file') }}">
|
|
{{ markdown_form.hidden_tag() }}
|
|
<div class="field">
|
|
{{ markdown_form.markdown_file.label }}
|
|
{{ markdown_form.markdown_file(accept=".md,.markdown,.txt,text/plain,text/markdown") }}
|
|
</div>
|
|
<div class="check-field">
|
|
{{ markdown_form.confirm(id="markdown-confirm") }} {{ markdown_form.confirm.label(for_="markdown-confirm") }}
|
|
</div>
|
|
{{ markdown_form.submit(class="button", id="markdown-submit") }}
|
|
</form>
|
|
</section>
|
|
|
|
<section class="transfer-card" aria-labelledby="backup-heading">
|
|
<h2 id="backup-heading">Download a backup</h2>
|
|
<p>Export active tasks, subtasks, focus setup, completion history, and preferences as versioned JSON.</p>
|
|
<p class="field__help">Credentials, email, internal IDs, and cleared tasks are never included.</p>
|
|
<a class="button" href="{{ url_for('tasks.export_json') }}">Download JSON backup</a>
|
|
</section>
|
|
|
|
<section class="transfer-card" aria-labelledby="restore-heading">
|
|
<h2 id="restore-heading">Restore a backup</h2>
|
|
<p>Merge a Steady JSON backup into this account. The complete file is validated before anything changes.</p>
|
|
<form method="post" enctype="multipart/form-data" action="{{ url_for('tasks.import_json') }}">
|
|
{{ backup_form.hidden_tag() }}
|
|
<div class="field">
|
|
{{ backup_form.backup_file.label }}
|
|
{{ backup_form.backup_file(accept=".json,application/json") }}
|
|
</div>
|
|
<div class="check-field check-field--warning">
|
|
{{ backup_form.replace_existing(id="backup-replace") }} {{ backup_form.replace_existing.label(for_="backup-replace") }}
|
|
<small>Replacement removes this account's current tasks only after the backup passes validation.</small>
|
|
</div>
|
|
<div class="check-field">
|
|
{{ backup_form.confirm(id="backup-confirm") }} {{ backup_form.confirm.label(for_="backup-confirm") }}
|
|
</div>
|
|
{{ backup_form.submit(class="button", id="backup-submit") }}
|
|
</form>
|
|
</section>
|
|
|
|
<section class="transfer-card" aria-labelledby="clear-heading">
|
|
<h2 id="clear-heading">Clear completed tasks</h2>
|
|
<p>Hide completed work from active views. Your streak history remains intact.</p>
|
|
<details>
|
|
<summary>Show clear action</summary>
|
|
<p>You will receive an undo action immediately afterward.</p>
|
|
<form method="post" action="{{ url_for('tasks.clear_completed') }}">
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
|
<button class="button button--quiet" type="submit">Clear completed tasks</button>
|
|
</form>
|
|
</details>
|
|
</section>
|
|
</div>
|
|
{% endblock %}
|