feat: TenChat auto-posting via refresh token (TCRF) auth
- Rewrite tenchat_publisher to TCRF-only flow: refresh -> Bearer access_token -> publish - Store only TCRF (one-time refresh token, rotates on each publish) - Add /tenchat page (GET/POST/disconnect) with username + TCRF fields - Add publish-to-TenChat button on post publish page - Update DB helpers: save/get/update/clear tenchat credentials
This commit is contained in:
1 parent
09b22446d4
commit
849e5c472a
6 files changed
+441
-2
No files matched your search
@@ -28,7 +28,7 @@
|
||||
{% endfor %}
|
||||
</select>
|
||||
</label>
|
||||
<button type="submit">📤 Опубликовать</button>
|
||||
<button type="submit">📤 Опубликовать в Telegram</button>
|
||||
</form>
|
||||
{% else %}
|
||||
<div class="card">
|
||||
@@ -36,6 +36,22 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if tenchat_connected %}
|
||||
<div class="card" style="margin-top:15px;">
|
||||
<h2>TenChat</h2>
|
||||
<p>Опубликовать этот пост в ваш профиль TenChat (@{{ tenchat_username }}).</p>
|
||||
<form method="post" action="/posts/{{ post.id }}/publish/tenchat" class="form" style="margin:0;">
|
||||
<button type="submit">📤 Опубликовать в TenChat</button>
|
||||
</form>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="card" style="margin-top:15px;">
|
||||
<h2>TenChat</h2>
|
||||
<p>Подключите TenChat, чтобы публиковать посты в профиль.</p>
|
||||
<a href="/tenchat" class="copy-btn">🔑 Настроить TenChat</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="post-actions">
|
||||
<a href="/posts/{{ post.id }}" class="copy-btn">← Назад к посту</a>
|
||||
<a href="/channels" class="copy-btn">⚙ Управление каналами</a>
|
||||
|
||||
Reference in new issue
Block a user