Skip to content

Commit 0843964

Browse files
MrMushrooooomfwang
andauthored
feat(web): use Feishu for Chinese community links (anomalyco#16908)
Co-authored-by: Frank <[email protected]>
1 parent a1b06d6 commit 0843964

7 files changed

Lines changed: 19 additions & 3 deletions

File tree

README.zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,4 @@ OpenCode 内置两种 Agent,可用 `Tab` 键快速切换:
137137

138138
---
139139

140-
**加入我们的社区** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode)
140+
**加入我们的社区** [飞书](https://applink.feishu.cn/client/chat/chatter/add_by_link?link_token=de8k6664-1b5e-43f2-8efd-21d6772647b5&qr_code=true) | [X.com](https://x.com/opencode)

README.zht.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,4 +137,4 @@ OpenCode 內建了兩種 Agent,您可以使用 `Tab` 鍵快速切換。
137137

138138
---
139139

140-
**加入我們的社群** [Discord](https://discord.gg/opencode) | [X.com](https://x.com/opencode)
140+
**加入我們的社群** [飞书](https://applink.feishu.cn/client/chat/chatter/add_by_link?link_token=de8k6664-1b5e-43f2-8efd-21d6772647b5&qr_code=true) | [X.com](https://x.com/opencode)

packages/console/app/src/component/footer.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ import { useI18n } from "~/context/i18n"
88
export function Footer() {
99
const language = useLanguage()
1010
const i18n = useI18n()
11+
const community = createMemo(() => {
12+
const locale = language.locale()
13+
return locale === "zh" || locale === "zht"
14+
? ({ key: "footer.feishu", link: language.route("/feishu") } as const)
15+
: ({ key: "footer.discord", link: language.route("/discord") } as const)
16+
})
1117
const githubData = createAsync(() => github())
1218
const starCount = createMemo(() =>
1319
githubData()?.stars
@@ -32,7 +38,7 @@ export function Footer() {
3238
<a href={language.route("/changelog")}>{i18n.t("footer.changelog")}</a>
3339
</div>
3440
<div data-slot="cell">
35-
<a href={language.route("/discord")}>{i18n.t("footer.discord")}</a>
41+
<a href={community().link}>{i18n.t(community().key)}</a>
3642
</div>
3743
<div data-slot="cell">
3844
<a href={config.social.twitter}>{i18n.t("footer.x")}</a>

packages/console/app/src/i18n/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export const dict = {
2121
"footer.github": "GitHub",
2222
"footer.docs": "Docs",
2323
"footer.changelog": "Changelog",
24+
"footer.feishu": "Feishu",
2425
"footer.discord": "Discord",
2526
"footer.x": "X",
2627

packages/console/app/src/i18n/zh.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export const dict = {
2424
"footer.github": "GitHub",
2525
"footer.docs": "文档",
2626
"footer.changelog": "更新日志",
27+
"footer.feishu": "飞书",
2728
"footer.discord": "Discord",
2829
"footer.x": "X",
2930

packages/console/app/src/i18n/zht.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ export const dict = {
2424
"footer.github": "GitHub",
2525
"footer.docs": "文件",
2626
"footer.changelog": "更新日誌",
27+
"footer.feishu": "飞书",
2728
"footer.discord": "Discord",
2829
"footer.x": "X",
2930

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { redirect } from "@solidjs/router"
2+
3+
export async function GET() {
4+
return redirect(
5+
"https://applink.feishu.cn/client/chat/chatter/add_by_link?link_token=de8k6664-1b5e-43f2-8efd-21d6772647b5&qr_code=true",
6+
)
7+
}

0 commit comments

Comments
 (0)