certs: генерация TLS в entrypoint и bind-mount certs; UI отзывов и иконка модуля

- TLS-сертификат вынесен из Dockerfile в entrypoint.sh, генерируется только при отсутствии в certs/; certs подключён bind-mount, чтобы переживать пересборку
- Отзывы: кнопки «Изменить»/«Удалить» переведены на icon-btn, добавлена AI-подложка для обработанных записей
- Журнал: иконка модуля в карточке отчёта берётся из названия модуля
- AGENTS.md: обновлён раздел Docker/Compose и Tailscale
This commit is contained in:
dev
2026-10-12 00:57:02 +03:00
parent 449ff00259
commit 230dc3ec4d
8 changed files with 35 additions and 12 deletions
+4
View File
@@ -10,6 +10,9 @@
.feedback-list > .empty, .feedback-list > .muted { grid-column:1/-1; }
@media (max-width:1000px) { .feedback-list { grid-template-columns:1fr; } }
.feedback-item .ai-badge { margin-left:0; }
.feedback-item .lesson-actions .icon-btn { width:28px; height:28px; }
.feedback-item .lesson-actions .icon-btn.danger { color:#ef4444; }
.feedback-item .lesson-actions .icon-btn.danger:hover { color:#ef4444; border-color:#ef4444; }
.feedback-item .btn-link.sent-on { background:var(--accent); color:#fff; border-color:var(--accent); }
.shorts-list { display:flex; flex-direction:column; gap:6px; width:100%; max-height:220px; overflow:auto; padding:2px 0; }
.shorts-list .item { display:flex; gap:8px; align-items:flex-start; }
@@ -36,6 +39,7 @@
#fbPromptModal { overflow:auto; align-items:flex-start; padding:4vh 16px; }
#fbPromptModal > .edit-modal { margin:auto; }
.feedback-item { position:relative; }
.feedback-item.fb-ai-made { background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 130 100'%3E%3Ctext x='128' y='92' text-anchor='end' font-family='Arial,Helvetica,sans-serif' font-weight='800' font-size='104' fill='%23808080' fill-opacity='0.1'%3EAI%3C/text%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 6px bottom 2px; background-size:auto 148px; }
.fb-ai-pop { position:absolute; left:12px; right:12px; top:calc(100% + 6px); z-index:40; display:flex; flex-direction:column; gap:8px; background:var(--card); border:1px solid var(--border); border-radius:var(--radius); box-shadow:0 14px 34px rgba(0,0,0,.28); padding:14px 16px; }
.fb-ai-pop[hidden] { display:none; }
.fb-ai-row { display:flex; align-items:center; gap:10px; font-size:.85rem; flex-wrap:wrap; }
+1 -1
View File
@@ -318,7 +318,7 @@
<rect x="2.2" y="2.2" width="19.6" height="19.6" rx="5.8" fill="currentColor" fill-opacity=".16"/>
<text x="12" y="16.9" text-anchor="middle" font-size="11.6" font-weight="800"
letter-spacing="-.3" fill="currentColor" stroke="none"
font-family="inherit">Ps</text>
font-family="inherit" id="reportCardModuleIcon"></text>
</svg>
<span id="reportCardModule"></span>
</span>
+4 -4
View File
@@ -28,7 +28,8 @@
const del = f.deleted_at ? ' style="opacity:.5"' : '';
const day = fmtDay(f.feedback_date);
const hasAiInfo = f.ai_status !== 'none' || !!f.ai_prompt;
return `<div class="lesson-item feedback-item" data-id="${f.id}"${del}>
const aiMade = f.ai_status === 'done' ? ' fb-ai-made' : '';
return `<div class="lesson-item feedback-item${aiMade}" data-id="${f.id}"${del}>
<div class="lesson-item-head">
<span class="lesson-author">${escapeHtml(f.group_name||'')}</span>
<span class="lesson-when">${fmtDate(f.feedback_date)}${day ? ` · ${day}` : ''}</span>
@@ -39,8 +40,8 @@
${hasAiInfo ? `<button type="button" class="btn-link" data-aiinfo="${f.id}">ИИ-запрос</button>` : ''}
${f.ai_status === 'error' ? `<button type="button" class="btn-link" data-retry="${f.id}">Повторить</button>` : ''}
${f.deleted_at ? '' : `<button type="button" class="btn-link" data-sent="${f.id}">${f.sent_at ? 'Вернуть' : 'Отправлено'}</button>`}
<button type="button" class="btn-link" data-edit="${f.id}">Изменить</button>
<button type="button" class="btn-link danger" data-del="${f.id}">${f.deleted_at ? 'Удалить навсегда' : 'Удалить'}</button>
<button type="button" class="icon-btn" data-edit="${f.id}" title="Изменить"><i data-lucide="pencil"></i></button>
<button type="button" class="icon-btn danger" data-del="${f.id}" title="${f.deleted_at ? 'Удалить навсегда' : 'Удалить'}"><i data-lucide="trash-2"></i></button>
${f.deleted_at ? `<button type="button" class="btn-link" data-restore="${f.id}">Восстановить</button>` : ''}
</div>
</div>
@@ -679,7 +680,6 @@
const del = e.target.closest('[data-mdel]');
if (del) deleteModel(parseInt(del.dataset.mdel, 10));
});
document.getElementById('feedbackModal').addEventListener('click', e => { if (e.target.id === 'feedbackModal') closeModal(); });
document.getElementById('fbForm').addEventListener('submit', async e => {
e.preventDefault();
const id = document.getElementById('fbId').value;
+7
View File
@@ -112,6 +112,12 @@ function reportCardMetaHTML(e) {
return html;
}
function moduleIconText(name) {
const s = (name || '').trim().slice(0, 2);
if (!s) return '';
return s.charAt(0).toUpperCase() + s.slice(1).toLowerCase();
}
function renderReportCard(e) {
const photo = document.getElementById('reportCardPhoto');
const noPhoto = document.getElementById('reportCardNoPhoto');
@@ -147,6 +153,7 @@ function renderReportCard(e) {
const toolBadge = document.getElementById('reportCardModule').parentElement;
const tool = e.module_name || '';
document.getElementById('reportCardModule').textContent = tool;
document.getElementById('reportCardModuleIcon').textContent = moduleIconText(tool);
toolBadge.hidden = !reportCardFieldOn('module') || !tool;
document.getElementById('reportCardMeta').innerHTML = reportCardMetaHTML(e);
}