Обновление страницы и логики дашборда

This commit is contained in:
dev
2026-11-05 17:03:54 +03:00
parent 1bbe8833b9
commit 45ec4b80a8
2 changed files with 9 additions and 1 deletions
+7 -1
View File
@@ -272,9 +272,15 @@ function digestViewImagesHtml(d) {
}).join('') + '</div>';
}
function previewSrc(p) {
if (!p) return p;
if (p.startsWith('/uploads/')) return `${API}${p}`;
return thumbSrc(p);
}
function renderDigestView(d) {
const pinned = !!d.is_pinned;
const preview = d.preview_path ? '<img src="' + thumbSrc(d.preview_path) + '" data-img="' + API + d.preview_path + '" class="digest-view-preview" alt="превью">' : '';
const preview = d.preview_path ? '<img src="' + previewSrc(d.preview_path) + '" data-img="' + API + d.preview_path + '" class="digest-view-preview" alt="превью">' : '';
const images = digestViewImagesHtml(d);
const body = linkifyTextHtml(d.body || '');
return '<div class="digest-view">' +