2023-09-05 22:35:26 +00:00
{% extends 'preferences/layout.html' %}
{% load i18n %}
2023-11-07 00:04:11 +00:00
{% load utilities %}
2023-09-05 22:35:26 +00:00
2023-12-09 16:18:31 +00:00
{% block title %}{% trans "Export BookWyrm Account" %}{% endblock %}
2023-09-05 22:35:26 +00:00
{% block header %}
2023-12-09 16:18:31 +00:00
{% trans "Export BookWyrm Account" %}
2023-09-05 22:35:26 +00:00
{% endblock %}
{% block panel %}
< div class = "block content" >
2023-11-07 01:09:06 +00:00
< div class = "block content" >
< p > {% trans "You can create an export file here. This will allow you to migrate your data to another BookWyrm account." %}< / p >
< / div >
< div class = "block mx-5 columns" >
{% blocktrans trimmed %}
< div class = "column is-half" >
< h2 class = "is-size-5" > Your file will include:< / h2 >
< ul >
< li > User profile< / li >
< li > Most user settings< / li >
< li > Reading goals< / li >
< li > Shelves< / li >
< li > Reading history< / li >
< li > Book reviews< / li >
< li > Statuses< / li >
< li > Your own lists and saved lists< / li >
< li > Which users you follow and block< / li >
< / ul >
< / div >
< div class = "column is-half" >
< h2 class = "is-size-5" > Your file will not include:< / h2 >
< ul >
< li > Direct messages< / li >
< li > Replies to your statuses< / li >
< li > Groups< / li >
2023-11-13 10:14:03 +00:00
< li > Favorites< / li >
2023-11-07 01:09:06 +00:00
< / ul >
< / div >
{% endblocktrans %}
< / div >
< p class = "block" > {% trans "In your new BookWyrm account can choose what to import: you will not have to import everything that is exported." %}< / p >
2023-12-13 09:55:38 +00:00
< p class = "notification is-warning" >
{% spaceless %}
{% trans "If you wish to migrate any statuses (comments, reviews, or quotes) you must either set the account you are moving to as an < strong > alias< / strong > of this one, or < strong > move< / strong > this account to the new account, before you import your user data." %}
{% endspaceless %}
< / p >
2024-01-16 10:32:13 +00:00
{% if not site.user_exports_enabled %}
< p class = "notification is-danger" >
{% trans "New user exports are currently disabled." %}
< / p >
{% elif next_available %}
2023-10-21 23:49:13 +00:00
< p class = "notification is-warning" >
2023-11-06 03:40:19 +00:00
{% blocktrans trimmed %}
2023-10-21 23:49:13 +00:00
You will be able to create a new export file at {{ next_available }}
{% endblocktrans %}
< / p >
{% else %}
2023-10-15 04:09:19 +00:00
< form name = "export" method = "POST" href = "{% url 'prefs-user-export' %}" >
{% csrf_token %}
< button type = "submit" class = "button" >
< span class = "icon icon-download" aria-hidden = "true" > < / span >
< span > {% trans "Create user export file" %}< / span >
< / button >
< / form >
2023-10-21 23:49:13 +00:00
{% endif %}
2023-09-05 22:35:26 +00:00
< / div >
< div class = "content block" >
< h2 class = "title" > {% trans "Recent Exports" %}< / h2 >
< p class = "content" >
{% trans "User export files will show 'complete' once ready. This may take a little while. Click the link to download your file." %}
< / p >
< div class = "table-container" >
< table class = "table is-striped is-fullwidth" >
< tr >
< th >
2023-11-06 16:41:36 +00:00
{% trans "Date" %}
2023-09-05 22:35:26 +00:00
< / th >
2023-11-07 00:04:11 +00:00
< th >
2023-09-05 22:35:26 +00:00
{% trans "Status" %}
< / th >
2023-11-07 00:04:11 +00:00
< th colspan = "2" >
{% trans "Size" %}
< / th >
2023-09-05 22:35:26 +00:00
< / tr >
{% if not jobs %}
< tr >
< td colspan = "4" >
< em > {% trans "No recent imports" %}< / em >
< / td >
< / tr >
{% endif %}
{% for job in jobs %}
< tr >
< td > {{ job.updated_date }}< / td >
< td >
< span
2023-10-21 08:43:44 +00:00
{% if job.status == "stopped" or job.status == "failed" %}
2023-09-05 22:35:26 +00:00
class="tag is-danger"
{% elif job.status == "pending" %}
class="tag is-warning"
{% elif job.complete %}
class="tag"
{% else %}
class="tag is-success"
{% endif %}
>
{% if job.status %}
{{ job.status }}
{{ job.status_display }}
{% elif job.complete %}
{% trans "Complete" %}
{% else %}
{% trans "Active" %}
{% endif %}
< / span >
2023-11-06 16:41:36 +00:00
< / td >
2023-11-07 00:04:11 +00:00
< td >
< span > {{ job.export_data|get_file_size }}< / span >
< / td >
2023-11-06 16:41:36 +00:00
< td >
2023-11-06 17:42:58 +00:00
{% if job.complete and not job.status == "stopped" and not job.status == "failed" %}
2023-11-06 16:41:36 +00:00
< p >
< a download = "" href = "/preferences/user-export/{{ job.task_id }}" >
< span class = "icon icon-download" aria-hidden = "true" > < / span >
< span class = "is-hidden-mobile" >
{% trans "Download your export" %}
< / span >
< / a >
< / p >
{% endif %}
2023-09-05 22:35:26 +00:00
< / td >
< / tr >
{% endfor %}
< / table >
< / div >
{% include 'snippets/pagination.html' with page=jobs path=request.path %}
< / div >
{% endblock %}