From 8066f699bd625f8aab8010ca9e6c242878780539 Mon Sep 17 00:00:00 2001 From: thislight Date: Sun, 10 Nov 2024 21:39:10 +0800 Subject: [PATCH] TootBottomSheet: test scrollable --- src/timelines/TootBottomSheet.css | 18 +++++ src/timelines/TootBottomSheet.tsx | 113 +++++++++++++++--------------- 2 files changed, 74 insertions(+), 57 deletions(-) create mode 100644 src/timelines/TootBottomSheet.css diff --git a/src/timelines/TootBottomSheet.css b/src/timelines/TootBottomSheet.css new file mode 100644 index 0000000..afe2e5d --- /dev/null +++ b/src/timelines/TootBottomSheet.css @@ -0,0 +1,18 @@ +.TootBottomSheet { + overflow: hidden; + + .Scrollable { + padding-bottom: var(--safe-area-inset-bottom, 0); + overflow-y: auto; + overscroll-behavior-y: contain; + max-height: calc(100vh - var(--scaffold-topbar-height, 0px)); + max-height: calc(100dvh - var(--scaffold-topbar-height, 0px)); + } + + .progress-line { + display: flex; + justify-content: center; + margin-top: 12px; + margin-bottom: 12px; + } +} \ No newline at end of file diff --git a/src/timelines/TootBottomSheet.tsx b/src/timelines/TootBottomSheet.tsx index 92a44c3..1c6b111 100644 --- a/src/timelines/TootBottomSheet.tsx +++ b/src/timelines/TootBottomSheet.tsx @@ -11,9 +11,7 @@ import { import Scaffold from "../material/Scaffold"; import { AppBar, CircularProgress, IconButton, Toolbar } from "@suid/material"; import { Title } from "../material/typography"; -import { - Close as CloseIcon, -} from "@suid/icons-material"; +import { Close as CloseIcon } from "@suid/icons-material"; import { useSessionForAcctStr } from "../masto/clients"; import { resolveCustomEmoji } from "../masto/toot"; import RegularToot, { findElementActionable } from "./RegularToot"; @@ -26,6 +24,7 @@ import TootComposer from "./TootComposer"; import { useDocumentTitle } from "../utils"; import { createTimelineControlsForArray } from "../masto/timelines"; import TootList from "./TootList"; +import "./TootBottomSheet.css"; let cachedEntry: [string, mastodon.v1.Status] | undefined; @@ -245,64 +244,64 @@ const TootBottomSheet: Component = (props) => { } + class="TootBottomSheet" > - - - -
- - - -
- - - refetchContext()} - inReplyToId={remoteToot()?.reblog?.id ?? remoteToot()?.id} +
+ + - - -
- -
-
+
+ + + +
- -
-
+ + refetchContext()} + inReplyToId={remoteToot()?.reblog?.id ?? remoteToot()?.id} + /> + + + +
+ +
+
+ + + +
); };