Apply prettier formatting
This commit is contained in:
parent
1cac306093
commit
526645c791
1576 changed files with 65385 additions and 62478 deletions
|
@ -15,9 +15,9 @@ Copyright 2019 Michael Telatynski <7t3chguy@gmail.com>
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import React from "react";
|
||||
|
||||
import { _t } from '../../../languageHandler';
|
||||
import { _t } from "../../../languageHandler";
|
||||
import QuestionDialog from "./QuestionDialog";
|
||||
import Spinner from "../elements/Spinner";
|
||||
|
||||
|
@ -27,7 +27,7 @@ interface IProps {
|
|||
onFinished: (success: boolean) => void;
|
||||
}
|
||||
|
||||
const REPOS = ['vector-im/element-web', 'matrix-org/matrix-react-sdk', 'matrix-org/matrix-js-sdk'];
|
||||
const REPOS = ["vector-im/element-web", "matrix-org/matrix-react-sdk", "matrix-org/matrix-js-sdk"];
|
||||
|
||||
export default class ChangelogDialog extends React.Component<IProps> {
|
||||
constructor(props) {
|
||||
|
@ -55,13 +55,13 @@ export default class ChangelogDialog extends React.Component<IProps> {
|
|||
}
|
||||
|
||||
public componentDidMount() {
|
||||
const version = this.props.newVersion.split('-');
|
||||
const version2 = this.props.version.split('-');
|
||||
const version = this.props.newVersion.split("-");
|
||||
const version2 = this.props.version.split("-");
|
||||
if (version == null || version2 == null) return;
|
||||
// parse versions of form: [vectorversion]-react-[react-sdk-version]-js-[js-sdk-version]
|
||||
for (let i = 0; i < REPOS.length; i++) {
|
||||
const oldVersion = version2[2*i];
|
||||
const newVersion = version[2*i];
|
||||
const oldVersion = version2[2 * i];
|
||||
const newVersion = version[2 * i];
|
||||
this.fetchChanges(REPOS[i], oldVersion, newVersion);
|
||||
}
|
||||
}
|
||||
|
@ -70,14 +70,14 @@ export default class ChangelogDialog extends React.Component<IProps> {
|
|||
return (
|
||||
<li key={commit.sha} className="mx_ChangelogDialog_li">
|
||||
<a href={commit.html_url} target="_blank" rel="noreferrer noopener">
|
||||
{ commit.commit.message.split('\n')[0] }
|
||||
{commit.commit.message.split("\n")[0]}
|
||||
</a>
|
||||
</li>
|
||||
);
|
||||
}
|
||||
|
||||
public render() {
|
||||
const logs = REPOS.map(repo => {
|
||||
const logs = REPOS.map((repo) => {
|
||||
let content;
|
||||
if (this.state[repo] == null) {
|
||||
content = <Spinner key={repo} />;
|
||||
|
@ -90,15 +90,15 @@ export default class ChangelogDialog extends React.Component<IProps> {
|
|||
}
|
||||
return (
|
||||
<div key={repo}>
|
||||
<h2>{ repo }</h2>
|
||||
<ul>{ content }</ul>
|
||||
<h2>{repo}</h2>
|
||||
<ul>{content}</ul>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
||||
const content = (
|
||||
<div className="mx_ChangelogDialog_content">
|
||||
{ this.props.version == null || this.props.newVersion == null ? <h2>{ _t("Unavailable") }</h2> : logs }
|
||||
{this.props.version == null || this.props.newVersion == null ? <h2>{_t("Unavailable")}</h2> : logs}
|
||||
</div>
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue