Вложения файлов со своего сервера доступа пользователя

This commit is contained in:
AidarKC
2026-10-07 11:42:12 +03:00
parent b1c42efa82
commit 7b8e178723
33 changed files with 1960 additions and 496 deletions
+19 -1
View File
@@ -767,6 +767,9 @@ function renderNodeCard(node, heading, handlers, localNumber) {
card.append(createAttachmentCarouselElement(parsedText.attachments, {
gateway: state.entrySettings.arweaveServer,
messageTimestampMs: node?.createdAtMs,
authorLogin: author,
solanaEndpoint: state.entrySettings.solanaServer,
fallbackServerLogin: state.entrySettings.shineServerLogin,
}));
}
if (isRating) {
@@ -1009,6 +1012,15 @@ function renderThreadContext(node, { onOpenPost }) {
toPost.addEventListener('click', onOpenPost);
meta.append(time, expand, toPost);
box.append(text, meta);
if (parsed.attachments.length) {
box.append(createAttachmentCarouselElement(parsed.attachments, {
gateway: state.entrySettings.arweaveServer,
messageTimestampMs: node?.createdAtMs,
authorLogin: node?.authorLogin,
solanaEndpoint: state.entrySettings.solanaServer,
fallbackServerLogin: state.entrySettings.shineServerLogin,
}));
}
// обрезан ли текст — видно только после вставки в документ
requestAnimationFrame(() => { expand.hidden = text.scrollHeight <= text.clientHeight + 1; });
return box;
@@ -1066,7 +1078,13 @@ function renderComment({ node, parent, focus, channelOwner, handlers }) {
}
if (parsed.attachments.length) {
item.append(createAttachmentCarouselElement(parsed.attachments, { gateway: state.entrySettings.arweaveServer, messageTimestampMs: node?.createdAtMs }));
item.append(createAttachmentCarouselElement(parsed.attachments, {
gateway: state.entrySettings.arweaveServer,
messageTimestampMs: node?.createdAtMs,
authorLogin: node?.authorLogin,
solanaEndpoint: state.entrySettings.solanaServer,
fallbackServerLogin: state.entrySettings.shineServerLogin,
}));
}
const text = document.createElement('p');
text.className = 'thread-comment__text';