2017-08-03 16:05:28 +02:00
{% from 'lib/interval.html' import interval_input -%}
{% extends 'lib/layout.html' %}
2017-09-01 02:35:33 +02:00
2017-08-12 01:04:22 +02:00
{% block scripts %}
{% endblock %}
2017-09-01 02:35:33 +02:00
2017-08-03 16:05:28 +02:00
{% block body -%}
< section class = viewer >
2017-09-17 12:29:49 +02:00
{% include "lib/greet.html" %}
2017-08-03 16:05:28 +02:00
< / p >
2017-09-02 19:47:18 +02:00
{% if g.viewer.account.reason %}
< div class = "banner warning" data-reason >
{{ g.viewer.account.reason }}
2017-09-03 00:51:54 +02:00
< form class = 'btn-group right' action = '{{url_for("dismiss")}}' method = 'post' enctype = 'multipart/form-data' >
< input class = 'btn dismiss' type = 'submit' value = 'Got it' >
< input type = 'hidden' name = 'csrf-token' value = '{{g.viewer.csrf_token}}' >
< / form >
< div class = 'clearfix' > < / div >
2017-09-02 19:47:18 +02:00
< / div >
{% endif %}
2017-08-31 18:59:09 +02:00
< div class = 'main-banner container' >
{% set enabled_disabled = "enabled" if g.viewer.account.policy_enabled else "disabled" %}
2017-08-31 21:56:17 +02:00
< div class = "banner {{enabled_disabled}}" > Forget is currently
{% if g.viewer.account.policy_enabled -%}
< b > enabled< / b >
{% else -%}
disabled
{% endif %}
on your account.
2017-08-31 18:59:09 +02:00
{% if g.viewer.account.policy_enabled -%}
< form action = '{{url_for("disable")}}' method = 'post' enctype = 'multipart/form-data' >
< input type = 'submit' value = 'Disable' >
{% else -%}
< form action = '{{url_for("enable")}}' method = 'post' enctype = 'multipart/form-data' >
< input type = 'submit' value = 'Enable' >
{% endif %}
< input type = 'hidden' name = 'csrf-token' value = '{{g.viewer.csrf_token}}' >
< / form >
< / div >
2017-08-03 16:05:28 +02:00
< / div >
2017-08-03 20:01:06 +02:00
{% set post_count = g.viewer.account.post_count() %}
2017-08-12 01:52:33 +02:00
< p > Currently keeping track of < span id = "post-count" > {{ post_count }}< / span > of your posts, roughly < span id = "eligible-estimate" > {{ g.viewer.account.estimate_eligible_for_delete() }}< / span > of which currently match your expiration rules.< / p >
2017-08-03 20:01:06 +02:00
{% if g.viewer.account.service == 'twitter'
2017-08-04 01:51:17 +02:00
and g.viewer.account.reported_post_count
2017-08-03 20:01:06 +02:00
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 %}
2017-08-03 16:05:28 +02:00
< / section >
2017-08-12 01:04:22 +02:00
< section id = 'settings-section' >
< h2 id = "settings-title" > Your expiration rules< / h2 >
2017-08-03 16:05:28 +02:00
{% if request.args.get('settings_saved') != None %}
2017-08-08 16:00:02 +02:00
< div class = 'banner success' > Rules saved successfully< / div >
2017-08-03 16:05:28 +02:00
{% endif %}
2017-08-07 16:26:25 +02:00
{% if settings_error %}
< div class = 'banner error' > Something went wrong trying to save your settings. Please try again later.< / div >
{% endif %}
2017-08-12 01:04:22 +02:00
< form name = 'settings' action = '{{url_for("settings")}}' method = 'post' enctype = 'multipart/form-data' >
2017-08-08 16:00:02 +02:00
< p > Posts that are over
2017-08-03 16:05:28 +02:00
{{interval_input(g.viewer.account, 'policy_keep_younger', scales)}}
2017-08-08 16:00:02 +02:00
old and are not one of your
2017-08-03 16:05:28 +02:00
< input type = number name = policy_keep_latest min = 0 step = 1 style = 'max-width:8ch' value = {{g.viewer.account.policy_keep_latest}} >
2017-08-09 08:38:56 +02:00
most recent posts will expire
2017-08-03 16:05:28 +02:00
< / p >
2018-01-03 18:00:59 +01:00
< p > Keep
2017-12-14 16:24:28 +01:00
< span class = "radiostrip" >
2018-01-03 18:00:59 +01:00
< input type = radio name = policy_keep_favourites value = keeponly id = policy_keep_favourites_keeponly { { " checked " if g . viewer . account . policy_keep_favourites = = ' keeponly ' } } >
< label for = policy_keep_favourites_keeponly > favourited posts< / label >
< input type = radio name = policy_keep_favourites value = deleteonly id = policy_keep_favourites_deleteonly { { " checked " if g . viewer . account . policy_keep_favourites = = ' deleteonly ' } } >
< label for = policy_keep_favourites_deleteonly > non-favourited posts< / label >
< input type = radio name = policy_keep_favourites value = none id = policy_keep_favourites_none { { " checked " if g . viewer . account . policy_keep_favourites = = ' none ' } } >
< label for = policy_keep_favourites_none > neither< / label >
2017-08-04 00:59:00 +02:00
< / span >
2017-08-03 16:05:28 +02:00
< / p >
2018-01-03 18:00:59 +01:00
< p > Keep
2017-12-14 16:24:28 +01:00
< span class = "radiostrip" >
2017-12-28 03:02:08 +01:00
< input type = radio name = policy_keep_media value = keeponly id = policy_keep_media_keeponly { { " checked " if g . viewer . account . policy_keep_media = = ' keeponly ' } } >
2018-01-03 18:00:59 +01:00
< label for = policy_keep_media_keeponly > media posts< / label >
2017-12-28 03:02:08 +01:00
< input type = radio name = policy_keep_media value = deleteonly id = policy_keep_media_deleteonly { { " checked " if g . viewer . account . policy_keep_media = = ' deleteonly ' } } >
2018-01-03 18:00:59 +01:00
< label for = policy_keep_media_deleteonly > non-media posts< / label >
2017-12-28 03:02:08 +01:00
< input type = radio name = policy_keep_media value = none id = policy_keep_media_none { { " checked " if g . viewer . account . policy_keep_media = = ' none ' } } >
< label for = policy_keep_media_none > neither< / label >
2017-08-08 15:38:54 +02:00
< / span >
< / p >
2017-08-20 18:17:33 +02:00
{% if g.viewer.account.service == 'mastodon' %}
2017-12-14 16:24:28 +01:00
< p > Keep direct messages
< span class = "radiostrip" >
< input type = radio name = policy_keep_direct value = true id = policy_keep_direct_true { { " checked " if g . viewer . account . policy_keep_direct } } >
< label for = policy_keep_direct_true > Yes< / label >
< input type = radio name = policy_keep_direct value = false id = policy_keep_direct_false { { " checked " if not g . viewer . account . policy_keep_direct } } >
< label for = policy_keep_direct_false > No< / label >
2017-08-20 18:17:33 +02:00
< / span >
< / p >
{% endif %}
2017-08-08 16:00:02 +02:00
< p > Every
{{interval_input(g.viewer.account, 'policy_delete_every', scales)}},
one expired post will be picked at random and deleted.
2017-08-03 21:37:00 +02:00
< / p >
2017-08-03 16:05:28 +02:00
< input type = submit value = 'Save settings' >
2017-08-25 10:50:11 +02:00
< input type = 'hidden' name = 'csrf-token' value = '{{g.viewer.csrf_token}}' >
2017-08-03 16:05:28 +02:00
< / form >
< / section >
2017-09-01 02:35:33 +02:00
< script type = 'text/json' data-viewer >
{{ viewer_json|safe }}
< / script >
< script async src = "{{st('settings.js')}}" > < / script >
2017-08-03 16:05:28 +02:00
{% if g.viewer.account.service == 'twitter' %}
< section >
2017-08-07 15:44:21 +02:00
< h2 id = 'tweet_archive_import' > Tweet archive import< / h2 >
2017-08-03 16:28:27 +02:00
< p >
2017-09-21 21:18:01 +02:00
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 a zip archive of your tweets from
2017-08-03 16:28:27 +02:00
< a href = "https://twitter.com/settings/account" > Twitter's settings page< / a > ,
and upload it here.
< / p >
2017-08-07 15:44:21 +02:00
{% if tweet_archive_failed %}
< div class = "banner error" > The file you uploaded is not a valid tweet archive. No posts have been imported.< / div >
{% endif %}
2017-08-03 16:05:28 +02:00
2017-08-07 15:47:00 +02:00
< form action = '{{url_for(' upload_tweet_archive ' ) } } ' method = 'post' enctype = 'multipart/form-data' >
2017-09-21 21:18:01 +02:00
< input type = "file" name = 'file' accept = 'application/zip,.zip' > < input type = "submit" value = "Upload" >
2017-08-25 10:50:11 +02:00
< input type = 'hidden' name = 'csrf-token' value = '{{g.viewer.csrf_token}}' >
2017-08-07 15:47:00 +02:00
< / form >
2017-08-03 16:05:28 +02:00
{% if g.viewer.account.twitter_archives %}
2017-08-04 01:17:05 +02:00
< h3 id = "recent_archives" > Recent archives< / h3 >
2017-08-03 16:05:28 +02:00
< ul >
{% for archive in g.viewer.account.twitter_archives %}
2017-08-07 15:53:34 +02:00
< li class = "tweet_archive" data-status = "{{archive.status()}}" > {{archive.created_at.strftime('%Y-%m-%d %H:%M')}}< br >
2017-08-07 15:58:08 +02:00
{% if archive.chunks is none %}
2017-08-07 15:53:34 +02:00
Archive could not be opened
2017-08-07 16:00:50 +02:00
{% else %}
{{archive.chunks_successful}}/{{archive.chunks}} months imported, {{archive.chunks_failed}} failed< / li >
2017-08-07 15:53:34 +02:00
{% endif %}
2017-08-03 16:05:28 +02:00
{% endfor %}
< / ul >
{% endif %}
< / section >
{% endif %}
{% endblock %}