fix media post scroll

This commit is contained in:
hzrd149 2025-02-14 08:55:04 -06:00
parent b7f8905e18
commit 258e4b9ff2
4 changed files with 35 additions and 33 deletions

View File

@ -1,28 +1,30 @@
import { ButtonGroup, Flex, Heading, Spinner } from "@chakra-ui/react";
import { NostrEvent } from "nostr-tools";
import { useReadRelays } from "../../hooks/use-client-relays";
import useParamsEventPointer from "../../hooks/use-params-event-pointer";
import useSingleEvent from "../../hooks/use-single-event";
import UserAvatarLink from "../../components/user/user-avatar-link";
import UserLink from "../../components/user/user-link";
import UserDnsIdentity from "../../components/user/user-dns-identity";
import MediaPostSlides from "../../components/media-post/media-slides";
import MediaPostContents from "../../components/media-post/media-post-content";
import { TrustProvider } from "../../providers/local/trust-provider";
import DebugEventButton from "../../components/debug-modal/debug-event-button";
import EventShareButton from "../../components/note/timeline-note/components/event-share-button";
import EventQuoteButton from "../../components/note/event-quote-button";
import { useBreakpointValue } from "../../providers/global/breakpoint-provider";
import EventZapIconButton from "../../components/zap/event-zap-icon-button";
import AddReactionButton from "../../components/note/timeline-note/components/add-reaction-button";
import EventReactionButtons from "../../components/event-reactions/event-reactions";
import { useReadRelays } from "../../../hooks/use-client-relays";
import useParamsEventPointer from "../../../hooks/use-params-event-pointer";
import useSingleEvent from "../../../hooks/use-single-event";
import UserAvatarLink from "../../../components/user/user-avatar-link";
import UserLink from "../../../components/user/user-link";
import UserDnsIdentity from "../../../components/user/user-dns-identity";
import MediaPostSlides from "../../../components/media-post/media-slides";
import MediaPostContents from "../../../components/media-post/media-post-content";
import { TrustProvider } from "../../../providers/local/trust-provider";
import DebugEventButton from "../../../components/debug-modal/debug-event-button";
import EventShareButton from "../../../components/note/timeline-note/components/event-share-button";
import EventQuoteButton from "../../../components/note/event-quote-button";
import { useBreakpointValue } from "../../../providers/global/breakpoint-provider";
import EventZapIconButton from "../../../components/zap/event-zap-icon-button";
import AddReactionButton from "../../../components/note/timeline-note/components/add-reaction-button";
import EventReactionButtons from "../../../components/event-reactions/event-reactions";
import { MediaPostComments } from "./media-comments";
import MediaPostCommentForm from "./media-post-comment-form";
import BackButton from "../../../components/router/back-button";
function Header({ post }: { post: NostrEvent }) {
return (
<Flex gap="2">
<BackButton />
<UserAvatarLink pubkey={post.pubkey} />
<Flex direction="column">
<UserLink pubkey={post.pubkey} fontWeight="bold" />
@ -76,10 +78,10 @@ function HorizontalLayout({ post }: { post: NostrEvent }) {
function VerticalLayout({ post }: { post: NostrEvent }) {
return (
<Flex direction="column" pt="2" pb="12" gap="2" px="2" w="full">
<Flex direction="column" pt="2" pb="12" gap="2" px="2" w="full" overflowY="auto" overflowX="hidden">
<Header post={post} />
<MediaPostSlides post={post} h="full" overflow="hidden" />
<MediaPostSlides post={post} h="full" overflow="hidden" minH="50vh" />
<MediaPostContents post={post} />
<Actions post={post} />

View File

@ -4,14 +4,14 @@ import { COMMENT_KIND } from "applesauce-core/helpers";
import { useStoreQuery } from "applesauce-react/hooks";
import { CommentsQuery } from "applesauce-core/queries";
import { useReadRelays } from "../../hooks/use-client-relays";
import UserLink from "../../components/user/user-link";
import DebugEventButton from "../../components/debug-modal/debug-event-button";
import useTimelineLoader from "../../hooks/use-timeline-loader";
import IntersectionObserverProvider from "../../providers/local/intersection-observer";
import { useTimelineCurserIntersectionCallback } from "../../hooks/use-timeline-cursor-intersection-callback";
import TextNoteContents from "../../components/note/timeline-note/text-note-contents";
import Timestamp from "../../components/timestamp";
import { useReadRelays } from "../../../hooks/use-client-relays";
import UserLink from "../../../components/user/user-link";
import DebugEventButton from "../../../components/debug-modal/debug-event-button";
import useTimelineLoader from "../../../hooks/use-timeline-loader";
import IntersectionObserverProvider from "../../../providers/local/intersection-observer";
import { useTimelineCurserIntersectionCallback } from "../../../hooks/use-timeline-cursor-intersection-callback";
import TextNoteContents from "../../../components/note/timeline-note/text-note-contents";
import Timestamp from "../../../components/timestamp";
function Comment({ comment }: { comment: NostrEvent }) {
return (

View File

@ -5,12 +5,12 @@ import { NostrEvent } from "nostr-tools";
import { useEventFactory } from "applesauce-react/hooks";
import { Emoji } from "applesauce-core/helpers/emoji";
import { usePublishEvent } from "../../providers/global/publish-provider";
import { useContextEmojis } from "../../providers/global/emoji-provider";
import { MagicInput, RefType } from "../../components/magic-textarea";
import useTextAreaUploadFile, { useTextAreaInsertTextWithForm } from "../../hooks/use-textarea-upload-file";
import { useWriteRelays } from "../../hooks/use-client-relays";
import MessageSquare01 from "../../components/icons/message-square-01";
import { usePublishEvent } from "../../../providers/global/publish-provider";
import { useContextEmojis } from "../../../providers/global/emoji-provider";
import { MagicInput, RefType } from "../../../components/magic-textarea";
import useTextAreaUploadFile, { useTextAreaInsertTextWithForm } from "../../../hooks/use-textarea-upload-file";
import { useWriteRelays } from "../../../hooks/use-client-relays";
import MessageSquare01 from "../../../components/icons/message-square-01";
export default function MediaPostCommentForm({
post,

View File

@ -1,6 +1,6 @@
import { RouteObject } from "react-router-dom";
import MediaFeedView from ".";
import MediaPostView from "./media-post";
import MediaPostView from "./post";
export default [
{ index: true, Component: MediaFeedView },