From f804e062523c0cf97085bb5b9d5299eb71cfd27f Mon Sep 17 00:00:00 2001 From: Xiao Yijun Date: Tue, 7 Feb 2023 16:53:55 +0800 Subject: [PATCH] refactor(console): rename `Go Web` to `Go` in SDK docs (#3063) --- .../assets/docs/tutorial/integrate-sdk/{go-web.mdx => go.mdx} | 0 .../tutorial/integrate-sdk/{go-web_zh-cn.mdx => go_zh-cn.mdx} | 0 .../console/src/pages/Applications/components/Guide/index.tsx | 4 ++-- .../src/pages/Applications/components/GuideHeader/index.tsx | 2 +- packages/console/src/types/applications.ts | 4 ++-- 5 files changed, 5 insertions(+), 5 deletions(-) rename packages/console/src/assets/docs/tutorial/integrate-sdk/{go-web.mdx => go.mdx} (100%) rename packages/console/src/assets/docs/tutorial/integrate-sdk/{go-web_zh-cn.mdx => go_zh-cn.mdx} (100%) diff --git a/packages/console/src/assets/docs/tutorial/integrate-sdk/go-web.mdx b/packages/console/src/assets/docs/tutorial/integrate-sdk/go.mdx similarity index 100% rename from packages/console/src/assets/docs/tutorial/integrate-sdk/go-web.mdx rename to packages/console/src/assets/docs/tutorial/integrate-sdk/go.mdx diff --git a/packages/console/src/assets/docs/tutorial/integrate-sdk/go-web_zh-cn.mdx b/packages/console/src/assets/docs/tutorial/integrate-sdk/go_zh-cn.mdx similarity index 100% rename from packages/console/src/assets/docs/tutorial/integrate-sdk/go-web_zh-cn.mdx rename to packages/console/src/assets/docs/tutorial/integrate-sdk/go_zh-cn.mdx diff --git a/packages/console/src/pages/Applications/components/Guide/index.tsx b/packages/console/src/pages/Applications/components/Guide/index.tsx index 1aae09ea0..fd556014c 100644 --- a/packages/console/src/pages/Applications/components/Guide/index.tsx +++ b/packages/console/src/pages/Applications/components/Guide/index.tsx @@ -31,7 +31,7 @@ const Guides: Record JSX.Elemen vanilla: lazy(async () => import('@/assets/docs/tutorial/integrate-sdk/vanilla.mdx')), express: lazy(async () => import('@/assets/docs/tutorial/integrate-sdk/express.mdx')), next: lazy(async () => import('@/assets/docs/tutorial/integrate-sdk/next.mdx')), - 'go web': lazy(async () => import('@/assets/docs/tutorial/integrate-sdk/go-web.mdx')), + go: lazy(async () => import('@/assets/docs/tutorial/integrate-sdk/go.mdx')), 'ios_zh-cn': lazy(async () => import('@/assets/docs/tutorial/integrate-sdk/ios_zh-cn.mdx')), 'android_zh-cn': lazy( async () => import('@/assets/docs/tutorial/integrate-sdk/android_zh-cn.mdx') @@ -45,7 +45,7 @@ const Guides: Record JSX.Elemen async () => import('@/assets/docs/tutorial/integrate-sdk/express_zh-cn.mdx') ), 'next_zh-cn': lazy(async () => import('@/assets/docs/tutorial/integrate-sdk/next_zh-cn.mdx')), - 'go web_zh-cn': lazy(async () => import('@/assets/docs/tutorial/integrate-sdk/go-web_zh-cn.mdx')), + 'go_zh-cn': lazy(async () => import('@/assets/docs/tutorial/integrate-sdk/go_zh-cn.mdx')), }; const Guide = ({ app, isCompact, onClose }: Props) => { diff --git a/packages/console/src/pages/Applications/components/GuideHeader/index.tsx b/packages/console/src/pages/Applications/components/GuideHeader/index.tsx index f59163cd3..12c0e0f3c 100644 --- a/packages/console/src/pages/Applications/components/GuideHeader/index.tsx +++ b/packages/console/src/pages/Applications/components/GuideHeader/index.tsx @@ -37,7 +37,7 @@ const getSampleProjectUrl = (sdk: SupportedSdk) => { return `${githubUrlPrefix}/js/tree/master/packages/next-sample`; case SupportedSdk.Express: return `${githubUrlPrefix}/js/tree/master/packages/express-sample`; - case SupportedSdk.GoWeb: + case SupportedSdk.Go: return `${githubUrlPrefix}/go/tree/master/gin-sample`; default: return ''; diff --git a/packages/console/src/types/applications.ts b/packages/console/src/types/applications.ts index 84328bb6b..c1ceba4b8 100644 --- a/packages/console/src/types/applications.ts +++ b/packages/console/src/types/applications.ts @@ -15,12 +15,12 @@ export enum SupportedSdk { Vanilla = 'Vanilla', Express = 'Express', Next = 'Next', - GoWeb = 'Go Web', + Go = 'Go', } export const applicationTypeAndSdkTypeMappings = Object.freeze({ [ApplicationType.Native]: [SupportedSdk.iOS, SupportedSdk.Android], [ApplicationType.SPA]: [SupportedSdk.React, SupportedSdk.Vue, SupportedSdk.Vanilla], - [ApplicationType.Traditional]: [SupportedSdk.Next, SupportedSdk.Express, SupportedSdk.GoWeb], + [ApplicationType.Traditional]: [SupportedSdk.Next, SupportedSdk.Express, SupportedSdk.Go], [ApplicationType.MachineToMachine]: [], } as const);