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" >
< div class = "column is-half" >
2024-02-03 14:51:23 +00:00
< h2 class = "is-size-5" > {% trans "Your file will include:" %}< / h2 >
2023-11-07 01:09:06 +00:00
< ul >
2024-02-03 14:51:23 +00:00
< li > {% trans "User profile" %}< / li >
< li > {% trans "Most user settings" %}< / li >
< li > {% trans "Reading goals" %}< / li >
< li > {% trans "Shelves" %}< / li >
< li > {% trans "Reading history" %}< / li >
< li > {% trans "Book reviews" %}< / li >
< li > {% trans "Statuses" %}< / li >
< li > {% trans "Your own lists and saved lists" %}< / li >
< li > {% trans "Which users you follow and block" %}< / li >
2023-11-07 01:09:06 +00:00
< / ul >
< / div >
< div class = "column is-half" >
2024-02-03 14:51:23 +00:00
< h2 class = "is-size-5" > {% trans "Your file will not include:" %}< / h2 >
2023-11-07 01:09:06 +00:00
< ul >
2024-02-03 14:51:23 +00:00
< li > {% trans "Direct messages" %}< / li >
< li > {% trans "Replies to your statuses" %}< / li >
< li > {% trans "Groups" %}< / li >
< li > {% trans "Favorites" %}< / li >
2023-11-07 01:09:06 +00:00
< / ul >
< / div >
< / 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." %}
2024-01-20 02:19:13 +00:00
{% if perms.bookwyrm.edit_instance_settings %}
2024-02-03 14:51:23 +00:00
< br / >
{% url 'settings-imports' as url %}
{% blocktrans trimmed %}
User exports settings can be changed from < a href = "{{ url }}" > the Imports page< / a > in the Admin dashboard.
2024-01-20 02:19:13 +00:00
{% endblocktrans %}
{% endif%}
2024-01-16 10:32:13 +00:00
< / 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 %}
2024-01-28 04:07:55 +00:00
{% for export in jobs %}
2023-09-05 22:35:26 +00:00
< tr >
2024-01-28 04:07:55 +00:00
< td > {{ export.job.updated_date }}< / td >
2023-09-05 22:35:26 +00:00
< td >
< span
2024-01-28 04:07:55 +00:00
{% if export.job.status == "stopped" or export.job.status == "failed" %}
2023-09-05 22:35:26 +00:00
class="tag is-danger"
2024-01-28 04:07:55 +00:00
{% elif export.job.status == "pending" %}
2023-09-05 22:35:26 +00:00
class="tag is-warning"
2024-01-28 04:07:55 +00:00
{% elif export.job.complete %}
2023-09-05 22:35:26 +00:00
class="tag"
{% else %}
class="tag is-success"
{% endif %}
>
2024-01-28 04:07:55 +00:00
{% if export.job.status %}
{{ export.job.status }}
{{ export.job.status_display }}
{% elif export.job.complete %}
2023-09-05 22:35:26 +00:00
{% 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 >
2024-03-25 17:13:09 +00:00
{% if export.size %}
2024-01-28 04:07:55 +00:00
< span > {{ export.size|get_file_size }}< / span >
2024-03-25 17:13:09 +00:00
{% endif %}
2023-11-07 00:04:11 +00:00
< / td >
2023-11-06 16:41:36 +00:00
< td >
2024-03-24 12:03:47 +00:00
{% if export.url %}
< a href = "{{ export.url }}" >
< span class = "icon icon-download" aria-hidden = "true" > < / span >
< span class = "is-hidden-mobile" >
{% trans "Download your export" %}
< / span >
< / a >
2024-03-25 17:13:09 +00:00
{% elif export.unavailable %}
2024-03-24 12:03:47 +00:00
{% trans "Archive is no longer available" %}
2023-11-06 16:41:36 +00:00
{% 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 %}