recipe links
This commit is contained in:
@@ -53,7 +53,7 @@ class DemoAccountPolicyMiddleware:
|
||||
response = HttpResponse('Demo request limit reached. Try again in a minute.', status=429)
|
||||
response['Retry-After'] = '60'
|
||||
return response
|
||||
forbidden = (path.startswith(('/o/', '/admin/', '/food/settings/tokens/')) or
|
||||
forbidden = (path.startswith(('/o/', '/admin/', '/food/settings/tokens/', '/settings/home-assistant/')) or
|
||||
path == '/settings/notifications/ntfy/test/' or
|
||||
(request.method == 'POST' and path in {
|
||||
'/food/search/openfoodfacts/', '/food/import/openfoodfacts/',
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
{% endif %}<section class="settings-card"><h2>Sick Day Mode</h2><p>Temporarily defer routine work while you recover.</p><form method="post">{% csrf_token %}<input type="hidden" name="section" value="sick-day">{% for field in sick_form %}{% if field.name == 'enabled' %}<div class="settings-switch-row"><label class="settings-switch"><span class="settings-switch__copy"><strong>Enable Sick Day Mode</strong><small>Give routine tasks a rest while you recover.</small></span>{{ field }}<span class="settings-switch__track" aria-hidden="true"></span></label>{{ field.errors }}</div>{% else %}<div class="form-field">{{ field.label_tag }}{{ field }}{% if field.help_text %}<small>{{ field.help_text }}</small>{% endif %}{{ field.errors }}</div>{% endif %}{% endfor %}<button class="button" type="submit">Save Sick Day settings</button></form></section>
|
||||
<section class="settings-card"><h2>Hydration</h2><p>Set your daily fluid goal and how drinks are counted.</p><form method="post">{% csrf_token %}<input type="hidden" name="section" value="hydration">{% for field in hydration_goal_form %}<div class="form-field">{{ field.label_tag }}{{ field }}{{ field.errors }}</div>{% endfor %}<button class="button" type="submit">Save hydration settings</button></form></section>
|
||||
<section class="settings-card"><h2>Food</h2><p>Set optional daily nutrition goals. Exercise calories do not change these goals.</p><form method="post">{% csrf_token %}<input type="hidden" name="section" value="food">{% for field in food_goal_form %}<div class="form-field">{{ field.label_tag }}{{ field }}{{ field.errors }}</div>{% endfor %}<button class="button" type="submit">Save food goals</button></form></section>
|
||||
{% if not is_demo_account %}<section class="settings-card"><h2>API access</h2><p>Create scoped tokens for apps that need access to your food log or kitchen inventory.</p><a class="button" href="{% url 'food:tokens' %}">Manage API tokens</a></section>
|
||||
{% if not is_demo_account %}<section class="settings-card"><h2>Home Assistant</h2><p>Connect a to-do list to your groceries.</p><a class="button" href="{% url 'home_assistant:settings' %}">Manage Home Assistant</a></section><section class="settings-card"><h2>API access</h2><p>Create scoped tokens for apps that need access to your food log or kitchen inventory.</p><a class="button" href="{% url 'food:tokens' %}">Manage API tokens</a></section>
|
||||
<section class="settings-card" aria-labelledby="ntfy-title">
|
||||
<h2 id="ntfy-title">Notifications / ntfy</h2>
|
||||
<p>Enter your private topic URL, test it, then enable notifications.</p>
|
||||
|
||||
Reference in New Issue
Block a user