This commit is contained in:
eric
2026-03-27 18:20:36 -05:00
parent a8976b2eee
commit 326bad4336
34 changed files with 2787 additions and 996 deletions

View File

@@ -7,9 +7,14 @@ import { NetdiskDownloadsSection } from "@/app/components/NetdiskDownloadsSectio
type TopicEbookShowcaseProps = {
onLockedClick?: () => void;
/** VIP 首页:点击「私密社群」打开社群登录信息弹窗 */
onCommunityCardClick?: () => void;
};
export function TopicEbookShowcase({ onLockedClick }: TopicEbookShowcaseProps) {
export function TopicEbookShowcase({
onLockedClick,
onCommunityCardClick,
}: TopicEbookShowcaseProps) {
return (
<section id="topics" className={`${styles.section} ${styles.topicsSection}`}>
{/* 模块展示 */}
@@ -21,6 +26,7 @@ export function TopicEbookShowcase({ onLockedClick }: TopicEbookShowcaseProps) {
{TOPICS_DISPLAY.map((t) => {
const { id, href } = t;
const isLocked = "locked" in t && t.locked && onLockedClick;
const isCommunityModal = id === "community" && onCommunityCardClick;
const content = (
<span className={styles.topicCardInner}>
{isLocked && (
@@ -44,6 +50,19 @@ export function TopicEbookShowcase({ onLockedClick }: TopicEbookShowcaseProps) {
</button>
);
}
if (isCommunityModal) {
return (
<button
key={id}
type="button"
className={styles.topicCard}
onClick={onCommunityCardClick}
style={{ cursor: "pointer", border: "none", font: "inherit" }}
>
{content}
</button>
);
}
if (href) {
return (
<Link