Reworked telegram notifications
Build and Publish / Build and Publish Docker Image (push) Successful in 1m50s

This commit is contained in:
2026-05-15 15:28:19 +03:00
parent 3bf62c80d5
commit 85512ab48b
10 changed files with 132 additions and 24 deletions
-6
View File
@@ -20,12 +20,6 @@
<input class="input" type="text" name="telegram_bot_token" value="{% for s in &settings %}{% if s.key == "telegram_bot_token" %}{{ s.value }}{% endif %}{% endfor %}">
</div>
</div>
<div class="field">
<label class="label">{{ t.settings_telegram_chat_id }}</label>
<div class="control">
<input class="input" type="text" name="telegram_chat_id" value="{% for s in &settings %}{% if s.key == "telegram_chat_id" %}{{ s.value }}{% endif %}{% endfor %}">
</div>
</div>
<div class="field">
<label class="label">{{ t.settings_contact_info }}</label>
<div class="control">
+23
View File
@@ -17,6 +17,29 @@
<div class="item-card-meta">
<span>🕐 {{ user.created_at.format("%d.%m.%Y %H:%M") }}</span>
</div>
{% if user.status == "active" %}
<form method="post" action="/admin/users/{{ user.id }}/telegram" style="margin-top:0.5rem; padding-top:0.5rem; border-top:1px solid #eee;">
<div class="columns is-mobile is-vcentered" style="margin-bottom:0;">
<div class="column">
<div class="field" style="margin-bottom:0;">
<label class="label is-small">{{ t.users_telegram_chat_id }}</label>
<div class="control">
<input class="input is-small" type="text" name="telegram_chat_id" placeholder="123456789" value="{{ user.telegram_chat_id.as_deref().unwrap_or_default() }}">
</div>
</div>
</div>
<div class="column is-narrow">
<label class="checkbox is-small">
<input type="checkbox" name="telegram_notifications" value="true" {% if user.telegram_notifications == Some(true) %}checked{% endif %}>
{{ t.users_telegram_enabled }}
</label>
</div>
<div class="column is-narrow">
<button type="submit" class="button is-small is-info is-outlined">💾</button>
</div>
</div>
</form>
{% endif %}
<div class="item-card-actions">
{% if user.status == "active" %}
<form method="post" action="/admin/users/{{ user.id }}/archive">
+1 -1
View File
@@ -304,7 +304,7 @@
/* ── Mobile ── */
@media (max-width: 600px) {
.hero { padding: 6.5rem 1rem 3rem; }
.hero { padding: 6.5rem 1rem 10rem; }
.section { padding: 3rem 1rem; }
.form-section { padding: 3rem 1rem; }
.form-wrapper { padding: 1.75rem 1.25rem; }