Skip to content

Commit

Permalink
perf: tarns license, notification, error pange
Browse files Browse the repository at this point in the history
  • Loading branch information
521xueweihan committed Aug 1, 2024
1 parent 1c119b6 commit 95408c6
Show file tree
Hide file tree
Showing 38 changed files with 518 additions and 298 deletions.
4 changes: 2 additions & 2 deletions data/ats.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
## 一、提示

1. 在使用本产品及服务之前,请务必认真阅读并充分理解此《HelloGitHub 用户服务协议》(以下简称“协议”)。当您注册、登录、使用或以其他方式使用本协议设计的相关服务时,即表示您已接受本协议包含的全部内容,本协议即产生法律约束力。
2. 由于互联网高速发展,本协议列明的条款并未必能完整罗列并覆盖您与我们所有权利与义务,现有的约定也不能保证完全符合未来发展的需求。因此,HelloGitHub 服务法律声明、服务规则等内容均为本协议的补充协议,与本协议具有同等法律效力,补充协议未约定的部分以本协议约定为准。**如您使用 HelloGitHub 服务,视为您同意上述补充协议。**
3. 我们可根据国家法律法规变化及服务内容升级、业务发展等需要,不时地修改本协议、补充协议,本协议、补充协议一经修订,修订后的协议版本将替代修订前的协议版本,并通过适当的方式(如网站公告、站内信等)向所有用户公布。**您应当及时关注和了解本协议、补充协议的修订情况,若您在协议生效后继续使用 HelloGitHub 服务的,表示您接受变更后的协议,也将遵循变更后的协议使用服务。若您不同意变更修改后的协议内容,您有权停止使用相关服务;双方协商一致的,也可另行变更相关服务和对应协议内容。**
2. 由于互联网高速发展,本协议列明的条款并未必能完整罗列并覆盖您与我们所有权利与义务,现有的约定也不能保证完全符合未来发展的需求。因此,HelloGitHub 服务法律声明、服务规则等内容均为本协议的补充协议,与本协议具有同等法律效力,补充协议未约定的部分以本协议约定为准。如您使用 HelloGitHub 服务,视为您同意上述补充协议。
3. 我们可根据国家法律法规变化及服务内容升级、业务发展等需要,不时地修改本协议、补充协议,本协议、补充协议一经修订,修订后的协议版本将替代修订前的协议版本,并通过适当的方式(如网站公告、站内信等)向所有用户公布。您应当及时关注和了解本协议、补充协议的修订情况,若您在协议生效后继续使用 HelloGitHub 服务的,表示您接受变更后的协议,也将遵循变更后的协议使用服务。若您不同意变更修改后的协议内容,您有权停止使用相关服务;双方协商一致的,也可另行变更相关服务和对应协议内容。

## 二、服务内容

Expand Down
80 changes: 80 additions & 0 deletions data/ats_en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
Welcome to the HelloGitHub community! HelloGitHub is an internet technology service provided by a group of people who love open source (hereinafter referred to as "we").

## I. Instructions

1. Before using this product and service, please read and fully understand this "HelloGitHub User Service Agreement" (hereinafter referred to as "the Agreement") carefully. When you register, log in, use or use in other ways the services related to this Agreement, it means that you have accepted all the contents of this Agreement, and this Agreement will have legal binding force.
2. Due to the rapid development of the Internet, the terms listed in this Agreement may not be able to list and cover all the rights and obligations between you and us completely, and the existing agreement cannot guarantee to fully meet the needs of future development. Therefore, the legal declarations of HelloGitHub services, service rules, and other contents are all supplementary agreements to this Agreement, and have the same legal effect as this Agreement. The parts not agreed upon in the supplementary agreement shall be subject to the agreement of this Agreement. If you use HelloGitHub services, it is considered that you agree to the above supplementary agreement.
3. We can modify the Agreement and supplementary agreement from time to time according to the changes of national laws and regulations and the needs of service content upgrades, business development, etc. Once the Agreement and supplementary agreement are revised, the revised version of the Agreement will replace the previous version, and it will be announced to all users in an appropriate manner (such as website announcements, site letters, etc.). You should pay attention to and understand the revision of the Agreement and supplementary agreement in time. If you continue to use HelloGitHub services after the agreement comes into effect, it means that you accept the revised agreement and will also follow the revised agreement to use the services. If you do not agree with the content of the revised agreement, you have the right to stop using the relevant services; if both parties agree, you can also change the relevant services and corresponding agreement content.

## II. Service Content

1. HelloGitHub products include the HelloGitHub official website (domain name is https://hellogithub.com), HelloGitHub open source projects, and HelloGitHub mini programs. HelloGitHub will continue to enrich the terminals and forms you use for this service. If you have registered to use a form of service, you can use other services with the same account, and this Agreement automatically applies to your use of all versions of the software and services. This Agreement does not apply to other third-party services provided directly to you through the above-mentioned web pages or HelloGitHub clients (collectively referred to as "third-party services").
2. The specific content of HelloGitHub services is provided by HelloGitHub operators according to the actual situation, including but not limited to your use of HelloGitHub services to publish projects, views, comments, pictures, videos, forward links, etc. HelloGitHub operators have the right to upgrade or adjust the services or product forms they provide, and will update in time.
3. HelloGitHub services support technical functions such as content push, unread message list, and article subscription.
4. You understand and accept that HelloGitHub only provides related network services. In addition to the related network services, the equipment related to the network services (such as personal computers, mobile phones, and other devices related to accessing the Internet or mobile Internet) and the required costs (such as telephone fees and Internet fees paid for accessing the Internet, mobile phone fees paid for using the mobile network) should be borne by you.
5. HelloGitHub has the right to decide to change, upgrade, modify, transfer, and publicize any part of the service and its related functions and application software on the HelloGitHub official website.

## III. Service Change, Interruption or Termination

1. In view of the particularity of network services, HelloGitHub has the right to change, interrupt or terminate part or all of the network services without notifying you, and does not need to bear any responsibility to any user or any third party. HelloGitHub will notify you in the form of public announcement on the HelloGitHub official website as much as possible.
2. You understand and accept that HelloGitHub needs to regularly or irregularly inspect or maintain the platform equipment or related equipment that provides network services such as the Internet website and mobile network. If the network service is interrupted within a reasonable time due to such situations, HelloGitHub does not need to bear any responsibility, but HelloGitHub will notify you in advance as much as possible.
3. If any of the following breaches occur, HelloGitHub has the right to interrupt or terminate the network services provided under this Agreement to you at any time without bearing any responsibility to you or any third party:

(1) The personal information you provide is not true;

(2) You violate the usage rules stipulated in this Agreement.

## IV. Usage Rules

1. You can use any content made, copied, published, and disseminated in the process of using this software and service, including but not limited to HelloGitHub account, avatar, nickname, user description and other registration information, or text, voice, pictures, expressions, and related link pages sent, as well as other content generated by using HelloGitHub account or this software and service.
2. When you register for a HelloGitHub account and create, publish, and disseminate information content, you should use real identity information and personal data, and not register with false or impersonated resident identity information or enterprise-related information; if there are any changes in your personal data, you should update it in time.
3. You must not use a HelloGitHub account or this service to create, copy, publish, and disseminate the following content that interferes with the normal operation of HelloGitHub and infringes on the legitimate rights and interests of other users or third parties, including but not limited to:

(1) Publish, transmit, disseminate, and store content prohibited by national laws and regulations:

(2) Violate the basic principles established by the Constitution;

(3) Endanger national security, leak state secrets, subvert the state power, and undermine national unity;

(4) Damage the national honor and interests;

(5) Incite ethnic hatred, ethnic discrimination, and disrupt national unity;

(6) Undermine national religious policies, promote cults and feudal superstitions;

(7) Spread rumors, disrupt social order, and destabilize society;

(8) Spread obscene, pornographic, gambling, violent, terrorist, or criminal incitement content;

(9) Insult or defame others and infringe on the legitimate rights and interests of others;

(10) Publish, transmit, disseminate, and store content that infringes on the reputation rights, portrait rights, intellectual property rights, trade secrets, and other legal rights of others;

(11) Incite illegal gatherings, associations, parades, demonstrations, and disrupt social order;

(12) Act in the name of illegal civilian organizations;

## V. Intellectual Property

1. HelloGitHub operators are the owners of the ownership and intellectual property rights of the HelloGitHub platform and HelloGitHub products. The aforementioned intellectual property rights include all copyrights, trademark rights, patent rights, trade secrets, and other intellectual property rights of this platform and product;
2. Without the written consent of HelloGitHub or the relevant right holders, you shall not implement, use, transfer the aforementioned intellectual property rights and all information content related to HelloGitHub for any commercial or non-commercial purposes, and you shall not allow any third party to do so;
3. All content you upload and publish in the process of using this product and service will not transfer intellectual property rights, portrait rights, and other rights due to the uploading and publishing behavior.
4. When using the HelloGitHub platform, you may use functions, software, or services developed by third parties that run on the HelloGitHub platform. In addition to complying with the provisions of this Agreement, you should also comply with the relevant third-party regulations and respect the rights of third-party right holders to their functions, software, services, and the content they contain.

## VI. User Personal Information Protection and Data Security

1. Protecting user personal information and data security is one of our basic principles.
2. When you register for an account or use this service, you may need to fill in some necessary information. Please keep this information updated in a timely manner so that we can provide you with help or better services. If there are special provisions in national laws and regulations, you need to fill in real identity information. If the information you fill in is incomplete, you will not be able to use this service or will be restricted in the process of using it.
3. Generally, you can browse and modify the information you submitted at any time, but for security and identity recognition (such as number appeal services), you may not be able to modify the initial registration information and other verification information provided when registering.
4. We will use various security technologies and establish a sound management system to protect your personal information and data security to prevent unauthorized access, use, or disclosure.
5. Except for the following situations, we will not transfer or disclose your personal information and data to any unrelated third party:

(1) Relevant laws and regulations or courts, government agencies require;

(2) Transfer for mergers, divisions, acquisitions, or asset transfers;

(3) Necessary to provide the services you request;

(4) Obtain your explicit consent or authorization in advance.

6. We will do our best to protect the data generated by your use of this service and take reasonable data transmission, storage, transformation, and other preventive protection measures. However,
27 changes: 27 additions & 0 deletions data/level_en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
## What is the Community Level

The HelloGitHub community level is a value system for counting the contributions made by open source enthusiasts to the HelloGitHub community, reflecting the contribution and prestige of open source enthusiasts in this community.

We encourage everyone to share interesting and entry-level open source projects, valuable and attitude-having project reviews, and fair scoring. These actions will earn **contribution points**, and malicious submissions and spam comments will also deduct contribution points.

## Level Benefits

HelloGitHub community levels are calculated and upgraded in real-time based on contribution points.

![](https://img.hellogithub.com/article/level.png)

## Earn and Deduct Contribution Points

Community building depends on everyone; these rules are not shackles that restrict freedom, but the foundation of equality for all.

### 1. Rules for Adding Contribution Points

- **Self-recommendation/Sharing Open Source Projects**: Click on the "Submit Project" on the homepage to share open source projects on GitHub, and you will earn **5 contribution points**.
- **Publish Project Reviews**: Click on "Comment" on the project details page and publish your evaluation of the project. After publishing the comment, you can get **2 contribution points**. If the comment is selected by the administrator as a **hot review**, you can get an additional **10 contribution points**. (Comments cannot be deleted or modified after posting)
- **Participate in Community Building**: Contribute to the community by [contributing code](https://github.com/HelloGitHub-Team/geese), UI design, [feedback BUG](https://hellogithub.yuque.com/forms/share/d268c0c0-283f-482a-9ac8-939aa8027dfb), etc., and you will earn **1-50 contribution points** based on your contributions to the community.

### 2. Rules for Deducting Contribution Points

- **Submitting useless/malicious content**: Posting projects and comments that include but are not limited to spamming, personal attacks, politics, pornography, discrimination, etc., will deduct **2-10 contribution points**. Those with serious circumstances will be banned.

**We hope that this place will become a pure land for open source enthusiasts, where everyone can share and discuss open source projects enthusiastically.**
12 changes: 10 additions & 2 deletions public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,19 @@
"contact_placeholder": "Contact information: WeChat/Phone number/Email",
"submit": "Submit",
"options": {
"feedback": { "name": "Suggestions", "title": "Suggestions for Improvement" },
"feedback": {
"name": "Suggestions",
"title": "Suggestions for Improvement"
},
"bug": { "title": "Issue Feedback" },
"bussiess": { "name": "Business", "title": "Business Cooperation" },
"other": { "name": "Other", "title": "Feel Free to Speak" }
}
},
"redirect": "Leave HelloGitHub community and jump to the URL 👇"
"redirect": "Leave HelloGitHub community and jump to the URL 👇",
"theme": {
"dark": "Dark theme",
"light": "Light theme"
},
"return": "Return to Home"
}
12 changes: 12 additions & 0 deletions public/locales/en/help.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"ats": {
"title": "User Service Agreement"
},
"level": {
"title": "Community Level Rules",
"nav": {
"middle": "Community Levels",
"end": "Overview"
}
}
}
13 changes: 13 additions & 0 deletions public/locales/en/license.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"title": "{{spdx}} Open Source License",
"nav": "License",
"feedback": "Feedback",
"copy": {
"button": "Copy",
"success": "Open source license content copied",
"fail": "Copy failed"
},
"expand": "Expand",
"collapse": "Collapse",
"empty": "No content available"
}
16 changes: 16 additions & 0 deletions public/locales/en/notification.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"title": "Message Center",
"empty": "No messages",
"repository": {
"desc": "You {{content}} open source project "
},
"reply": {
"desc": "replied to you on",
"desc2": ":"
},
"comment": {
"desc": "commented on your",
"desc2": "commented on the project you shared",
"desc3": "open source project:"
}
}
2 changes: 1 addition & 1 deletion public/locales/en/profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@
"review": "Under Review",
"feedback": "Feedback"
}
}
}
7 changes: 6 additions & 1 deletion public/locales/zh/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,10 @@
"other": { "name": "其它", "title": "畅所欲言" }
}
},
"redirect": "即将离开 HelloGitHub 社区,跳转到👇"
"redirect": "即将离开 HelloGitHub 社区,跳转到👇",
"theme": {
"dark": "黑暗主题",
"light": "明亮主题"
},
"return": "返回首页"
}
12 changes: 12 additions & 0 deletions public/locales/zh/help.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"ats": {
"title": "用户服务协议"
},
"level": {
"title": "社区等级规则",
"nav": {
"middle": "社区等级",
"end": "介绍"
}
}
}
13 changes: 13 additions & 0 deletions public/locales/zh/license.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"title": "{{spdx}} 开源协议",
"nav": "协议",
"feedback": "反馈",
"copy": {
"button": "复制",
"success": "开源协议内容已复制",
"fail": "复制失败"
},
"expand": "展开",
"collapse": "收起",
"empty": "暂无内容"
}
16 changes: 16 additions & 0 deletions public/locales/zh/notification.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"title": "消息中心",
"empty": "暂无消息",
"repository": {
"desc": "你{{content}}的开源项目"
},
"reply": {
"desc": "",
"desc2": "项目下回复你:"
},
"comment": {
"desc": "评论你的",
"desc2": "评论你分享的",
"desc3": "开源项目:"
}
}
7 changes: 5 additions & 2 deletions src/components/ThemeSwitch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import { useLoginContext } from '@/hooks/useLoginContext';

import Button from './buttons/Button';

import { TranslationFunction } from '@/types/utils';

type ThemeSwitchProps = {
t?: TranslationFunction;
type?: string;
};

Expand All @@ -21,10 +24,10 @@ export default function ThemeSwitch(props: ThemeSwitchProps) {
changeTheme(newTheme);
};

if (props.type === 'text') {
if (props.type === 'text' && props.t) {
return (
<span onClick={onToggle}>
{theme === 'light' ? '切换黑暗主题' : '切换明亮主题'}
{theme === 'light' ? props.t('theme.dark') : props.t('theme.light')}
</span>
);
}
Expand Down
4 changes: 3 additions & 1 deletion src/components/buttons/LoginButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ import { OAUTH_LOGIN_KEY } from '@/utils/constants';

import { LoginModal } from '../user/Login';

import { TranslationFunction } from '@/types/utils';

type Props = {
platform: 'GitHub' | 'WeChat';
backURL: string;
t: (key: string, text?: any) => string;
t: TranslationFunction;
};

export function OAuthButton({ platform, backURL, t }: Props) {
Expand Down
4 changes: 3 additions & 1 deletion src/components/buttons/RankButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@ import HeaderBtn from '@/components/buttons/HeaderBtn';
import type { option } from '@/components/dropdown/Dropdown';
import Dropdown from '@/components/dropdown/Dropdown';

import { TranslationFunction } from '@/types/utils';

type RankButtonProps = {
t: (key: string) => string;
t: TranslationFunction;
type?: '' | 'dropdown';
};

Expand Down
Loading

0 comments on commit 95408c6

Please sign in to comment.