Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 28 additions & 10 deletions src/theme/Footer/_config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,33 +71,47 @@ export const getNavLinks = (
url: "https://www.leancloud.cn/pricing/index.html",
},
{
label: "下载",
url: "https://leancloud.cn/docs/sdk_down.html",
label: "快速开始",
url: "/sdk/start/guide/",
},
{
label: "常见问题",
url: "https://leancloud.cn/docs/faq.html",
url: "/sdk/start/faq/",
},
{
label: "技术支持",
url: "https://leanticket.cn/",
},
{
label: "健康状态",
url: "https://leancloudstatus.com/",
url: "https://status.leancloud.cn/",
},
];
const NAV_LINKS_LEANCLOUD_GLOBAL: (NavLinkInternal | NavLinkExternal)[] = [
{
label: "Pricing",
url: "https://leancloud.app/pricing",
},
{
label: "社区",
url: "https://forum.leancloud.cn/",
label: "Quick Start",
url: "/sdk/start/guide/",
},
{
label: "博客",
url: "https://leancloudblog.com/",
label: "FAQ",
url: "/sdk/start/faq/",
},
{
label: "Support",
url: "https://ticket.leancloud.app",
},
{
label: "Status",
url: "https://leancloudstatus.com/",
},
];

if (brand === "leancloud") {
return NAV_LINKS_LEANCLOUD_CN;
return region === "cn" ? NAV_LINKS_LEANCLOUD_CN : NAV_LINKS_LEANCLOUD_GLOBAL;
} else {
const NAV_LINKS = region === "cn" ? NAV_LINKS_TDS_CN : NAV_LINKS_TDS_GLOBAL;
return NAV_LINKS.map((link, index) => ({
Expand Down Expand Up @@ -165,7 +179,11 @@ export const getLicenceLinks = (
];

if (brand === "leancloud") {
return LICENCE_LINKS_LEANCLOUD_CN;
if (region === "cn") {
return LICENCE_LINKS_LEANCLOUD_CN;
} else {
return [];
}
} else {
if (region === "cn") {

Expand Down
7 changes: 3 additions & 4 deletions src/theme/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ import Logo from "@theme/Logo";
import { BRAND, REGION } from "../../constants/env";
import { getNavLinks, getLicenceLinks } from "./_config";

function getCopyrightNotice(brand: string): string {
function getCopyrightNotice(region: string): string {
const year = new Date().getFullYear();
const company =
brand === "leancloud" ? "美味书签(上海)信息技术有限公司" : "TapTap";
const company = region === "cn" ? "美味书签(上海)信息技术有限公司" : "LeanCloud";
return `© ${year} ${company}`;
}

Expand Down Expand Up @@ -55,7 +54,7 @@ function Footer() {
</section>

<section className={styles.info}>
<div>{getCopyrightNotice(BRAND)}</div>
<div>{getCopyrightNotice(REGION)}</div>
</section>
</section>
</div>
Expand Down