85 lines
3.2 KiB
HTML
85 lines
3.2 KiB
HTML
{% from 'lib/interval.html' import interval_input -%}
|
|
{% extends 'lib/layout.html' %}
|
|
{% block body -%}
|
|
|
|
<section class=viewer>
|
|
<p>Hello,
|
|
<img class=avatar src="{{g.viewer.account.avatar_url}}"/>
|
|
{{g.viewer.account.display_name}}!
|
|
<a href="{{url_for('logout')}}">Log out</a>
|
|
</p>
|
|
{% set enabled_disabled = "enabled" if g.viewer.account.policy_enabled else "disabled" %}
|
|
<div class="banner {{enabled_disabled}}">Forget is currently {{ enabled_disabled }} on your account.
|
|
{% if g.viewer.account.policy_enabled -%}
|
|
<form action='{{url_for("disable")}}' method='post' enctype='multipart/form-data'>
|
|
<input type='submit' value='Disable'>
|
|
</form>
|
|
{% else -%}
|
|
<form action='{{url_for("enable")}}' method='post' enctype='multipart/form-data'>
|
|
<input type='submit' value='Enable'>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
{% set post_count = g.viewer.account.post_count() %}
|
|
<p>Currently keeping track of {{ post_count }} posts</p>
|
|
{% if g.viewer.account.service == 'twitter'
|
|
and post_count < g.viewer.account.reported_post_count * 3/4
|
|
and g.viewer.account.reported_post_count > 3200 -%}
|
|
<div class='banner warning'>Are we missing some of your posts? Try uploading a tweet archive below</div>
|
|
{% endif %}
|
|
</section>
|
|
|
|
<section>
|
|
<h2>Settings</h2>
|
|
|
|
{% if request.args.get('settings_saved') != None %}
|
|
<div class='banner success'>Settings saved successfully</div>
|
|
{% endif %}
|
|
|
|
<form action='{{url_for("settings")}}' method='post' enctype='multipart/form-data'>
|
|
<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 settings'>
|
|
</form>
|
|
|
|
</section>
|
|
{% if g.viewer.account.service == 'twitter' %}
|
|
<section>
|
|
|
|
<h2>Tweet archive import</h2>
|
|
<p>
|
|
Twitter's API only lets us access up to 3200 of your most recent tweets. If you have more tweets than that, you can request an archive of your tweets from
|
|
<a href="https://twitter.com/settings/account">Twitter's settings page</a>,
|
|
and upload it here.
|
|
</p>
|
|
<form action='{{url_for('upload_tweet_archive')}}' method='post' enctype='multipart/form-data'>
|
|
<input type="file" name='file'><input type="submit" value="Upload">
|
|
</form>
|
|
|
|
{% if g.viewer.account.twitter_archives %}
|
|
<h3 name="recent_archives">Recent archives</h3>
|
|
<ul>
|
|
{% for archive in g.viewer.account.twitter_archives %}
|
|
<li>{{archive.created_at.strftime('%Y-%m-%d %H:%M')}}<br>
|
|
{{archive.chunks_successful}}/{{archive.chunks}} months imported, {{archive.chunks_failed}} failed</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
</section>
|
|
{% endif %}
|
|
|
|
{% endblock %}
|