Skip to content

Commit 361a009

Browse files
committed
Merge branch 'release/v3.4.0'
2 parents 9225640 + 6d9d761 commit 361a009

File tree

163 files changed

+1984
-1945
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

163 files changed

+1984
-1945
lines changed

Diff for: .eslintrc.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,15 @@ module.exports = {
1010
},
1111
"plugins": [
1212
"import",
13-
"react",
14-
"prettier"
13+
"react"
1514
],
1615
"extends": [
1716
"eslint:recommended",
1817
"plugin:react/recommended",
1918
"plugin:import/errors",
20-
"plugin:import/warnings",
21-
"prettier"
19+
"plugin:import/warnings"
2220
],
23-
"parser": "babel-eslint",
21+
"parser": "@babel/eslint-parser",
2422
"parserOptions": {
2523
"ecmaVersion": 6,
2624
"sourceType": "module",
@@ -57,7 +55,6 @@ module.exports = {
5755
}
5856
],
5957
"prefer-const": "error",
60-
"prettier/prettier": ["error"],
6158
"quotes": [
6259
"error",
6360
"single",
@@ -86,6 +83,9 @@ module.exports = {
8683
],
8784
"import/no-named-as-default-member": [
8885
"off"
86+
],
87+
"react/prop-types": [
88+
"off"
8989
]
9090
}
9191
};

Diff for: .github/workflows/app.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
steps:
1010
- uses: actions/checkout@v2
1111
- name: Install Node.js
12-
uses: actions/setup-node@v1
12+
uses: actions/setup-node@v2
1313
- run: npm install
1414
- run: npm run lint
1515
- run: npm run build

Diff for: app/app.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import routes from './routes';
2929

3030
export default class App extends React.Component {
3131
static contextTypes = {
32-
router: PropTypes.object.isRequired
32+
router: PropTypes.object.isRequired,
3333
};
3434

3535
renderHeader() {
@@ -100,7 +100,7 @@ export default class App extends React.Component {
100100
{routes
101101
.slice(0)
102102
.reverse()
103-
.map(item => (
103+
.map((item) => (
104104
<Route
105105
path={item.path}
106106
key={item.path}

Diff for: app/config.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ if (pathname[pathname.length - 1] !== '/') {
2525
}
2626
let wsrpc = `ws://127.0.0.1:8008${pathname}wsrpc`;
2727
if (process.env.NODE_ENV === 'production' && window.location && window.location.host) {
28-
wsrpc = `ws://${window.location.host}${pathname}wsrpc`;
28+
wsrpc = `${window.location.protocol === 'https:' ? 'wss:' : 'ws:'}//${
29+
window.location.host
30+
}${pathname}wsrpc`;
2931
}
3032
export const BACKEND_ENDPOINT = wsrpc;

Diff for: app/footer.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { osOpenUrl } from './modules/core/actions';
2525

2626
class AppFooter extends React.Component {
2727
static propTypes = {
28-
osOpenUrl: PropTypes.func.isRequired
28+
osOpenUrl: PropTypes.func.isRequired,
2929
};
3030

3131
render() {
@@ -111,5 +111,5 @@ class AppFooter extends React.Component {
111111
}
112112

113113
export default connect(null, {
114-
osOpenUrl
114+
osOpenUrl,
115115
})(AppFooter);

Diff for: app/index.html

+9
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,15 @@
2727
return null;
2828
}
2929

30+
/**
31+
* Re-broadcast events for VSCode
32+
* See https://github.com/microsoft/vscode/issues/135017
33+
*/
34+
window.addEventListener('message', (e) => {
35+
if (e.data.command === 'execCommand') {
36+
document.execCommand(e.data.data);
37+
}
38+
});
3039
function onDidKeyDown(e) {
3140
const obj = {
3241
altKey: e.altKey,

Diff for: app/index.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { Provider } from 'react-redux';
2525
import React from 'react';
2626
import { render } from 'react-dom';
2727

28-
window.addEventListener('error', err => reportException(err, true));
28+
window.addEventListener('error', (err) => reportException(err, true));
2929

3030
render(
3131
<AppContainer>

Diff for: app/modules/account/actions.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const loadAccountInfo = (extended = false) =>
3131
export const loginAccount = (username, password, onEnd) =>
3232
createAction(LOGIN_ACCOUNT, { username, password, onEnd });
3333
export const logoutAccount = () => createAction(LOGOUT_ACCOUNT);
34-
export const loginWithProvider = provider =>
34+
export const loginWithProvider = (provider) =>
3535
createAction(LOGIN_WITH_PROVIDER, { provider });
3636
export const registerAccount = (
3737
username,
@@ -47,7 +47,7 @@ export const registerAccount = (
4747
firstname,
4848
lastname,
4949
password,
50-
onEnd
50+
onEnd,
5151
});
5252
export const updateProfile = (
5353
username,
@@ -63,7 +63,7 @@ export const updateProfile = (
6363
firstname,
6464
lastname,
6565
currentPassword,
66-
onEnd
66+
onEnd,
6767
});
6868
export const forgotAccountPassword = (username, onEnd) =>
6969
createAction(FORGOT_ACCOUNT, { username, onEnd });

Diff for: app/modules/account/components/forgot-form.jsx

+9-9
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ export default class AccountForgotForm extends React.Component {
2626
forgotAccountPassword: PropTypes.func.isRequired,
2727
showLoginPage: PropTypes.func.isRequired,
2828
showRegistrationPage: PropTypes.func.isRequired,
29-
osOpenUrl: PropTypes.func.isRequired
29+
osOpenUrl: PropTypes.func.isRequired,
3030
};
3131

3232
constructor() {
3333
super(...arguments);
3434
this.state = {
35-
loading: false
35+
loading: false,
3636
};
3737
}
3838

@@ -43,11 +43,11 @@ export default class AccountForgotForm extends React.Component {
4343
return;
4444
}
4545
this.setState({
46-
loading: true
46+
loading: true,
4747
});
48-
this.props.forgotAccountPassword(values.username, err => {
48+
this.props.forgotAccountPassword(values.username, (err) => {
4949
this.setState({
50-
loading: false
50+
loading: false,
5151
});
5252
if (!err) {
5353
this.props.showLoginPage();
@@ -69,15 +69,15 @@ export default class AccountForgotForm extends React.Component {
6969
rules: [
7070
{
7171
required: true,
72-
message: 'Please input your username or email'
73-
}
74-
]
72+
message: 'Please input your username or email',
73+
},
74+
],
7575
})(
7676
<Input
7777
prefix={<Icon type="user" style={{ fontSize: 13 }} />}
7878
placeholder="Username or email"
7979
size="large"
80-
ref={elm => elm.focus()}
80+
ref={(elm) => elm.focus()}
8181
/>
8282
)}
8383
</Form.Item>

Diff for: app/modules/account/components/information.jsx

+16-16
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ export default class AccountInformation extends React.Component {
2727
username: PropTypes.string.isRequired,
2828
email: PropTypes.string.isRequired,
2929
firstname: PropTypes.string,
30-
lastname: PropTypes.string
30+
lastname: PropTypes.string,
3131
}).isRequired,
3232
packages: PropTypes.array,
33-
subscriptions: PropTypes.array
33+
subscriptions: PropTypes.array,
3434
}).isRequired,
3535
logoutAccount: PropTypes.func.isRequired,
36-
osOpenUrl: PropTypes.func.isRequired
36+
osOpenUrl: PropTypes.func.isRequired,
3737
};
3838

3939
render() {
@@ -69,47 +69,47 @@ export default class AccountInformation extends React.Component {
6969
{
7070
title: 'Plan',
7171
dataIndex: 'product_name',
72-
key: 'product_name'
72+
key: 'product_name',
7373
},
7474
{
7575
title: 'Start Date',
7676
dataIndex: 'begin_at',
7777
key: 'begin_at',
78-
render: text => (
78+
render: (text) => (
7979
<Tooltip title={new Date(text).toString()}>
8080
{humanize.date('F j, Y', new Date(text))}
8181
</Tooltip>
82-
)
82+
),
8383
},
8484
{
8585
title: 'End Date',
8686
dataIndex: 'end_at',
8787
key: 'end_at',
88-
render: text => (
88+
render: (text) => (
8989
<Tooltip
9090
title={parseInt(text) ? new Date(parseInt(text) * 1000).toString() : ''}
9191
>
9292
{parseInt(text) ? humanize.date('F j, Y', parseInt(text)) : '-'}
9393
</Tooltip>
94-
)
94+
),
9595
},
9696
{
9797
title: 'Next Payment',
9898
dataIndex: 'next_bill_at',
9999
key: 'next_bill_at',
100-
render: text => (
100+
render: (text) => (
101101
<Tooltip title={new Date(text).toString()}>
102102
{humanize.date('F j, Y', new Date(text))}
103103
</Tooltip>
104-
)
104+
),
105105
},
106106
{
107107
title: 'State',
108108
dataIndex: 'status',
109109
key: 'status',
110-
render: text => (
110+
render: (text) => (
111111
<Tag color={text == 'active' ? '#87d068' : '#f5222d'}>{text}</Tag>
112-
)
112+
),
113113
},
114114
{
115115
title: 'Action',
@@ -121,8 +121,8 @@ export default class AccountInformation extends React.Component {
121121
<Divider type="vertical" />{' '}
122122
<a onClick={() => this.props.osOpenUrl(record.cancel_url)}>Cancel</a>
123123
</span>
124-
)
125-
}
124+
),
125+
},
126126
];
127127
return (
128128
<div>
@@ -142,7 +142,7 @@ export default class AccountInformation extends React.Component {
142142
<div>
143143
<h1>Packages</h1>
144144
{this.props.data.packages &&
145-
this.props.data.packages.map(item => (
145+
this.props.data.packages.map((item) => (
146146
<dl key={item.name} className="dl-horizontal">
147147
<dt>Name</dt>
148148
<dd>{item.name}</dd>
@@ -172,7 +172,7 @@ export default class AccountInformation extends React.Component {
172172
<dt>Services</dt>
173173
<dd>
174174
<ul>
175-
{Object.keys(item).map(key => {
175+
{Object.keys(item).map((key) => {
176176
if (!key.startsWith('service.')) {
177177
return null;
178178
}

0 commit comments

Comments
 (0)