diff --git a/README.md b/README.md index b44d145d3..427c29f6c 100644 --- a/README.md +++ b/README.md @@ -58,6 +58,12 @@ | 宇熙 | 宇熙 | [53121904@qq.com](mailto:53121904@qq.com) | 年轻的时候不狂,老了拿什么回忆 | | 影子 | 影子 | [305818148@qq.com](mailto:305818148@qq.com) | 年纪大佬才明白人要顺势而为。 | | Ray | Ray | [cnraylee@qq.com](mailto:cnraylee@qq.com) | AI时代的全栈落地工,欢迎找我聊需求 | +| 不见山谷 | 不见山谷
VV:yu170718 | [1762202553@qq.com](mailto:1762202553@qq.com) | 空山不见人,但闻人语响 | +| yep | yep | [1239738103@qq.com](mailto:1239738103@qq.com) | 思考,坚持 | +| 汉堡爸爸 | 汉堡爸爸
VV:jxs62888 | [309151651@qq.com](mailto:309151651@qq.com) | 没什么大不了 | +| bensharp | bensharp
VV:jiahezuiai | [275008147@qq.com](mailto:275008147@qq.com) | 在哪跌倒,就在哪睡一觉 | +| daqzia | daqzia
VV:wangzhiwei-8234 | [wzwzcb@gmail.com](mailto:wzwzcb@gmail.com) | NullPointerException | +| 醒梦 | 醒梦
VV:love-is-heart-is | [1948863412@qq.com](mailto:1948863412@qq.com) | Always believe that good things will happen | ## 交流与反馈 diff --git a/assets/user-bensharp.jpg b/assets/user-bensharp.jpg new file mode 100644 index 000000000..ff5e8f0c6 Binary files /dev/null and b/assets/user-bensharp.jpg differ diff --git a/assets/user-bjsg.jpg b/assets/user-bjsg.jpg new file mode 100644 index 000000000..8747977d0 Binary files /dev/null and b/assets/user-bjsg.jpg differ diff --git a/assets/user-daqzia.jpg b/assets/user-daqzia.jpg new file mode 100644 index 000000000..7cf622777 Binary files /dev/null and b/assets/user-daqzia.jpg differ diff --git a/assets/user-hamburger.jpg b/assets/user-hamburger.jpg new file mode 100644 index 000000000..1b0401c26 Binary files /dev/null and b/assets/user-hamburger.jpg differ diff --git a/assets/user-xingmeng.jpg b/assets/user-xingmeng.jpg new file mode 100644 index 000000000..eb50d7e84 Binary files /dev/null and b/assets/user-xingmeng.jpg differ diff --git a/assets/user-yep.jpg b/assets/user-yep.jpg new file mode 100644 index 000000000..1c4e19b31 Binary files /dev/null and b/assets/user-yep.jpg differ diff --git a/web/src/pages/welcome/contributors-card.tsx b/web/src/pages/welcome/contributors-card.tsx new file mode 100644 index 000000000..3f306b808 --- /dev/null +++ b/web/src/pages/welcome/contributors-card.tsx @@ -0,0 +1,36 @@ +import { ArrowUpRight, UsersRound } from "lucide-react"; + +import { CometCard } from "@/components/ui/aceternity/comet-card"; + +import { welcomeContributors } from "./contributors"; + +const githubContributors = "https://github.com/ddcat-ai/open-ai-canvas#贡献者与团队"; + +export function WelcomeContributorsCard() { + if (!welcomeContributors.length) return null; + + return ( +
+ +
+ Contributors +
+

一起把故事搬上银幕

+

{welcomeContributors.length} 位创作者参与产品、开发、测试与社区建设

+
+ + 查看清单 + +
+ +
+
+ ); +} diff --git a/web/src/pages/welcome/contributors.ts b/web/src/pages/welcome/contributors.ts new file mode 100644 index 000000000..5ecf3f7c7 --- /dev/null +++ b/web/src/pages/welcome/contributors.ts @@ -0,0 +1,45 @@ +import readmeMarkdown from "../../../../README.md?raw"; + +const contributorAvatarModules = import.meta.glob("../../../../assets/user-*", { + eager: true, + import: "default", + query: "?url", +}) as Record; + +export type WelcomeContributor = { + name: string; + avatar: string; + signature: string; +}; + +function plainText(value: string) { + return value + .replace(//gi, " · ") + .replace(/<[^>]+>/g, "") + .replace(/\[([^\]]+)]\([^)]+\)/g, "$1") + .replace(/\s+/g, " ") + .trim(); +} + +function parseContributors(markdown: string): WelcomeContributor[] { + const section = markdown.match(/## 贡献者与团队([\s\S]*?)(?=\n##\s)/)?.[1]; + if (!section) return []; + + return section + .split("\n") + .filter((line) => /^\|\s* { + const columns = line.slice(1, line.lastIndexOf("|")).split("|").map((column) => column.trim()); + const image = columns[0]?.match(/src="([^"]+)"[^>]*alt="([^"]*)"/i); + const name = plainText(columns[1]?.split(//i)[0] ?? image?.[2] ?? ""); + const avatarPath = image?.[1]; + if (!avatarPath || !name) return []; + + const avatar = contributorAvatarModules[`../../../../${avatarPath}`]; + if (!avatar) return []; + + return [{ name, avatar, signature: plainText(columns[3] ?? "") }]; + }); +} + +export const welcomeContributors = parseContributors(readmeMarkdown); diff --git a/web/src/pages/welcome/index.tsx b/web/src/pages/welcome/index.tsx index b4197fc3c..31b8b81eb 100644 --- a/web/src/pages/welcome/index.tsx +++ b/web/src/pages/welcome/index.tsx @@ -1,5 +1,13 @@ import { Component, lazy, Suspense, useEffect, useRef, useState, type ReactNode } from "react"; +import { Button, ConfigProvider, Select, Tabs } from "antd"; import { ArrowDown, ArrowRight, ArrowUpRight, Code2, Menu, Pause, Play, X } from "lucide-react"; + +import { BrandLogo } from "@/components/brand/brand-logo"; +import { IconButton } from "@/components/ui/base/buttons"; +import { getAntThemeConfig } from "@/lib/app-theme"; +import { useAppearanceStore } from "@/stores/use-appearance-store"; + +import { WelcomeContributorsCard } from "./contributors-card"; import { chapters, getWelcomeLook, showcases, welcomeLooks, type WelcomeLook } from "./story"; import "./welcome.css"; @@ -8,6 +16,7 @@ const github = "https://github.com/ddcat-ai/open-ai-canvas"; export default function WelcomePage() { const [look, setLook] = useState(getWelcomeLook); + const appearance = useAppearanceStore((state) => state.appearance); const restorePickerFocus = useRef(false); useEffect(() => { if (!restorePickerFocus.current) return; @@ -28,10 +37,14 @@ export default function WelcomePage() { restorePickerFocus.current = true; setLook(next); }; - return ; + return ( + + + + ); } -function WelcomeExperience({ look, onLookChange }: { look: WelcomeLook; onLookChange: (id: string) => void }) { +function WelcomeExperience({ look, brandName, onLookChange }: { look: WelcomeLook; brandName: string; onLookChange: (id: string) => void }) { const storyRef = useRef(null); const progressRef = useRef(0); const [chapter, setChapter] = useState(0); @@ -40,7 +53,7 @@ function WelcomeExperience({ look, onLookChange }: { look: WelcomeLook; onLookCh const [failed, setFailed] = useState(false); const [ready, setReady] = useState(false); const [menu, setMenu] = useState(false); - const [showcase, setShowcase] = useState(0); + const [showcase, setShowcase] = useState(1); const [playing, setPlaying] = useState(false); const videoRef = useRef(null); @@ -87,18 +100,19 @@ function WelcomeExperience({ look, onLookChange }: { look: WelcomeLook; onLookCh
前往工作台介绍
- 影策 + + } /> + {brandName} + - 开始创作 - + + setMenu(!menu)} />