ui: home carousel height lock + bubble polish

- Home: lock category carousel height to the tallest page so the
  Official Recommendations section below does not jump up when
  swiping to a page with fewer categories.
- CollapsibleText: raise default threshold to 25 lines and tighten
  the spacing between the expand-all button and the timestamp
  (drop the fixed h-8 and use mt-1 instead of mt-1.5).
- formatTime: always render dates as yyyy/m/d HH:mm regardless of
  locale, matching the requested timestamp format.
This commit is contained in:
TerryM
2026-05-30 00:43:54 +08:00
parent c0068e957e
commit d7e2e56cde
4 changed files with 19 additions and 33 deletions

View File

@@ -1,6 +1,5 @@
import type { ComponentType } from "react";
import type { Post } from "../../types/post";
import { useI18n } from "../../i18n";
import { TextBubble } from "./bubbles/TextBubble";
import { FileDocBubble } from "./bubbles/FileDocBubble";
import { ImageBubble } from "./bubbles/ImageBubble";
@@ -24,7 +23,6 @@ export function pickBubble(post: Post): BubbleComponent {
}
export function MessageBubble({ post }: { post: Post }) {
const { lang } = useI18n();
const Bubble = pickBubble(post);
const isVisual =
Bubble === AlbumBubble ||
@@ -49,7 +47,7 @@ export function MessageBubble({ post }: { post: Post }) {
isVisual ? "px-4 pb-3 pt-3" : "mt-3"
}`}
>
{formatDateTime(post.publishedAt, lang)}
{formatDateTime(post.publishedAt)}
</time>
</article>
</div>