e.stopPropagation()}
style={{
...glass({
borderRadius: radius.lg,
padding: '20px',
width: '100%',
maxWidth: '480px',
maxHeight: '90vh',
display: 'flex',
flexDirection: 'column',
}),
}}
>
{/* ============ Шапка ============ */}
{/* Язык источника */}
{(['pl', 'ru', 'uk', 'en'] as SourceLang[]).map((lang) => (
))}
{/* Заголовок */}
setTitle(e.target.value)}
placeholder="Заголовок поста"
disabled={isPublishing}
style={{
width: '100%',
padding: '12px 14px',
borderRadius: radius.md,
border: '1px solid rgba(0,0,0,0.08)',
background: 'rgba(255,255,255,0.8)',
color: textColor,
fontSize: '15px',
fontWeight: 600,
outline: 'none',
boxSizing: 'border-box',
}}
onFocus={(e) => {
e.currentTarget.style.borderColor = brandColor;
e.currentTarget.style.boxShadow = `0 0 0 3px ${brandColor}15`;
}}
onBlur={(e) => {
e.currentTarget.style.borderColor = 'rgba(0,0,0,0.08)';
e.currentTarget.style.boxShadow = 'none';
}}
/>
{/* Текст */}
{/* Опциональные поля */}
⚙️ Дополнительно
setLinkUrl(e.target.value)}
placeholder={t('feedAdminLinkUrl') || 'Link (optional)'}
disabled={isPublishing}
style={{
width: '100%',
padding: '10px 12px',
borderRadius: radius.sm,
border: '1px solid rgba(0,0,0,0.08)',
background: 'rgba(255,255,255,0.8)',
color: textColor,
fontSize: '13px',
outline: 'none',
boxSizing: 'border-box',
}}
/>
setTelegramUrl(e.target.value)}
placeholder={t('feedAdminTelegramUrl') || 'Telegram URL (optional)'}
disabled={isPublishing}
style={{
width: '100%',
padding: '10px 12px',
borderRadius: radius.sm,
border: '1px solid rgba(0,0,0,0.08)',
background: 'rgba(255,255,255,0.8)',
color: textColor,
fontSize: '13px',
outline: 'none',
boxSizing: 'border-box',
}}
/>
setExpiresAt(e.target.value)}
disabled={isPublishing}
style={{
width: '100%',
padding: '10px 12px',
borderRadius: radius.sm,
border: '1px solid rgba(0,0,0,0.08)',
background: 'rgba(255,255,255,0.8)',
color: textColor,
fontSize: '13px',
outline: 'none',
boxSizing: 'border-box',
}}
/>
{isEditing && (
)}
{/* Картинки — 3 слота */}
{/* Существующие картинки (режим редактирования) */}
{existingImages.map((url, i) => (
))}
{/* Слоты для новых картинок — рендерим только доступное количество */}
{slots.slice(0, newSlotsAvailable).map((slot, slotIndex) => (
{/* Скрытый input для этого слота — БЕЗ multiple */}
handleSlotFile(slotIndex, e)}
style={{ display: 'none' }}
disabled={isPublishing}
/>
{slot ? (
<>
{/* Превью с картинкой */}
>
) : (
/* Пустой слот — плюсик */
)}
))}
{/* Подсказка */}
{t('feedAdminImagesHint') || 'Тапни на плюсик → выбери одну картинку. До 3 фото.'}
{/* Превью перевода */}
{translationPreview && (
🌐 {t('feedAdminPreview') || 'Translation preview'}
{(['pl', 'ru', 'uk', 'en'] as const).map((lang) => (
{lang}
{translationPreview[`title_${lang}` as keyof TranslationPreview]}
{translationPreview[`body_${lang}` as keyof TranslationPreview]}
))}
)}
{/* Ошибка */}
{error && (
⚠️ {error}
)}
{/* Успех */}
{success && (
✅ {t('feedAdminSuccess') || 'Done!'}
)}