simplify settings copy

no need for fresh/expired concepts, just expired is enough
This commit is contained in:
codl 2017-08-08 16:00:02 +02:00
parent ac7a93dee3
commit 891f584dac
No known key found for this signature in database
GPG Key ID: 6CD7C8891ED1233A
1 changed files with 10 additions and 11 deletions

View File

@ -31,10 +31,10 @@
</section> </section>
<section> <section>
<h2>Settings</h2> <h2>Your expiration rules</h2>
{% if request.args.get('settings_saved') != None %} {% if request.args.get('settings_saved') != None %}
<div class='banner success'>Settings saved successfully</div> <div class='banner success'>Rules saved successfully</div>
{% endif %} {% endif %}
{% if settings_error %} {% if settings_error %}
@ -42,28 +42,27 @@
{% endif %} {% endif %}
<form action='{{url_for("settings")}}' method='post' enctype='multipart/form-data'> <form action='{{url_for("settings")}}' method='post' enctype='multipart/form-data'>
<p>Posts that are less than <p>Posts that are over
{{interval_input(g.viewer.account, 'policy_keep_younger', scales)}} {{interval_input(g.viewer.account, 'policy_keep_younger', scales)}}
old are considered fresh old and are not one of your
</p>
<p>Your latest
<input type=number name=policy_keep_latest min=0 step=1 style='max-width:8ch' value={{g.viewer.account.policy_keep_latest}}> <input type=number name=policy_keep_latest min=0 step=1 style='max-width:8ch' value={{g.viewer.account.policy_keep_latest}}>
posts are considered fresh posts will expire
</p> </p>
<p>Posts that you have liked / favourited will stay fresh forever <p>Posts that you have liked / favourited will never expire
<span style='display:inline-block'> <span style='display:inline-block'>
<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=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> <label><input type=radio name=policy_keep_favourites value=false {{ "checked" if not g.viewer.account.policy_keep_favourites }}> No</label>
</span> </span>
</p> </p>
<p>Posts that have media attached will stay fresh forever <p>Posts that have media attached will never expire
<span style='display:inline-block'> <span style='display:inline-block'>
<label><input type=radio name=policy_keep_media value=true {{ "checked" if g.viewer.account.policy_keep_media }}> Yes</label> <label><input type=radio name=policy_keep_media value=true {{ "checked" if g.viewer.account.policy_keep_media }}> Yes</label>
<label><input type=radio name=policy_keep_media value=false {{ "checked" if not g.viewer.account.policy_keep_media }}> No</label> <label><input type=radio name=policy_keep_media value=false {{ "checked" if not g.viewer.account.policy_keep_media }}> No</label>
</span> </span>
</p> </p>
<p>Any post that is not kept fresh by any of these rules is considered expired. One random expired post will be deleted every <p>Every
{{interval_input(g.viewer.account, 'policy_delete_every', scales)}} {{interval_input(g.viewer.account, 'policy_delete_every', scales)}},
one expired post will be picked at random and deleted.
</p> </p>
<input type=submit value='Save settings'> <input type=submit value='Save settings'>
</form> </form>