diff --git a/STATUS.md b/STATUS.md index 1334d8f..e3ddcc0 100644 --- a/STATUS.md +++ b/STATUS.md @@ -1,8 +1,12 @@ # VESTI — Статус -Обновлено: 2026-09-15 (RSS: сохранение абзацев/разметки в текстах новостей) +Обновлено: 2026-09-16 (fix-sources-add-channel: поле channel в форме добавления TG-источника) ## Текущее состояние +- **fix-sources-add-channel** (2026-09-16): добавление telegram-источника через веб снова работает. Поле `channel` добавлено в форму (required для telegram через JS) и показывается в таблице. Причина: UI-форма не имела поля channel. `web/templates/sources.html` ранее отсутствовал в git — добавлен. - **FEDIVERSE-ПУБЛИКАЦИЯ РАБОТАЕТ** (2026-09-13): publisher-service умеет публиковать карточки в GoToSocial (social.dedinit.ru) от имени бот-аккаунта **@vesti@dedinit.ru** (Mastodon-совместимый API). Change `gotosocial-publisher`. - Аккаунт **vesti** создан на GtS (2026-09-13, confirmed+approved, admin=0), OAuth-приложение `vesti-publisher` (client_id=01B09QNDM9YQ2VQVSRXHCVAV6K), токен в .env (`GT_SOCIAL_ACCESS_TOKEN`, scope `read write`), канал `VESTI_GTS_CHANNELS=@vesti@dedinit.ru`. - healthz publisher: блок `gotosocial` — url, account=vesti, token_set=true, account_ok=true. diff --git a/openspec/changes/fix-sources-add-channel/.openspec.yaml b/openspec/changes/fix-sources-add-channel/.openspec.yaml new file mode 100644 index 0000000..63c288a --- /dev/null +++ b/openspec/changes/fix-sources-add-channel/.openspec.yaml @@ -0,0 +1,3 @@ +schema: spec-driven +created: 2026-09-16 +skip_specs: true \ No newline at end of file diff --git a/openspec/changes/fix-sources-add-channel/design.md b/openspec/changes/fix-sources-add-channel/design.md new file mode 100644 index 0000000..f4e4470 --- /dev/null +++ b/openspec/changes/fix-sources-add-channel/design.md @@ -0,0 +1,55 @@ +# fix-sources-add-channel + +## Дизайн + +### 1. Форма добавления — поле channel (web/templates/sources.html) + +Вставить после поля `url` (перед `crawler`), чтобы telegram-поля шли вместе: + +```html +
| slug | Название | crawler | direction | lang | +priority | enabled | статус | послед. запуск | действия | +
|---|---|---|---|---|---|---|---|---|---|
{{ s['slug'] }} |
+ + + | +{{ s['crawler'] }}
+ {% if s['crawler'] == 'rss' and s['feed_url'] %} {{ s['feed_url'] }}{% endif %} + {% if s['crawler'] == 'telegram' and s['channel'] %} {{ s['channel'] }}{% endif %} + |
+ {{ s['direction'] or '—' }}
+ {% if s['error_count'] %} {{ s['error_count'] }} err{% endif %} + |
+ {{ s['lang'] or 'ru' }} | ++ + | ++ + {{ 'вкл' if s['enabled'] else 'пауза' }} + + | ++ {% if s['status'] == 'dead' %}dead + {% elif s['status'] == 'alive' %}alive + {% elif s['status'] == 'new' %}new + {% else %}{{ s['status'] }}{% endif %} + {% if s['enabled'] == 0 %}пауза{% endif %} + | +{{ s['last_fetch'] or '—' }}{% if s['last_error'] %} {{ s['last_error'][:40] }}{% endif %} |
+ + + + | +