Add ntfy push notifications with action buttons for meal reminders
CI / test-and-package (push) Successful in 37s
CI / test-and-package (push) Successful in 37s
- ntfy.py: send_meal_reminder() with Home/Out HTTP action buttons, test helper - models.py: new columns ntfy_url, ntfy_token, callback_token on users table - meals.py: /api/ntfy-callback (public, token-authenticated), /ntfy-settings, /ntfy-test - app.py: flask send-reminders CLI command (cron-schedulable) - Dashboard: ntfy config form in Account Settings - i18n: translations for all ntfy strings (en/fr/de) - Dockerfile: include ntfy.py in COPY - tests: 15 new tests covering callback, settings, and auth - docs: updated AGENTS.md and doc/index.md
This commit is contained in:
@@ -96,6 +96,23 @@
|
||||
<button class="btn btn-danger">{{ t('Delete My Account') }}</button>
|
||||
</form>
|
||||
|
||||
<form method="POST" action="{{ url_for('meals.ntfy_settings') }}" class="manage-form">
|
||||
<h4>🔔 {{ t('Ntfy Notifications') }}</h4>
|
||||
<p class="hint">{{ t('Get meal reminders on your phone via ntfy.') }}</p>
|
||||
<label for="ntfy_url">{{ t('Ntfy Topic URL') }}</label>
|
||||
<input type="text" id="ntfy_url" name="ntfy_url"
|
||||
placeholder="https://ntfy.sh/your-topic"
|
||||
value="{{ ntfy.ntfy_url or '' }}">
|
||||
<label for="ntfy_token">{{ t('Access Token') }} <span class="hint">{{ t('(optional)') }}</span></label>
|
||||
<input type="password" id="ntfy_token" name="ntfy_token"
|
||||
placeholder="tk_..."
|
||||
value="{{ ntfy.ntfy_token or '' }}">
|
||||
<div class="btn-row" style="margin-top: 8px;">
|
||||
<button type="submit" class="btn btn-primary btn-sm">{{ t('Save') }}</button>
|
||||
<button type="submit" class="btn btn-sm" formaction="{{ url_for('meals.ntfy_test') }}">{{ t('Send Test') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% if is_admin %}
|
||||
<form method="POST" action="{{ url_for('meals.admin_delete_household') }}"
|
||||
onsubmit="return confirm(this.dataset.confirmMsg);"
|
||||
|
||||
Reference in New Issue
Block a user