refactor(*): 平台架构 - 拆分后端领域模块并同步插件协议与模型能力
This commit is contained in:
1 parent
916043fb5a
commit
6e5cbc8b05
644 files changed
+62731
-2320
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { ArrowUpRight, UsersRound } from "lucide-react";
|
||||
import { ArrowUpRight, BadgeCheck, UsersRound } from "lucide-react";
|
||||
|
||||
import { CometCard } from "@/components/ui/aceternity/comet-card";
|
||||
|
||||
@@ -13,20 +13,43 @@ export function WelcomeContributorsCard() {
|
||||
<section className="welcome-contributors" aria-labelledby="welcome-contributors-title">
|
||||
<CometCard containerClassName="welcome-contributors-perspective" className="welcome-contributors-card" rotateDepth={3.5} translateDepth={3}>
|
||||
<div className="welcome-contributors-heading">
|
||||
<span className="welcome-contributors-kicker"><UsersRound size={15} />Contributors</span>
|
||||
<span className="welcome-contributors-kicker">
|
||||
<UsersRound size={15} />
|
||||
Contributors
|
||||
</span>
|
||||
<div>
|
||||
<h3 id="welcome-contributors-title">一起把故事搬上银幕</h3>
|
||||
<p>{welcomeContributors.length} 位创作者参与产品、开发、测试与社区建设</p>
|
||||
</div>
|
||||
<a href={githubContributors} target="_blank" rel="noreferrer" aria-label="在 GitHub README 查看贡献者清单">
|
||||
查看清单<ArrowUpRight size={14} />
|
||||
查看清单
|
||||
<ArrowUpRight size={14} />
|
||||
</a>
|
||||
</div>
|
||||
<ul className="welcome-contributors-list" aria-label="项目贡献者">
|
||||
{welcomeContributors.map((contributor) => (
|
||||
<li key={contributor.name} title={contributor.signature || contributor.name}>
|
||||
<li
|
||||
key={contributor.name}
|
||||
className={contributor.isFounder ? "is-founder" : undefined}
|
||||
title={contributor.signature || contributor.name}
|
||||
aria-label={[contributor.name, contributor.wechat && `微信:${contributor.wechat}`, contributor.email].filter(Boolean).join(",")}
|
||||
>
|
||||
<img src={contributor.avatar} alt="" loading="lazy" />
|
||||
<span>{contributor.name}</span>
|
||||
{contributor.isFounder ? (
|
||||
<div className="welcome-contributor-content">
|
||||
<div className="welcome-contributor-name-row">
|
||||
<span className="welcome-contributor-name">{contributor.name}</span>
|
||||
<span className="welcome-contributor-badge">
|
||||
<BadgeCheck size={13} />
|
||||
项目发起者
|
||||
</span>
|
||||
</div>
|
||||
<p className="welcome-contributor-meta">{[contributor.wechat && `微信:${contributor.wechat}`, contributor.email].filter(Boolean).join(" · ")}</p>
|
||||
<p className="welcome-contributor-signature">{contributor.signature}</p>
|
||||
</div>
|
||||
) : (
|
||||
<span>{contributor.name}</span>
|
||||
)}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
|
||||
@@ -10,6 +10,9 @@ export type WelcomeContributor = {
|
||||
name: string;
|
||||
avatar: string;
|
||||
signature: string;
|
||||
email?: string;
|
||||
wechat?: string;
|
||||
isFounder?: boolean;
|
||||
};
|
||||
|
||||
function plainText(value: string) {
|
||||
@@ -29,16 +32,33 @@ function parseContributors(markdown: string): WelcomeContributor[] {
|
||||
.split("\n")
|
||||
.filter((line) => /^\|\s*<img\s/i.test(line))
|
||||
.flatMap((line) => {
|
||||
const columns = line.slice(1, line.lastIndexOf("|")).split("|").map((column) => column.trim());
|
||||
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(/<br\s*\/?>/i)[0] ?? image?.[2] ?? "");
|
||||
const nameColumn = columns[1] ?? "";
|
||||
const name = plainText(nameColumn.split(/<br\s*\/?>/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] ?? "") }];
|
||||
const nameDetails = plainText(nameColumn);
|
||||
const email = plainText(columns[2] ?? "");
|
||||
const wechat = nameDetails.match(/微信\s*[::]\s*([^·]+)/)?.[1]?.trim();
|
||||
|
||||
return [
|
||||
{
|
||||
name,
|
||||
avatar,
|
||||
signature: plainText(columns[3] ?? ""),
|
||||
email: email || undefined,
|
||||
wechat,
|
||||
isFounder: nameDetails.includes("项目发起者"),
|
||||
},
|
||||
];
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -143,7 +143,8 @@ function WelcomeExperience({ look, brandName, onLookChange }: { look: WelcomeLoo
|
||||
<div className="welcome-workbench-caption"><p>{active.detail}</p></div>
|
||||
</section>
|
||||
|
||||
<section className="welcome-ending"><h2>你的故事,<br />现在开始。</h2><Button className="welcome-primary" type="primary" size="large" href="/create" icon={<ArrowRight size={20} />} iconPlacement="end">开始创作</Button><a className="welcome-source" href={github} target="_blank" rel="noreferrer"><Code2 size={16} />GitHub<ArrowUpRight size={14} /></a><WelcomeContributorsCard /></section>
|
||||
<section className="welcome-ending"><h2>你的故事,<br />现在开始。</h2>
|
||||
<WelcomeContributorsCard /></section>
|
||||
</main>
|
||||
<footer className="welcome-footer"><a href="/welcome">{brandName}</a><span>开源 AI 影视创作工作台</span><a href={`${github}/blob/main/LICENSE`} target="_blank" rel="noreferrer">Open Source · MIT License<ArrowUpRight size={12} /></a></footer>
|
||||
{look.credit && <div className="welcome-media-credit"><a href={`/welcome/credits.html#${look.id}`} target="_blank" rel="noreferrer">{look.credit} · 署名与许可<ArrowUpRight size={12} /></a></div>}
|
||||
|
||||
+910
-160
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user