Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 2, 2023. It is now read-only.
/golangci-webPublic archive

Commitb4f8108

Browse files
committed
add security and pricing
1 parentfb40f59 commitb4f8108

File tree

9 files changed

+186
-35
lines changed

9 files changed

+186
-35
lines changed
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
import*asReactfrom"react";
2+
import{HashLinkasLink}from"react-router-hash-link";
3+
import{connect}from"react-redux";
4+
import{IAppStore}from"reducers";
5+
import{Icon,Row,Button}from"antd";
6+
import{checkAuth,IUser}from"modules/auth";
7+
8+
importPricingTable,{Plan}from"components/blocks/PricingTable";
9+
import{push,LocationAction}from"react-router-redux";
10+
11+
interfaceIStateProps{
12+
currentUser?:IUser;
13+
}
14+
15+
interfaceIDispatchProps{
16+
checkAuth():void;
17+
push:LocationAction;
18+
}
19+
20+
interfaceIOwnProps{
21+
showLinkOnMoreDetails:boolean;
22+
}
23+
24+
interfaceIPropsextendsIStateProps,IDispatchProps,IOwnProps{}
25+
26+
classAllPricingPlansextendsReact.Component<IProps>{
27+
publiccomponentWillMount(){
28+
this.props.checkAuth();
29+
}
30+
31+
privateonPricingPlanChoose(chosenPlan:Plan){
32+
if(chosenPlan===Plan.Enterprise){
33+
window.location.replace(`mailto:denis@golangci.com`);
34+
return;
35+
}
36+
37+
if(!this.props.currentUser){
38+
window.location.replace(`${API_HOST}/v1/auth/github`);
39+
return;
40+
}
41+
42+
this.props.push("/repos/github");
43+
}
44+
45+
publicrender(){
46+
return(
47+
<sectionclassName="home-section-gradient home-section">
48+
<divclassName="home-section-content">
49+
<Rowtype="flex"justify="center">
50+
<pid="pricing"className="home-section-header home-section-gradient-header">Pricing</p>
51+
</Row>
52+
53+
<PricingTable
54+
authorized={this.props.currentUser ?true :false}
55+
onButtonClick={this.onPricingPlanChoose.bind(this)}
56+
/>
57+
58+
{this.props.showLinkOnMoreDetails&&(
59+
<Rowtype="flex"justify="center"className="next-row-in-section">
60+
<Linkto="/pricing">
61+
<Buttontype="primary"size="large">
62+
<Icontype="info-circle"/>
63+
Learn more about pricing
64+
</Button>
65+
</Link>
66+
</Row>
67+
)}
68+
</div>
69+
</section>
70+
);
71+
}
72+
}
73+
74+
constmapStateToProps=(state:IAppStore):any=>({
75+
currentUser:state.auth.currentUser,
76+
});
77+
78+
constmapDispatchToProps={
79+
checkAuth,
80+
push,
81+
};
82+
83+
exportdefaultconnect<IStateProps,IDispatchProps,IOwnProps>(mapStateToProps,mapDispatchToProps)(AllPricingPlans);

‎src/components/blocks/PricingTable.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export function buildPricingPlan(plan: Plan, buttonText: string, onButtonClick:
5353
insteadOfPriceText="Self-hosted"
5454
features={[
5555
"For GitHub Enterprise",
56+
"Priority support",
5657
]}
5758
buttonText={buttonText}
5859
onButtonClick={onButtonClick}

‎src/components/blocks/Security.tsx‎

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import*asReactfrom"react";
2+
import{Row,Button}from"antd";
3+
4+
constSecurity:React.StatelessComponent<any>=(props)=>(
5+
<sectionclassName="home-section home-section-padded">
6+
<divclassName="home-section-content">
7+
<Rowtype="flex"justify="center">
8+
<pid="why-us"className="home-section-header">Uncomfortable giving us access to your code?</p>
9+
</Row>
10+
<Rowtype="flex"justify="center">
11+
<divclassName="full-screen-image">
12+
<pclassName="home-section-text">
13+
Don’t worry, we get it. Our mission is to help you maintain a clean code base, nothing more.
14+
Our security documentation details what kind of access we need and why.
15+
</p>
16+
</div>
17+
</Row>
18+
<Rowtype="flex"justify="center"className="next-row-in-section">
19+
<atarget="_blank"href="https://github.com/golangci/golangci/wiki/GolangCI-Security">
20+
<Buttonsize="large">
21+
Read our security policy
22+
</Button>
23+
</a>
24+
</Row>
25+
</div>
26+
</section>
27+
);
28+
29+
exportdefaultSecurity;

‎src/components/layout/Footer.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class Footer extends React.Component<IProps> {
8080
<li><Linkto="/product#control-panel">Control Panel</Link></li>
8181
<li><Linkto="/product#analysis-reports">Analysis Reports</Link></li>
8282
<li><Linkto="/product#custom-build-steps">Custom Build Steps</Link></li>
83-
<li><Linkto="/#pricing">Pricing</Link></li>
83+
<li><Linkto="/pricing">Pricing</Link></li>
8484
</ul>
8585
</>)}
8686

@@ -91,6 +91,7 @@ class Footer extends React.Component<IProps> {
9191
<li><Linkto="/about">About</Link></li>
9292
<li><atarget="_blank"href="https://medium.com/golangci">Blog</a></li>
9393
<li><atarget="_blank"href="https://github.com/golangci/golangci">GitHub</a></li>
94+
<li><atarget="_blank"href="https://github.com/golangci/golangci/wiki/GolangCI-Security">Security</a></li>
9495
</ul>
9596
</>)}
9697

‎src/components/layout/Header.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class MyHeader extends React.Component<IProps> {
4141
constmenuItems=[];
4242
if(!this.props.currentUser){
4343
menuItems.push(<Menu.Itemkey="1"><Linkto="/product">Product</Link></Menu.Item>);
44-
menuItems.push(<Menu.Itemkey="2"><Linkto="/#pricing">Pricing</Link></Menu.Item>);
44+
menuItems.push(<Menu.Itemkey="2"><Linkto="/pricing">Pricing</Link></Menu.Item>);
4545
menuItems.push(<Menu.Itemkey="3"><atarget="_blank"href="https://medium.com/golangci">Blog</a></Menu.Item>);
4646
menuItems.push(<Menu.Itemkey="4"><ahref={`${API_HOST}/v1/auth/github`}>Login</a></Menu.Item>);
4747
}elseif(mode==="inline"){

‎src/components/pages/Home.tsx‎

Lines changed: 8 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,20 @@ import { connect } from "react-redux";
66
import{IAppStore}from"reducers";
77
import{checkAuth,IUser}from"modules/auth";
88
import{Link}from"react-router-dom";
9-
importPricingTable,{Plan}from"components/blocks/PricingTable";
10-
import{push,LocationAction}from"react-router-redux";
119
importProductIntrofrom"components/blocks/ProductIntro";
1210
importWhyUsfrom"components/blocks/WhyUs";
1311
importSupportedLintersfrom"components/blocks/SupportedLinters";
1412
importWhyDoYouNeedItfrom"components/blocks/WhyDoYouNeedIt";
1513
importCustomersfrom"components/blocks/Customers";
14+
importAllPricingPlansfrom"components/blocks/AllPricingPlans";
15+
importSecurityfrom"components/blocks/Security";
1616

1717
interfaceIStateProps{
1818
currentUser?:IUser;
1919
}
2020

2121
interfaceIDispatchProps{
2222
checkAuth():void;
23-
push:LocationAction;
2423
}
2524

2625
interfaceIPropsextendsIStateProps,IDispatchProps{}
@@ -82,36 +81,8 @@ class Home extends React.Component<IProps> {
8281
return<ProductIntroshowLinkOnMoreDetails/>;
8382
}
8483

85-
privateonPricingPlanChoose(chosenPlan:Plan){
86-
if(chosenPlan===Plan.Enterprise){
87-
window.location.replace(`mailto:denis@golangci.com`);
88-
return;
89-
}
90-
91-
if(!this.props.currentUser){
92-
window.location.replace(`${API_HOST}/v1/auth/github`);
93-
return;
94-
}
95-
96-
this.props.push("/repos/github");
97-
}
98-
9984
privaterenderPricingSection(){
100-
return(
101-
<sectionclassName="home-section-gradient home-section">
102-
<divclassName="home-section-content">
103-
<Rowtype="flex"justify="center">
104-
<pid="pricing"className="home-section-header home-section-gradient-header">Pricing</p>
105-
</Row>
106-
107-
<PricingTable
108-
authorized={this.props.currentUser ?true :false}
109-
onButtonClick={this.onPricingPlanChoose.bind(this)}
110-
/>
111-
112-
</div>
113-
</section>
114-
);
85+
return<AllPricingPlansshowLinkOnMoreDetails/>;
11586
}
11687

11788
privaterenderWhyUsSection(){
@@ -155,6 +126,10 @@ class Home extends React.Component<IProps> {
155126
return<Customers/>;
156127
}
157128

129+
privaterenderSecuritySection(){
130+
return<Security/>;
131+
}
132+
158133
publicrender(){
159134
return(
160135
<>
@@ -167,6 +142,7 @@ class Home extends React.Component<IProps> {
167142
{this.renderCustomersSection()}
168143
{this.renderLearnMore()}
169144
{this.renderPricingSection()}
145+
{this.renderSecuritySection()}
170146
</>
171147
);
172148
}
@@ -178,7 +154,6 @@ const mapStateToProps = (state: IAppStore): any => ({
178154

179155
constmapDispatchToProps={
180156
checkAuth,
181-
push,
182157
};
183158

184159
exportdefaultconnect<IStateProps,IDispatchProps,void>(mapStateToProps,mapDispatchToProps)(Home);
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
import*asReactfrom"react";
2+
importAllPricingPlansfrom"components/blocks/AllPricingPlans";
3+
import{Row,Button}from"antd";
4+
importHelmetfrom"react-helmet";
5+
6+
constfaqBlock=(
7+
<sectionclassName="home-section home-section-padded">
8+
<divclassName="home-section-content">
9+
<Rowtype="flex"justify="center">
10+
<pid="#faq"className="home-section-header">FAQ</p>
11+
</Row>
12+
<Rowtype="flex"justify="center">
13+
<divclassName="full-screen-image">
14+
<h2>Is my code secure?</h2>
15+
<pclassName="home-section-text">
16+
Yes, it is secure. Code security is one of the most important aspects to us.
17+
Learn more about<atarget="_blank"href="https://github.com/golangci/golangci/wiki/GolangCI-Security">security in GolangCI</a>.
18+
</p>
19+
20+
<h2>Which payment methods do you accept?</h2>
21+
<pclassName="home-section-text">
22+
We use<atarget="_blank"href="https://paddle.com">Paddle</a> so we currently accept Visa, Mastercard, American Express, and PayPal.
23+
Please<ahref="mailto:denis@golangci.com">contact us</a> if your payment method is not supported.
24+
</p>
25+
26+
<h2>Can I change or cancel my plan anytime?</h2>
27+
<pclassName="home-section-text">
28+
Yes, your plan can be canceled anytime from the "subscription" page in your account.
29+
You can change your plan only manually by<ahref="mailto:denis@golangci.com">contacting us</a>.
30+
</p>
31+
32+
<h2>What is a user?</h2>
33+
<pclassName="home-section-text">
34+
A use is a unique GitHub committer (determined by Git commit author's email).
35+
</p>
36+
</div>
37+
</Row>
38+
39+
<Rowtype="flex"justify="center"className="next-row-in-section">
40+
<ahref="mailto:denis@golangci.com">
41+
<Buttontype="primary"size="large">
42+
More questions? Contact us
43+
</Button>
44+
</a>
45+
</Row>
46+
</div>
47+
</section>
48+
);
49+
50+
constPricing:React.StatelessComponent<any>=(props)=>(
51+
<>
52+
<Helmettitle={"GolangCI Pricing"}/>
53+
<AllPricingPlansshowLinkOnMoreDetails={false}/>
54+
{faqBlock}
55+
</>
56+
);
57+
58+
exportdefaultPricing;

‎src/components/pages/static/Product.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import pullDetailLinkImage from "assets/images/product/pull_detail_link.png";
1212
importreportForRepoImagefrom"assets/images/product/report_of_repo_with_issues.png";
1313
importbuildLogImagefrom"assets/images/product/build_log.png";
1414
importcustomBuildStepsImagefrom"assets/images/product/custom_build_steps.png";
15+
importHelmetfrom"react-helmet";
1516

1617
constsuggestedChangeBlock=(
1718
<sectionclassName="home-section home-section-padded">
@@ -114,6 +115,7 @@ const customBuildStepsBlock = (
114115

115116
constProduct:React.StatelessComponent<any>=(props)=>(
116117
<>
118+
<Helmettitle={"GolangCI Product"}/>
117119
<ProductIntroshowLinkOnMoreDetails={false}/>
118120
{suggestedChangeBlock}
119121
{repoListBlock}

‎src/routes/routes.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import Terms from "components/pages/static/Terms";
1010
importPrivacyfrom"components/pages/static/Privacy";
1111
importAboutfrom"components/pages/static/About";
1212
importProductfrom"components/pages/static/Product";
13+
importPricingfrom"components/pages/static/Pricing";
1314

1415
exportdefault()=>(
1516
<App>
@@ -25,6 +26,7 @@ export default () => (
2526
<Routeexactpath="/privacy"component={Privacy}/>
2627
<Routeexactpath="/about"component={About}/>
2728
<Routeexactpath="/product"component={Product}/>
29+
<Routeexactpath="/pricing"component={Pricing}/>
2830
</Switch>
2931
</App>
3032
);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp