Files
core/panel/modals/ShoutBodyModal.tsx
Untone 4489d25913
Some checks failed
Deploy on push / deploy (push) Failing after 1m34s
## [0.9.18] - 2025-01-09
### 🔍 Search System Redis Storage
- **💾 Redis-based vector index storage**: Переключились обратно на Redis для хранения векторного индекса
  - Заменили файловое хранение в `/dump` на Redis ключи для надежности
  - Исправлена проблема с правами доступа на `/dump` папку на сервере
  - Векторный индекс теперь сохраняется по ключам `search_index:{name}:data` и `search_index:{name}:metadata`
- **🛠️ Improved reliability**: Убрали зависимость от файловой системы для критичных данных
- ** Better performance**: Redis обеспечивает более быстрый доступ к индексу
- **🔧 Technical changes**:
  - Заменили `save_index_to_file()` на `save_index_to_redis()`
  - Заменили `load_index_from_file()` на `load_index_from_redis()`
  - Обновили автосохранение для использования Redis вместо файлов
  - Удалили неиспользуемые импорты (`gzip`, `pathlib`, `cast`)
2025-09-01 15:09:36 +03:00

53 lines
1.8 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { Component, For } from 'solid-js'
import type { AdminShoutInfo, Maybe, Topic } from '../graphql/generated/schema'
import styles from '../styles/Modal.module.css'
import CodePreview from '../ui/CodePreview'
import Modal from '../ui/Modal'
export interface ShoutBodyModalProps {
shout: AdminShoutInfo
isOpen: boolean
onClose: () => void
}
const ShoutBodyModal: Component<ShoutBodyModalProps> = (props) => {
return (
<Modal
title={`Просмотр публикации: ${props.shout.title}`}
isOpen={props.isOpen}
onClose={props.onClose}
size="large"
>
<div class={styles['shout-body']}>
<div class={styles['shout-info']}>
<div class={styles['info-row']}>
<span class={styles['info-label']}>Автор:</span>
<span class={styles['info-value']}>{props.shout?.authors?.[0]?.email}</span>
</div>
<div class={styles['info-row']}>
<span class={styles['info-label']}>Просмотры:</span>
<span class={styles['info-value']}>{props.shout.stat?.views_count || 0}</span>
</div>
<div class={styles['info-row']}>
<span class={styles['info-label']}>Темы:</span>
<div class={styles['topics-list']}>
<For each={props.shout?.topics}>
{(topic: Maybe<Topic>) => <span class={styles['topic-badge']}>{topic?.title || ''}</span>}
</For>
</div>
</div>
</div>
<div class={styles['shout-content']}>
<h3>Содержание</h3>
<div class={styles['content-preview']}>
<CodePreview content={props.shout.body || ''} maxHeight="85vh" language="html" autoFormat />
</div>
</div>
</div>
</Modal>
)
}
export default ShoutBodyModal