From 3986c4c0924833d7c9d79b3f3229fd47f78327cd Mon Sep 17 00:00:00 2001 From: coder-sett Date: Wed, 28 Jan 2026 17:16:32 +0800 Subject: [PATCH 1/2] feat: add atomgit link Signed-off-by: coder-sett --- apps/web/i18n | 2 +- .../components/Header/CommunityDropdown.tsx | 19 +++++++++++++++++++ apps/web/src/modules/auth/LoginItems.tsx | 2 +- .../src/modules/auth/components/Copyright.tsx | 4 +++- .../submitProject/FormSingleRepo/index.tsx | 2 +- .../submitProject/Misc/InputUrlField.tsx | 2 +- .../src/modules/submitProject/Misc/index.ts | 8 ++++++-- .../src/modules/submitProject/api/gitcode.ts | 10 +++++----- apps/web/src/pages/auth/signin.tsx | 2 +- 9 files changed, 38 insertions(+), 13 deletions(-) diff --git a/apps/web/i18n b/apps/web/i18n index 78e635ba5..4113f9236 160000 --- a/apps/web/i18n +++ b/apps/web/i18n @@ -1 +1 @@ -Subproject commit 78e635ba5af0db4560bcd763801787b080964c65 +Subproject commit 4113f9236275dba6bdc9df2db9baffaaf72def2e diff --git a/apps/web/src/common/components/Header/CommunityDropdown.tsx b/apps/web/src/common/components/Header/CommunityDropdown.tsx index 2deb2c9b7..d3ab71f81 100644 --- a/apps/web/src/common/components/Header/CommunityDropdown.tsx +++ b/apps/web/src/common/components/Header/CommunityDropdown.tsx @@ -8,6 +8,7 @@ import Slack from '@public/images/logos/slack.svg'; import Wechat from '@public/images/logos/wechat.svg'; import Github from '@public/images/logos/github.svg'; import GiteeRed from '@public/images/logos/gitee-red.svg'; +import Gitcode from '@public/images/logos/gitcode-white.png'; import BlogLogo from '@public/images/logos/blog.svg'; import TencentMeeting from '@public/images/logos/tencentmeeting.svg'; @@ -119,6 +120,24 @@ const RepoLinks = () => {

+ +
+ gitcode +
+
+

AtomGit

+

+ {t('common:community.official_repository_on_atomgit', { + defaultValue: 'Official repository on AtomGit', + })} +

+
+
); diff --git a/apps/web/src/modules/auth/LoginItems.tsx b/apps/web/src/modules/auth/LoginItems.tsx index e2741eac9..6632f0ee3 100644 --- a/apps/web/src/modules/auth/LoginItems.tsx +++ b/apps/web/src/modules/auth/LoginItems.tsx @@ -85,7 +85,7 @@ const LoginItems: React.FC = () => {
{ mutation.mutate( {}, diff --git a/apps/web/src/modules/auth/components/Copyright.tsx b/apps/web/src/modules/auth/components/Copyright.tsx index 7980b646a..bad794088 100644 --- a/apps/web/src/modules/auth/components/Copyright.tsx +++ b/apps/web/src/modules/auth/components/Copyright.tsx @@ -3,7 +3,9 @@ import React from 'react'; const Copyright = () => { return (
-

Copyright©2024 OSS-Compass. All Rights Reserved.

+

+ Copyright©{new Date().getFullYear()} OSS-Compass. All Rights Reserved. +

); }; diff --git a/apps/web/src/modules/submitProject/FormSingleRepo/index.tsx b/apps/web/src/modules/submitProject/FormSingleRepo/index.tsx index 7fc3e932e..42c974685 100644 --- a/apps/web/src/modules/submitProject/FormSingleRepo/index.tsx +++ b/apps/web/src/modules/submitProject/FormSingleRepo/index.tsx @@ -141,7 +141,7 @@ const FormSingleRepo = () => { {errors?.url.message} ( {t('submit_project:eg')}: {provider === 'gitcode' - ? 'gitcode.com/xxx/xxx' + ? 'atomgit.com/xxx/xxx 或 gitcode.com/xxx/xxx' : `${provider}.com/xxx/xxx`} ) diff --git a/apps/web/src/modules/submitProject/Misc/InputUrlField.tsx b/apps/web/src/modules/submitProject/Misc/InputUrlField.tsx index 879d83a47..0c4961208 100644 --- a/apps/web/src/modules/submitProject/Misc/InputUrlField.tsx +++ b/apps/web/src/modules/submitProject/Misc/InputUrlField.tsx @@ -124,7 +124,7 @@ const InputUrlField = forwardRef( {message} ( {t('submit_project:eg')}: {provider === 'gitcode' - ? 'gitcode.com/xxx/xxx' + ? 'atomgit.com/xxx/xxx 或 gitcode.com/xxx/xxx' : `${provider}.com/xxx/xxx`} ) diff --git a/apps/web/src/modules/submitProject/Misc/index.ts b/apps/web/src/modules/submitProject/Misc/index.ts index cf68dfccc..da28daa79 100644 --- a/apps/web/src/modules/submitProject/Misc/index.ts +++ b/apps/web/src/modules/submitProject/Misc/index.ts @@ -1,2 +1,6 @@ -export const getUrlReg = (provider: string) => - new RegExp(`^(https://)?${provider}\\.com/.+/.+`, 'i'); +export const getUrlReg = (provider: string) => { + if (provider === 'gitcode') { + return new RegExp(`^(https://)?(gitcode|atomgit)\\.com/.+/.+`, 'i'); + } + return new RegExp(`^(https://)?${provider}\\.com/.+/.+`, 'i'); +}; diff --git a/apps/web/src/modules/submitProject/api/gitcode.ts b/apps/web/src/modules/submitProject/api/gitcode.ts index 4c9a34c85..78704c9f0 100644 --- a/apps/web/src/modules/submitProject/api/gitcode.ts +++ b/apps/web/src/modules/submitProject/api/gitcode.ts @@ -20,7 +20,7 @@ export async function getRepos({ `https://api.gitcode.com/api/v5/users/${username}/repos`, { params: { - access_token: TOKEN, + // access_token: TOKEN, order_by: sort === 'updated' ? 'updated_at' : sort, page, per_page, @@ -42,9 +42,9 @@ export async function getUserOrgs({ return await axios.get( `https://api.gitcode.com/api/v5/users/${username}/orgs`, { - params: { - access_token: TOKEN, - }, + // params: { + // access_token: TOKEN, + // }, headers: { Accept: 'application/json', }, @@ -61,7 +61,7 @@ export async function getOrgRepos({ }: OrgParams): Promise> { return await axios.get(`https://api.gitcode.com/api/v5/orgs/${org}/repos`, { params: { - access_token: TOKEN, + // access_token: TOKEN, order_by: sort === 'updated' ? 'updated_at' : sort, page, per_page, diff --git a/apps/web/src/pages/auth/signin.tsx b/apps/web/src/pages/auth/signin.tsx index 615486920..9da9eae1f 100644 --- a/apps/web/src/pages/auth/signin.tsx +++ b/apps/web/src/pages/auth/signin.tsx @@ -46,7 +46,7 @@ const SignIn: React.FC = () => { -
+
{t('submit_project:by_creating_an_account')} Date: Thu, 29 Jan 2026 09:54:21 +0800 Subject: [PATCH 2/2] feat: update i18n Signed-off-by: coder-sett --- .../components/Header/CommunityDropdown.tsx | 4 +--- .../components/SideBar/index.tsx | 20 +++++++++---------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/apps/web/src/common/components/Header/CommunityDropdown.tsx b/apps/web/src/common/components/Header/CommunityDropdown.tsx index d3ab71f81..6bf7c2397 100644 --- a/apps/web/src/common/components/Header/CommunityDropdown.tsx +++ b/apps/web/src/common/components/Header/CommunityDropdown.tsx @@ -132,9 +132,7 @@ const RepoLinks = () => {

AtomGit

- {t('common:community.official_repository_on_atomgit', { - defaultValue: 'Official repository on AtomGit', - })} + {t('common:community.official_repository_on_atomgit')}

diff --git a/apps/web/src/modules/intelligent-analysis/components/SideBar/index.tsx b/apps/web/src/modules/intelligent-analysis/components/SideBar/index.tsx index 676747db5..3fb9a8fb0 100644 --- a/apps/web/src/modules/intelligent-analysis/components/SideBar/index.tsx +++ b/apps/web/src/modules/intelligent-analysis/components/SideBar/index.tsx @@ -24,16 +24,16 @@ const SideBar: React.FC = () => { icon: , label: t('sidebar.overview'), }, - { - key: 'submit-project', - icon: , - label: t('sidebar.submit_project'), - }, - { - key: 'my-submissions', - icon: , - label: t('sidebar.my_submissions'), - }, + // { + // key: 'submit-project', + // icon: , + // label: t('sidebar.submit_project'), + // }, + // { + // key: 'my-submissions', + // icon: , + // label: t('sidebar.my_submissions'), + // }, ]; const handleMenuClick: MenuProps['onClick'] = (e) => {