forget-cancellare-vecchi-toot/templates/settings.html

47 lines
1.9 KiB
HTML

<p><a href="{{url_for('index')}}">&lt; Back</a></p>
<form method='post' enctype='multipart/form-data'>
<h2>Settings</h2>
{% if request.method == 'POST' %}
<h3>Settings saved successfully</h3>
{% endif %}
<p>Delete posts:
<label><input type=radio name=policy_enabled value=true {{ "checked" if g.viewer.account.policy_enabled }}> Enabled</label>
<label><input type=radio name=policy_enabled value=false {{ "checked" if not g.viewer.account.policy_enabled }}> Disabled</label>
</p>
{%- from 'lib/interval.html' import interval_input %}
<p>Delete one post every
{{interval_input(g.viewer.account, 'policy_delete_every', scales)}}
</p>
<p>Keep posts less than
{{interval_input(g.viewer.account, 'policy_keep_younger', scales)}}
old
</p>
<p>Keep my
<input type=number name=policy_keep_latest min=0 step=1 style='max-width:8ch' value={{g.viewer.account.policy_keep_latest}}>
latest posts
</p>
<p>Keep posts that I have favourited
<label><input type=radio name=policy_keep_favourites value=true {{ "checked" if g.viewer.account.policy_keep_favourites }}> Yes</label>
<label><input type=radio name=policy_keep_favourites value=false {{ "checked" if not g.viewer.account.policy_keep_favourites }}> No</label>
</p>
<input type=submit value='Save'>
</form>
{% if g.viewer.account.service == 'twitter' %}
<form action='{{url_for('upload_tweet_archive')}}' method='post' enctype='multipart/form-data'>
<h2>Tweet archive import</h2>
Upload your tweet archive:
<input type="file" name='file'><input type="submit">
</form>
<h3>Recent tweet archive imports</h3>
{% for archive in g.viewer.account.twitter_archives %}
<p>{{archive.created_at}} {{archive.chunks_successful}}/{{archive.chunks}} months successfully imported, {{archive.chunks_failed}} failed</p>
{% else %}
<p>No recent archives found</p>
{% endfor %}
{% endif %}