feat: display the full content of the reply
This commit is contained in:
@@ -14,6 +14,9 @@ import Preview from './Preview'
|
|||||||
import SendOnlyToSwitch from './SendOnlyToSwitch'
|
import SendOnlyToSwitch from './SendOnlyToSwitch'
|
||||||
import Uploader from './Uploader'
|
import Uploader from './Uploader'
|
||||||
import { preprocessContent } from './utils'
|
import { preprocessContent } from './utils'
|
||||||
|
import Note from '@/components/Note'
|
||||||
|
import { ScrollArea } from "@/components/ui/scroll-area"
|
||||||
|
|
||||||
|
|
||||||
export default function NormalPostContent({
|
export default function NormalPostContent({
|
||||||
defaultContent = '',
|
defaultContent = '',
|
||||||
@@ -114,6 +117,13 @@ export default function NormalPostContent({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="space-y-4">
|
<div className="space-y-4">
|
||||||
|
{parentEvent && (
|
||||||
|
<ScrollArea className="max-h-48 rounded-lg border bg-muted/40 overflow-y-auto">
|
||||||
|
<div className="p-2 sm:p-3 pointer-events-none">
|
||||||
|
<Note size="small" event={parentEvent} hideStats hideParentNotePreview />
|
||||||
|
</div>
|
||||||
|
</ScrollArea>
|
||||||
|
)}
|
||||||
<TextareaWithMentions
|
<TextareaWithMentions
|
||||||
className="h-32"
|
className="h-32"
|
||||||
setTextValue={setContent}
|
setTextValue={setContent}
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
import { Event } from 'nostr-tools'
|
import { Event } from 'nostr-tools'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import ContentPreview from '../ContentPreview'
|
|
||||||
import { SimpleUserAvatar } from '../UserAvatar'
|
|
||||||
|
|
||||||
export default function Title({ parentEvent }: { parentEvent?: Event }) {
|
export default function Title({ parentEvent }: { parentEvent?: Event }) {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
@@ -9,8 +7,6 @@ export default function Title({ parentEvent }: { parentEvent?: Event }) {
|
|||||||
return parentEvent ? (
|
return parentEvent ? (
|
||||||
<div className="flex gap-2 items-center w-full">
|
<div className="flex gap-2 items-center w-full">
|
||||||
<div className="shrink-0">{t('Reply to')}</div>
|
<div className="shrink-0">{t('Reply to')}</div>
|
||||||
<SimpleUserAvatar userId={parentEvent.pubkey} size="tiny" />
|
|
||||||
<ContentPreview className="flex-1 w-0 truncate h-5" event={parentEvent} />
|
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
t('New Note')
|
t('New Note')
|
||||||
|
|||||||
Reference in New Issue
Block a user