mirror of https://github.com/vector-im/riot-web
Another go at fixing the damn changelog
html_url is in the top-level 'commit' object, not in commit.commit. Also factor some code out for legibility. Seriously, what's with stuffing everything into inline functions?pull/2281/head
parent
0ab1dacb1e
commit
6cb7ffcd3b
|
@ -41,6 +41,16 @@ export default class ChangelogDialog extends React.Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_elementsForCommit(commit) {
|
||||||
|
return (
|
||||||
|
<li key={commit.sha} className="mx_ChangelogDialog_li">
|
||||||
|
<a href={commit.html_url} target="_blank" ref="noopener">
|
||||||
|
{commit.commit.message}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const Spinner = sdk.getComponent('views.elements.Spinner');
|
const Spinner = sdk.getComponent('views.elements.Spinner');
|
||||||
const QuestionDialog = sdk.getComponent('dialogs.QuestionDialog');
|
const QuestionDialog = sdk.getComponent('dialogs.QuestionDialog');
|
||||||
|
@ -51,9 +61,7 @@ export default class ChangelogDialog extends React.Component {
|
||||||
<div key={repo}>
|
<div key={repo}>
|
||||||
<h2>{repo}</h2>
|
<h2>{repo}</h2>
|
||||||
<ul>
|
<ul>
|
||||||
{this.state[repo].map(commit =>
|
{this.state[repo].map(this._elementsForCommit)}
|
||||||
<li key={commit.commit.url} className="mx_ChangelogDialog_li"><a href={commit.commit.html_url} target="_blank" ref="noopener">{commit.commit.message}</a></li>
|
|
||||||
)}
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue