Merge branch 'main' into show-2fa-code
This commit is contained in:
commit
1e5a6ec744
23 changed files with 274 additions and 90 deletions
|
@ -11,7 +11,7 @@
|
|||
|
||||
{% block about_content %}
|
||||
{# seven day cache #}
|
||||
{% cache 604800 about_page %}
|
||||
{% cache 604800 about_page_superlatives %}
|
||||
|
||||
{% get_book_superlatives as superlatives %}
|
||||
<section class=" pb-4">
|
||||
|
@ -97,6 +97,7 @@
|
|||
</p>
|
||||
|
||||
</section>
|
||||
{% endcache %}
|
||||
|
||||
<section class="block">
|
||||
<header class="content">
|
||||
|
@ -145,5 +146,4 @@
|
|||
</div>
|
||||
</section>
|
||||
|
||||
{% endcache %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
{% load layout %}
|
||||
{% load i18n %}
|
||||
{% load sass_tags %}
|
||||
{% load static %}
|
||||
<!DOCTYPE html>
|
||||
<html lang="{% get_lang %}">
|
||||
<head>
|
||||
<title>{% block title %}BookWyrm{% endblock %} - {{ site.name }}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="{% static "css/vendor/bulma.min.css" %}">
|
||||
<link rel="stylesheet" href="{% static "css/vendor/icons.css" %}">
|
||||
<link rel="stylesheet" href="{% static "css/bookwyrm.css" %}">
|
||||
<link href="{% sass_src site_theme %}" rel="stylesheet" type="text/css" />
|
||||
|
||||
<base target="_blank">
|
||||
|
||||
|
|
|
@ -8,83 +8,94 @@
|
|||
<div class="block">
|
||||
<h1 class="title">{% trans "Import Books" %}</h1>
|
||||
|
||||
{% if recent_avg_hours or recent_avg_minutes %}
|
||||
<div class="notification">
|
||||
<p>
|
||||
{% if recent_avg_hours %}
|
||||
{% blocktrans trimmed with hours=recent_avg_hours|floatformat:0|intcomma %}
|
||||
On average, recent imports have taken {{ hours }} hours.
|
||||
{% endblocktrans %}
|
||||
{% else %}
|
||||
{% blocktrans trimmed with minutes=recent_avg_minutes|floatformat:0|intcomma %}
|
||||
On average, recent imports have taken {{ minutes }} minutes.
|
||||
{% endblocktrans %}
|
||||
{% if site.imports_enabled %}
|
||||
{% if recent_avg_hours or recent_avg_minutes %}
|
||||
<div class="notification">
|
||||
<p>
|
||||
{% if recent_avg_hours %}
|
||||
{% blocktrans trimmed with hours=recent_avg_hours|floatformat:0|intcomma %}
|
||||
On average, recent imports have taken {{ hours }} hours.
|
||||
{% endblocktrans %}
|
||||
{% else %}
|
||||
{% blocktrans trimmed with minutes=recent_avg_minutes|floatformat:0|intcomma %}
|
||||
On average, recent imports have taken {{ minutes }} minutes.
|
||||
{% endblocktrans %}
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form class="box" name="import" action="/import" method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
|
||||
<div class="columns">
|
||||
<div class="column is-half">
|
||||
<div class="field">
|
||||
<label class="label" for="source">
|
||||
{% trans "Data source:" %}
|
||||
</label>
|
||||
|
||||
<div class="select">
|
||||
<select name="source" id="source" aria-describedby="desc_source">
|
||||
<option value="Goodreads" {% if current == 'Goodreads' %}selected{% endif %}>
|
||||
{% trans "Goodreads (CSV)" %}
|
||||
</option>
|
||||
<option value="Storygraph" {% if current == 'Storygraph' %}selected{% endif %}>
|
||||
{% trans "Storygraph (CSV)" %}
|
||||
</option>
|
||||
<option value="LibraryThing" {% if current == 'LibraryThing' %}selected{% endif %}>
|
||||
{% trans "LibraryThing (TSV)" %}
|
||||
</option>
|
||||
<option value="OpenLibrary" {% if current == 'OpenLibrary' %}selected{% endif %}>
|
||||
{% trans "OpenLibrary (CSV)" %}
|
||||
</option>
|
||||
<option value="Calibre" {% if current == 'Calibre' %}selected{% endif %}>
|
||||
{% trans "Calibre (CSV)" %}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<p class="help" id="desc_source">
|
||||
{% blocktrans trimmed %}
|
||||
You can download your Goodreads data from the
|
||||
<a href="https://www.goodreads.com/review/import" target="_blank" rel="nofollow noopener noreferrer">Import/Export page</a>
|
||||
of your Goodreads account.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label class="label" for="id_csv_file">{% trans "Data file:" %}</label>
|
||||
{{ import_form.csv_file }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="column is-half">
|
||||
<div class="field">
|
||||
<label class="label">
|
||||
<input type="checkbox" name="include_reviews" checked> {% trans "Include reviews" %}
|
||||
</label>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="label" for="privacy_import">
|
||||
{% trans "Privacy setting for imported reviews:" %}
|
||||
</label>
|
||||
{% include 'snippets/privacy_select.html' with no_label=True privacy_uuid="import" %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="button is-primary" type="submit">{% trans "Import" %}</button>
|
||||
</form>
|
||||
{% else %}
|
||||
<div class="box notification has-text-centered is-warning m-6 content">
|
||||
<p class="mt-5">
|
||||
<span class="icon icon-warning is-size-2" aria-hidden="true"></span>
|
||||
</p>
|
||||
<p class="mb-5">
|
||||
{% trans "Imports are temporarily disabled; thank you for your patience." %}
|
||||
</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form class="box" name="import" action="/import" method="post" enctype="multipart/form-data">
|
||||
{% csrf_token %}
|
||||
|
||||
<div class="columns">
|
||||
<div class="column is-half">
|
||||
<div class="field">
|
||||
<label class="label" for="source">
|
||||
{% trans "Data source:" %}
|
||||
</label>
|
||||
|
||||
<div class="select">
|
||||
<select name="source" id="source" aria-describedby="desc_source">
|
||||
<option value="Goodreads" {% if current == 'Goodreads' %}selected{% endif %}>
|
||||
{% trans "Goodreads (CSV)" %}
|
||||
</option>
|
||||
<option value="Storygraph" {% if current == 'Storygraph' %}selected{% endif %}>
|
||||
{% trans "Storygraph (CSV)" %}
|
||||
</option>
|
||||
<option value="LibraryThing" {% if current == 'LibraryThing' %}selected{% endif %}>
|
||||
{% trans "LibraryThing (TSV)" %}
|
||||
</option>
|
||||
<option value="OpenLibrary" {% if current == 'OpenLibrary' %}selected{% endif %}>
|
||||
{% trans "OpenLibrary (CSV)" %}
|
||||
</option>
|
||||
<option value="Calibre" {% if current == 'Calibre' %}selected{% endif %}>
|
||||
{% trans "Calibre (CSV)" %}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<p class="help" id="desc_source">
|
||||
{% blocktrans trimmed %}
|
||||
You can download your Goodreads data from the
|
||||
<a href="https://www.goodreads.com/review/import" target="_blank" rel="nofollow noopener noreferrer">Import/Export page</a>
|
||||
of your Goodreads account.
|
||||
{% endblocktrans %}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label class="label" for="id_csv_file">{% trans "Data file:" %}</label>
|
||||
{{ import_form.csv_file }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="column is-half">
|
||||
<div class="field">
|
||||
<label class="label">
|
||||
<input type="checkbox" name="include_reviews" checked> {% trans "Include reviews" %}
|
||||
</label>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label class="label" for="privacy_import">
|
||||
{% trans "Privacy setting for imported reviews:" %}
|
||||
</label>
|
||||
{% include 'snippets/privacy_select.html' with no_label=True privacy_uuid="import" %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="button is-primary" type="submit">{% trans "Import" %}</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="content block">
|
||||
|
|
|
@ -5,7 +5,9 @@
|
|||
{% load group_tags %}
|
||||
{% load markdown %}
|
||||
|
||||
{% block title %}{% blocktrans with list_name=list.name owner=list.user.display_name %}{{ list_name }}, a list by {{owner}}{% endblocktrans %}{% endblock title %}
|
||||
{% block title %}{% blocktrans trimmed with list_name=list.name owner=list.user.display_name %}
|
||||
{{ list_name }}, a list by {{owner}}
|
||||
{% endblocktrans %}{% endblock title %}
|
||||
|
||||
{% block content %}
|
||||
<div class="mt-3">
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
<p>{% trans "Scan the QR code with your authentication app and then enter the code from your app below to confirm your app is set up." %}</p>
|
||||
<div class="columns">
|
||||
<section class="column is-narrow">
|
||||
<figure class="m-4">{{ qrcode | safe }}</figure>
|
||||
<figure class="m-4" id="qrcode">{{ qrcode | safe }}</figure>
|
||||
<details class="details-panel box">
|
||||
<summary>
|
||||
<span role="heading" aria-level="3" class="title is-6">
|
||||
|
|
|
@ -11,6 +11,54 @@
|
|||
|
||||
{% block panel %}
|
||||
|
||||
<div class="block">
|
||||
{% if site.imports_enabled %}
|
||||
<details class="details-panel box">
|
||||
<summary>
|
||||
<span role="heading" aria-level="2" class="title is-6">
|
||||
{% trans "Disable starting new imports" %}
|
||||
</span>
|
||||
<span class="details-close icon icon-x" aria-hidden="true"></span>
|
||||
</summary>
|
||||
<form
|
||||
name="disable-imports"
|
||||
id="disable-imports"
|
||||
method="POST"
|
||||
action="{% url 'settings-imports-disable' %}"
|
||||
>
|
||||
<div class="notification">
|
||||
{% trans "This is only intended to be used when things have gone very wrong with imports and you need to pause the feature while addressing issues." %}
|
||||
{% trans "While imports are disabled, users will not be allowed to start new imports, but existing imports will not be effected." %}
|
||||
</div>
|
||||
{% csrf_token %}
|
||||
<div class="control">
|
||||
<button type="submit" class="button is-danger">
|
||||
{% trans "Disable imports" %}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</details>
|
||||
{% else %}
|
||||
<form
|
||||
name="enable-imports"
|
||||
id="enable-imports"
|
||||
method="POST"
|
||||
action="{% url 'settings-imports-enable' %}"
|
||||
class="box"
|
||||
>
|
||||
<div class="notification is-danger is-light">
|
||||
{% trans "Users are currently unable to start new imports" %}
|
||||
</div>
|
||||
{% csrf_token %}
|
||||
<div class="control">
|
||||
<button type="submit" class="button is-success">
|
||||
{% trans "Enable imports" %}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
<div class="block">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
</div>
|
||||
<div class="column is-2">
|
||||
<p>
|
||||
<a href ="{% url 'privacy' %}">{% trans "Code of Conduct" %}</a>
|
||||
<a href ="{% url 'conduct' %}">{% trans "Code of Conduct" %}</a>
|
||||
</p>
|
||||
<p>
|
||||
<a href ="{% url 'privacy' %}">{% trans "Privacy Policy" %}</a>
|
||||
|
|
|
@ -64,12 +64,14 @@
|
|||
<div>
|
||||
<div class="columns is-mobile">
|
||||
<h2 class="title column">{% trans "User Activity" %}</h2>
|
||||
{% if user.local %}
|
||||
<div class="column is-narrow">
|
||||
<a target="_blank" href="{{ user.local_path }}/rss" rel="nofollow noopener noreferrer">
|
||||
<span class="icon icon-rss" aria-hidden="true"></span>
|
||||
<span class="is-hidden-mobile">{% trans "RSS feed" %}</span>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% for activity in activities %}
|
||||
<div class="block" id="feed_{{ activity.id }}">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue