mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-22 12:49:57 +00:00
Fix lint
This commit is contained in:
@@ -9,7 +9,7 @@
|
|||||||
"lesshint": "lesshint --config .lesshintrc src/",
|
"lesshint": "lesshint --config .lesshintrc src/",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"start": "webpack-dev-server --progress --hot --inline",
|
"start": "webpack-dev-server --progress --hot --inline",
|
||||||
"format": "prettier --use-tabs --trailing-comma all --write {src/*.js,src/**/*.js,src/**/*/*.js,src/*/*/*/*.js,src/*/*/*/*/*.js,src/*/*/*/*/*/*.js,src/*/*/*/*/*/*.js,src/*/*/*/*/*/*/*.js}"
|
"format": "prettier --trailing-comma all --write {src/*.js,src/**/*.js,src/**/*/*.js,src/*/*/*/*.js,src/*/*/*/*/*.js,src/*/*/*/*/*/*.js,src/*/*/*/*/*/*.js,src/*/*/*/*/*/*/*.js}"
|
||||||
},
|
},
|
||||||
"jest": {
|
"jest": {
|
||||||
"moduleFileExtensions": [
|
"moduleFileExtensions": [
|
||||||
|
@@ -28,7 +28,7 @@ export default class Main extends Component {
|
|||||||
super(props, context);
|
super(props, context);
|
||||||
|
|
||||||
this.fetchNextBuildPage = this.fetchNextBuildPage.bind(this);
|
this.fetchNextBuildPage = this.fetchNextBuildPage.bind(this);
|
||||||
this.selectBranch = this.selectBranch.bind(this)
|
this.selectBranch = this.selectBranch.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
@@ -102,7 +102,7 @@ export default class Main extends Component {
|
|||||||
|
|
||||||
const filterBranch = (build) => {
|
const filterBranch = (build) => {
|
||||||
return !branch || build.branch === branch;
|
return !branch || build.branch === branch;
|
||||||
}
|
};
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
return <div>Not Found</div>;
|
return <div>Not Found</div>;
|
||||||
@@ -123,12 +123,19 @@ export default class Main extends Component {
|
|||||||
return (
|
return (
|
||||||
<div className={styles.root}>
|
<div className={styles.root}>
|
||||||
<div className={styles.right}>
|
<div className={styles.right}>
|
||||||
{!branch ?
|
{!branch ? (
|
||||||
<button onClick={() => this.selectBranch(repo.default_branch)}>Show {repo.default_branch} branch only</button> :
|
<button onClick={() => this.selectBranch(repo.default_branch)}>
|
||||||
<button onClick={() => this.selectBranch(undefined)}>Show all branches</button>
|
Show {repo.default_branch} branch only
|
||||||
}
|
</button>
|
||||||
|
) : (
|
||||||
|
<button onClick={() => this.selectBranch(undefined)}>
|
||||||
|
Show all branches
|
||||||
|
</button>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<List>{list.sort(compareBuild).filter(filterBranch).map(renderBuild)}</List>
|
<List>
|
||||||
|
{list.sort(compareBuild).filter(filterBranch).map(renderBuild)}
|
||||||
|
</List>
|
||||||
{list.length < repo.last_build && (
|
{list.length < repo.last_build && (
|
||||||
<button
|
<button
|
||||||
onClick={() => this.fetchNextBuildPage(list)}
|
onClick={() => this.fetchNextBuildPage(list)}
|
||||||
|
Reference in New Issue
Block a user