Commit Graph
14 Commits
Author SHA1 Message Date
dev 9a509fa742 docs: вложения статей (doc_files), подписи и библиотека картинок, быстрое ред. отзыва 2026-11-01 11:06:23 +03:00
dev 00b7e96260 feedback: поддержка freeimage.host (Chevereto), линки-картинки в тексте отзыва
- resolveImgbbEndpoint/friendlyApiError в lib/feedback-imgbb.js: нормализация адреса сервиса (сайт или полный эндпоинт), поле source+action для Chevereto
- линки-картинки в тексте отзыва: linkifyTextHtml в admin.js, инлайн-миниатюры до 12 ссылок (feedback.js, student.js)
- «Картинка из работ» → «Работа резидента», блок «Последнее занятие» перенесён в шапку модалки
- нейтральные подписи «ImgBB» → «загрузка картинок» в настройках и подсказках
2026-10-31 10:20:01 +03:00
dev 185bbf6f77 feat: оформить поля модалки отзыва в одну строку
- Три поля модалки feedbackModal (Прошлый отзыв/Добавить, Сгенерировать
  отзыв ИИ, Модель ИИ) в одну строку равными размерами через grid 3 колонки
- Кнопка fbImgbbBtn перенесена под fbText справа в строку с fbTextHint,
  маленького размера
- Над переключателем добавлена подпись «Прошлый отзыв», текст переключателя
  «Добавить»
2026-10-30 20:42:27 +03:00
dev 12034812ec feat: student achievements (admin-managed types + per-student records, UI & backup) 2026-10-27 13:02:56 +03:00
dev 3bc8d46fdf refactor(docs): keep seed data out of SQL, move default refresh to runtime
- drop 12 doc_sections inserts and 3 article-body UPDATEs (incl. one with
  stray 'MD/echo written' shell lines) from db/migration.sql; keep DDL only
- add DOC_ARTICLE_BODY_UPDATES + refreshDefaultArticleBodies() in
  lib/docs.js, guarded exact-match updates fired from ensureDocsTables
  on non-empty DBs (article bodies: zametki, zakladki, zhurnal,
  gruppy, foto; title also guarded for foto)
- fix lib/docs.js compilation: escape backticks inside the zhurnal body
  (.originals/, 'Таблица entries' line), which previously turned
  articleBody into null
- remove 'MD/echo written' junk and translate artifacts from seed texts
  (В(group) / galerry /Foto i galerie)
2026-10-25 01:18:29 +03:00
dev 42c32b2ef9 docs: расширить разделы Закладки и Журнал, добавить универсальный промпт заполнения 2026-10-23 22:39:50 +03:00
dev 97426c70af Документация: разделы и статьи в docs.html
- Добавлены 12 разделов документации: Журнал, Отчёты о занятиях,
  Ученики, Группы, Обратная связь, Короткие сообщения, Чаты, Фото,
  Файлы, Ссылки, Закладки, Заметки (каждый со вступительной статьёй)
- Сид разделов в lib/docs.js (ensureDocsTables) и db/migration.sql
-doc_images добавлен в sweepOrphanedUploads и BROKEN_IMAGE_SOURCES
- Исправлен дубль docSectionIds в backup-restore.js
- Роуты /api/docs/* в server.js
- Страницы public/docs.html, public/docs-public.html, скрипты
  public/js/docs.js, public/js/docs-public.js, public/js/md.js
2026-10-23 21:33:48 +03:00
dev 08e99e0c09 fix(restore): guarantee cleanup of uploaded backup archive
Wrap temp-dir removal in removeTempDir() so a failed rmSync cannot hang the async restore handler and leave the archive on disk, close the peek stream descriptor, and clean wido-up-*/wido-rst-* on response finish and the missing-file path.
2026-10-23 11:41:57 +03:00
dev 7d610c549e feat(files): store file sizes, add size range filter and sorting
Adds project_files.size (schema, idempotent migration, ensureFileSizesColumn), records multer size on both upload paths, backfills legacy rows from storage at startup and after restore (lib/file-sizes.js) with a lazy per-row update on read. GET /api/files and /api/files/detached accept min_size/max_size and a whitelisted sort (new/old/size_desc/size_asc); files page gets size and sort selects. size is carried through backup normalize/restore.
2026-10-23 10:25:16 +03:00
dev 621067a880 feat(groups): быстрые фильтры и права тьюторов, права на отчёты о занятии
- фильтры групп по филиалу, тьютору и дню, сохранение в localStorage и сброс
- тьютор может редактировать только свои группы; филиал и тьютора меняет админ
- редактирование отчётов о занятии доступно только автору или админу
2026-10-23 10:12:44 +03:00
dev 7a2f8893a6 fix(students): scope status constraint lookup and add it without blocking
Check pg_constraint by conname + conrelid so a same-named CHECK on another table cannot skip creation, add the constraint as NOT VALID and validate separately to avoid a long ACCESS EXCLUSIVE lock at boot. Mark lib/students.js as partially extracted in the migration plan.
2026-10-23 09:19:44 +03:00
dev c2cc7db26d feat(students): add active/paused/left status with hidden filter 2026-10-23 09:14:19 +03:00
dev 697aac9b87 fix(restore): allow backups of any size
- default BACKUP_UPLOAD_LIMIT_MB to 0 (no hard cap, disk is the limit);
  a positive value still enables multer fileSize
- scale request timeout by the configured limit and keep up to 24h when
  unlimited, cap headersTimeout at 120s
- check Content-Length and free space before upload (413/507) and map
  multer ENOSPC to 507
- drop the hardcoded 500 MB fallback in the settings restore pre-check
- cover new limit/timeout helpers in backup.selftest.js
- update env template, compose, README, AGENTS and API docs
2026-10-21 18:13:24 +03:00
dev 19f63a4064 fix(restore): survive large backups, disk-full and proxy limits
- extract restore helpers into lib/restore.js (space check, tar entry
  filter, temp dir sweep)
- reject tar entries outside staging and symlinks/hardlinks
- map ENOSPC/EQUOT to 507 with clear messages, keep data_restored flag
  when files fail after commit
- raise request timeout using BACKUP_UPLOAD_LIMIT_MB and expose
  backup_upload_limit_mb via public settings
- upload restore archive via XHR with progress, size pre-check and
  readable server errors in settings UI
- document large-archive restore on a remote server
2026-10-21 17:58:46 +03:00