Доработать согласия и статусы профиля

This commit is contained in:
AidarKC
2026-11-08 13:33:51 +03:00
parent 3185ce8b5e
commit 4591d171d6
13 changed files with 374 additions and 138 deletions
+20
View File
@@ -1,4 +1,5 @@
import { iconHtml } from './ui-icon.js';
import { confirmDialog } from './confirm-dialog.js';
import { markArweaveAttachmentPlaced } from './arweave-attachment-manager.js';
import { openChannelAttachmentManager } from './channel-attachment-manager.js';
import { composeMessageWithAttachments, MAX_MESSAGE_ATTACHMENTS } from '../services/attachment-format.js';
@@ -339,6 +340,25 @@ export function openChannelEditor({
submitButton.textContent = 'Отправляем…';
sync();
try {
const accepted = await confirmDialog({
title: 'Записать в публичную историю?',
aboveEditor: true,
text: 'Эта публикация, ответ или изменение будут записаны в блокчейн. Запись может сохраняться постоянно, включая историю правок и удаления. Если передумали, выберите «Вернуться к черновику».',
confirmLabel: 'Да, опубликовать',
cancelLabel: 'Вернуться к черновику',
});
if (!isActive() || closed) return;
if (!accepted) {
inFlight = false;
textarea.disabled = false;
attachButton.disabled = false;
clearButton.disabled = false;
if (extraControl) extraControl.querySelectorAll('select,button,input').forEach((el) => { el.disabled = false; });
submitButton.textContent = submitLabel;
saveDraft();
sync();
return;
}
await onSubmit({
text: rawText ? textarea.value.trim() : composeMessageWithAttachments(textarea.value.trim(), attachments),
attachments: [...attachments],