mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-06 06:38:03 -05:00
Merge branch 'develop' into feature/keywords-rework
# Conflicts: # cookbook/static/vue/js/chunk-vendors.js # cookbook/static/vue/js/import_response_view.js # cookbook/static/vue/js/offline_view.js # cookbook/static/vue/js/recipe_search_view.js # cookbook/static/vue/js/recipe_view.js # cookbook/static/vue/js/supermarket_view.js # cookbook/static/vue/js/user_file_view.js # cookbook/templates/sw.js # cookbook/views/views.py # vue/src/components/RecipeCard.vue # vue/src/locales/en.json
This commit is contained in:
@@ -6,6 +6,14 @@
|
||||
{% block title %}{% trans "E-mail Addresses" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{% url 'view_settings' %}">{% trans 'Settings' %}</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans 'Email' %}</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<h3>{% trans "E-mail Addresses" %}</h3>
|
||||
{% if user.emailaddress_set.all %}
|
||||
<p>{% trans 'The following e-mail addresses are associated with your account:' %}</p>
|
||||
|
||||
@@ -44,13 +44,13 @@
|
||||
|
||||
{% if socialaccount_providers %}
|
||||
<div class="row" style="margin-top: 2vh">
|
||||
<div class="col-6 offset-3">
|
||||
<div class="col-sm-12 col-lg-6 col-md-6 offset-lg-3 offset-md-3">
|
||||
<h5>{% trans "Social Login" %}</h5>
|
||||
<span>{% trans 'You can use any of the following providers to sign in.' %}</span>
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
<ul class="socialaccount_providers">
|
||||
<ul class="socialaccount_providers list-unstyled">
|
||||
{% include "socialaccount/snippets/provider_list.html" with process="login" %}
|
||||
</ul>
|
||||
|
||||
|
||||
24
cookbook/templates/account/password_change.html
Normal file
24
cookbook/templates/account/password_change.html
Normal file
@@ -0,0 +1,24 @@
|
||||
{% extends "base.html" %}
|
||||
{% load crispy_forms_filters %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_title %}{% trans "Change Password" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{% url 'view_settings' %}">{% trans 'Settings' %}</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans 'Password' %}</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<h1>{% trans "Change Password" %}</h1>
|
||||
|
||||
<form method="POST" action="{% url 'account_change_password' %}" class="password_change">
|
||||
{% csrf_token %}
|
||||
{{ form | crispy }}
|
||||
<button type="submit" name="action" class="btn btn-success">{% trans "Change Password" %}</button>
|
||||
<a href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a>
|
||||
</form>
|
||||
{% endblock %}
|
||||
23
cookbook/templates/account/password_set.html
Normal file
23
cookbook/templates/account/password_set.html
Normal file
@@ -0,0 +1,23 @@
|
||||
{% extends "base.html" %}
|
||||
{% load crispy_forms_filters %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_title %}{% trans "Set Password" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{% url 'view_settings' %}">{% trans 'Settings' %}</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans 'Password' %}</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<h1>{% trans "Set Password" %}</h1>
|
||||
|
||||
<form method="POST" action="{% url 'account_set_password' %}" class="password_set">
|
||||
{% csrf_token %}
|
||||
{{ form | crispy }}
|
||||
<input type="submit" class="btn btn-primary" name="action" value="{% trans 'Set Password' %}"/>
|
||||
</form>
|
||||
{% endblock %}
|
||||
@@ -67,9 +67,9 @@
|
||||
</button>
|
||||
|
||||
{% if not request.user.is_authenticated or request.user.userpreference.theme == request.user.userpreference.TANDOOR %}
|
||||
<a class="navbar-brand p-0 me-2 justify-content-center" href="/" aria-label="Tandoor">
|
||||
<img class="brand-icon" src="{% static 'assets/brand_logo.png' %}" alt="" style="height: 5vh;">
|
||||
</a>
|
||||
<a class="navbar-brand p-0 me-2 justify-content-center" href="/" aria-label="Tandoor">
|
||||
<img class="brand-icon" src="{% static 'assets/brand_logo.png' %}" alt="" style="height: 5vh;">
|
||||
</a>
|
||||
{% endif %}
|
||||
<div class="collapse navbar-collapse" id="navbarText">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
@@ -152,12 +152,18 @@
|
||||
<a class="dropdown-item" href="{% url 'view_history' %}"><i
|
||||
class="fas fa-history"></i> {% trans 'History' %}</a>
|
||||
{% if request.user == request.space.created_by %}
|
||||
<a class="dropdown-item" href="{% url 'view_space' %}"><i class="fas fa-server fa-fw"></i> {% trans 'Space Settings' %}</a>
|
||||
<a class="dropdown-item" href="{% url 'view_space' %}"><i
|
||||
class="fas fa-server fa-fw"></i> {% trans 'Space Settings' %}</a>
|
||||
{% endif %}
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="{% url 'view_system' %}"><i
|
||||
class="fas fa-server fa-fw"></i> {% trans 'System' %}</a>
|
||||
<a class="dropdown-item" href="{% url 'admin:index' %}"><i
|
||||
class="fas fa-user-shield fa-fw"></i> {% trans 'Admin' %}</a>
|
||||
{% if user.is_superuser %}
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item" href="{% url 'view_system' %}"><i
|
||||
class="fas fa-server fa-fw"></i> {% trans 'System' %}</a>
|
||||
<a class="dropdown-item" href="{% url 'list_keyword' %}"><i
|
||||
class="fas fa-tags"></i> {% trans 'Keywords' %}</a>
|
||||
<a class="dropdown-item" href="{% url 'admin:index' %}"><i
|
||||
class="fas fa-user-shield fa-fw"></i> {% trans 'Admin' %}</a>
|
||||
{% endif %}
|
||||
@@ -192,10 +198,7 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
<div class="container-fluid" id="id_base_container">
|
||||
<div class="container-fluid mt-2 mt-md-5 mt-xl-5 mt-lg-5" id="id_base_container">
|
||||
<div class="row">
|
||||
<div class="col-xl-2 d-none d-xl-block">
|
||||
{% block content_xl_left %}
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
<img src="{% if recipe.image %}{{ recipe.image.url }}{% endif %}" id="id_image"
|
||||
class="img img-fluid img-responsive"
|
||||
style="max-height: 20vh">
|
||||
<input type="file" @change="imageChanged">
|
||||
<input class="mt-2" type="file" @change="imageChanged">
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<label for="id_name"> {% trans 'Preparation Time' %}</label>
|
||||
|
||||
@@ -701,10 +701,10 @@
|
||||
let first = true
|
||||
for (let se of this.shopping_list) {
|
||||
if (first) {
|
||||
url += `?r=[${se.recipe},${se.servings}]`
|
||||
url += `?r=[${se.recipe.id},${se.servings}]`
|
||||
first = false
|
||||
} else {
|
||||
url += `&r=[${se.recipe},${se.servings}]`
|
||||
url += `&r=[${se.recipe.id},${se.servings}]`
|
||||
}
|
||||
}
|
||||
return url
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h3>
|
||||
{% trans 'Settings' %}
|
||||
</h3>
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{% url 'view_settings' %}">{% trans 'Settings' %}</a></li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<!-- Nav tabs -->
|
||||
<ul class="nav nav-tabs" id="myTab" role="tablist" style="margin-bottom: 2vh">
|
||||
@@ -56,23 +58,12 @@
|
||||
class="fas fa-save"></i> {% trans 'Save' %}</button>
|
||||
</form>
|
||||
|
||||
<h4>{% trans 'Password Settings' %}</h4>
|
||||
<form action="." method="post">
|
||||
{% csrf_token %}
|
||||
{{ password_form|crispy }}
|
||||
<button class="btn btn-success" type="submit" name="password_form"><i
|
||||
class="fas fa-save"></i> {% trans 'Save' %}</button>
|
||||
</form>
|
||||
<h4>{% trans 'Account Settings' %}</h4>
|
||||
|
||||
<h4>{% trans 'Email Settings' %}</h4>
|
||||
<a href="{% url 'account_email'%}" class="btn btn-primary">{% trans 'Emails' %}</a>
|
||||
<a href="{% url 'account_change_password'%}" class="btn btn-primary">{% trans 'Password' %}</a>
|
||||
|
||||
<a href="{% url 'account_email'%}" class="btn btn-primary">{% trans 'Manage Email Settings' %}</a>
|
||||
|
||||
<br/><br/>
|
||||
|
||||
<h4>{% trans 'Social' %}</h4>
|
||||
|
||||
<a href="{% url 'socialaccount_connections' %}" class="btn btn-primary">{% trans 'Manage Social Accounts' %}</a>
|
||||
<a href="{% url 'socialaccount_connections' %}" class="btn btn-primary">{% trans 'Social' %}</a>
|
||||
<br/>
|
||||
<br/>
|
||||
<br/>
|
||||
|
||||
@@ -4,6 +4,14 @@
|
||||
{% block head_title %}{% trans "Account Connections" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{% url 'view_settings' %}">{% trans 'Settings' %}</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page">{% trans 'Social' %}</li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<h3>{% trans "Account Connections" %}</h3>
|
||||
|
||||
{% if form.accounts %}
|
||||
@@ -46,7 +54,7 @@
|
||||
|
||||
<h4>{% trans 'Add a 3rd Party Account' %}</h4>
|
||||
|
||||
<ul class="socialaccount_providers">
|
||||
<ul class="socialaccount_providers list-unstyled">
|
||||
{% include "socialaccount/snippets/provider_list.html" with process="connect" %}
|
||||
</ul>
|
||||
|
||||
|
||||
60
cookbook/templates/socialaccount/signup.html
Normal file
60
cookbook/templates/socialaccount/signup.html
Normal file
@@ -0,0 +1,60 @@
|
||||
{% extends "base.html" %}
|
||||
{% load crispy_forms_filters %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_title %}{% trans "Signup" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{% trans "Sign Up" %}</h1>
|
||||
|
||||
<p>{% blocktrans with provider_name=account.get_provider.name site_name=site.name %}You are about to use your
|
||||
{{ provider_name }} account to login to
|
||||
{{ site_name }}. As a final step, please complete the following form:{% endblocktrans %}</p>
|
||||
|
||||
<form class="signup" id="signup_form" method="post" action="{% url 'socialaccount_signup' %}">
|
||||
{% csrf_token %}
|
||||
{% if redirect_field_value %}
|
||||
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}"/>
|
||||
{% endif %}
|
||||
|
||||
<div class="form-group">
|
||||
{{ form.username |as_crispy_field }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ form.email |as_crispy_field }}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
{{ form.email2 |as_crispy_field }}
|
||||
</div>
|
||||
{% if TERMS_URL != '' or PRIVACY_URL != '' %}
|
||||
<div class="form-group">
|
||||
{{ form.terms |as_crispy_field }}
|
||||
<small>
|
||||
{% trans 'I accept the follwoing' %}
|
||||
{% if TERMS_URL != '' %}
|
||||
<a href="{{ TERMS_URL }}" target="_blank"
|
||||
rel="noreferrer nofollow">{% trans 'Terms and Conditions' %}</a>
|
||||
{% endif %}
|
||||
{% if TERMS_URL != '' or PRIVACY_URL != '' %}
|
||||
{% trans 'and' %}
|
||||
{% endif %}
|
||||
{% if PRIVACY_URL != '' %}
|
||||
<a href="{{ PRIVACY_URL }}" target="_blank"
|
||||
rel="noreferrer nofollow">{% trans 'Privacy Policy' %}</a>
|
||||
{% endif %}
|
||||
</small>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if CAPTCHA_ENABLED %}
|
||||
<div class="form-group">
|
||||
{{ form.captcha.errors }}
|
||||
{{ form.captcha }}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<button type="submit" class="btn btn-primary">{% trans "Sign Up" %} »</button>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
133
cookbook/templates/socialaccount/snippets/provider_list.html
Normal file
133
cookbook/templates/socialaccount/snippets/provider_list.html
Normal file
@@ -0,0 +1,133 @@
|
||||
{% load i18n %}
|
||||
{% load socialaccount %}
|
||||
|
||||
{% get_providers as socialaccount_providers %}
|
||||
|
||||
{% for provider in socialaccount_providers %}
|
||||
{% if provider.id == "openid" %}
|
||||
{% for brand in provider.get_brands %}
|
||||
<li>
|
||||
<a title="{{ brand.name }}"
|
||||
class="socialaccount_provider {{ provider.id }} {{ brand.id }}"
|
||||
href="{% provider_login_url provider.id openid=brand.openid_url process=process %}"
|
||||
>{{ brand.name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<li CLASS="mb-1">
|
||||
{% if provider.id == 'discord' %}
|
||||
<a title="{{ provider.name }}"
|
||||
class="socialaccount_provider {{ provider.id }}"
|
||||
href="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params %}">
|
||||
<button class="btn discord-login-button btn-social"><i
|
||||
class="fab fa-discord"></i> {% trans 'Sign in using' %} Discord
|
||||
</button>
|
||||
</a>
|
||||
{% elif provider.id == 'github' %}
|
||||
<a title="{{ provider.name }}"
|
||||
class="socialaccount_provider {{ provider.id }}"
|
||||
href="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params %}">
|
||||
<button class="btn btn-social btn-github"><i
|
||||
class="fab fa-github"></i> {% trans 'Sign in using' %} Github
|
||||
</button>
|
||||
</a>
|
||||
{% elif provider.id == 'reddit' %}
|
||||
<a title="{{ provider.name }}"
|
||||
class="socialaccount_provider {{ provider.id }}"
|
||||
href="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params %}">
|
||||
<button class="btn btn-social btn-reddit"><i
|
||||
class="fab fa-reddit"></i> {% trans 'Sign in using' %} Reddit
|
||||
</button>
|
||||
</a>
|
||||
{% elif provider.id == 'twitter' %}
|
||||
<a title="{{ provider.name }}"
|
||||
class="socialaccount_provider {{ provider.id }}"
|
||||
href="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params %}">
|
||||
<button class="btn btn-social btn-twitter"><i
|
||||
class="fab fa-twitter"></i> {% trans 'Sign in using' %} Twitter
|
||||
</button>
|
||||
</a>
|
||||
{% elif provider.id == 'dropbox' %}
|
||||
<a title="{{ provider.name }}"
|
||||
class="socialaccount_provider {{ provider.id }}"
|
||||
href="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params %}">
|
||||
<button class="btn btn-social btn-dropbox"><i
|
||||
class="fab fa-dropbox"></i> {% trans 'Sign in using' %} Dropbox
|
||||
</button>
|
||||
</a>
|
||||
{% elif provider.id == 'google' %}
|
||||
<a title="{{ provider.name }}"
|
||||
class="socialaccount_provider {{ provider.id }}"
|
||||
href="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params %}">
|
||||
<button class="btn btn-social btn-google"><i
|
||||
class="fab fa-google"></i> {% trans 'Sign in using' %} Google
|
||||
</button>
|
||||
</a>
|
||||
{% elif provider.id == 'facebook' %}
|
||||
<a title="{{ provider.name }}"
|
||||
class="socialaccount_provider {{ provider.id }}"
|
||||
href="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params %}">
|
||||
<button class="btn btn-social btn-facebook"><i
|
||||
class="fab fa-facebook"></i> {% trans 'Sign in using' %} Facebook
|
||||
</button>
|
||||
</a>
|
||||
{% elif provider.id == 'instagram' %}
|
||||
<a title="{{ provider.name }}"
|
||||
class="socialaccount_provider {{ provider.id }}"
|
||||
href="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params %}">
|
||||
<button class="btn btn-social btn-instagram"><i
|
||||
class="fab fa-instagram"></i> {% trans 'Sign in using' %} Instagram
|
||||
</button>
|
||||
</a>
|
||||
{% elif provider.id == 'flickr' %}
|
||||
<a title="{{ provider.name }}"
|
||||
class="socialaccount_provider {{ provider.id }}"
|
||||
href="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params %}">
|
||||
<button class="btn btn-social btn-flickr"><i
|
||||
class="fab fa-flickr"></i> {% trans 'Sign in using' %} Flickr
|
||||
</button>
|
||||
</a>
|
||||
{% elif provider.id == 'apple' %}
|
||||
<a title="{{ provider.name }}"
|
||||
class="socialaccount_provider {{ provider.id }}"
|
||||
href="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params %}">
|
||||
<button class="btn btn-social btn-apple"><i
|
||||
class="fab fa-apple"></i> {% trans 'Sign in using' %} Apple
|
||||
</button>
|
||||
</a>
|
||||
{% elif provider.id == 'pinterest' %}
|
||||
<a title="{{ provider.name }}"
|
||||
class="socialaccount_provider {{ provider.id }}"
|
||||
href="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params %}">
|
||||
<button class="btn btn-social btn-pinterest"><i
|
||||
class="fab fa-pinterest"></i> {% trans 'Sign in using' %} Pinterest
|
||||
</button>
|
||||
</a>
|
||||
{% elif provider.id == 'windowslive' %}
|
||||
<a title="{{ provider.name }}"
|
||||
class="socialaccount_provider {{ provider.id }}"
|
||||
href="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params %}">
|
||||
<button class="btn btn-social btn-microsoft"><i
|
||||
class="fab fa-microsoft"></i> {% trans 'Sign in using' %} Microsoft Live
|
||||
</button>
|
||||
</a>
|
||||
{% elif provider.id == 'yahoo' %}
|
||||
<a title="{{ provider.name }}"
|
||||
class="socialaccount_provider {{ provider.id }}"
|
||||
href="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params %}">
|
||||
<button class="btn btn-social btn-yahoo"><i
|
||||
class="fab fa-yahoo"></i> {% trans 'Sign in using' %} Yahoo
|
||||
</button>
|
||||
</a>
|
||||
{% else %}
|
||||
<a title="{{ provider.name }}"
|
||||
class="socialaccount_provider {{ provider.id }}"
|
||||
href="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params %}">
|
||||
<button class="btn btn-social btn-success"><i
|
||||
class="fas fa-sign-in-alt"></i> {% trans 'Sign in using' %} {{ provider.name }}
|
||||
</button>
|
||||
</a>
|
||||
{% endif %}
|
||||
</li>
|
||||
|
||||
{% endfor %}
|
||||
@@ -14,7 +14,13 @@
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h3>{{ request.space.name }} <small>{% if HOSTED %}
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="{% url 'view_space' %}">{% trans 'Space Settings' %}</a></li>
|
||||
</ol>
|
||||
</nav>
|
||||
|
||||
<h3><span class="text-muted">{% trans 'Space:' %}</span> {{ request.space.name }} <small>{% if HOSTED %}
|
||||
<a href="https://tandoor.dev/manage">{% trans 'Manage Subscription' %}</a>{% endif %}</small></h3>
|
||||
|
||||
<br/>
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user