mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-14 09:25:43 +01:00
renaming: loading to login
This commit is contained in:
@@ -8,7 +8,7 @@ const styles = {
|
|||||||
display: 'flex',
|
display: 'flex',
|
||||||
height: '10em'
|
height: '10em'
|
||||||
},
|
},
|
||||||
loading: {
|
login: {
|
||||||
margin: 'auto',
|
margin: 'auto',
|
||||||
textAlign: 'center'
|
textAlign: 'center'
|
||||||
}
|
}
|
||||||
@@ -24,7 +24,7 @@ class Login extends React.Component<Props> {
|
|||||||
const { classes } = this.props;
|
const { classes } = this.props;
|
||||||
return (
|
return (
|
||||||
<div className={classes.wrapper}>
|
<div className={classes.wrapper}>
|
||||||
<div className={classes.loading}>
|
<div className={classes.login}>
|
||||||
You need to log in! ...
|
You need to log in! ...
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import Login from '../Login';
|
|||||||
|
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
loading: boolean,
|
login: boolean,
|
||||||
error: any,
|
error: any,
|
||||||
repositories: any,
|
repositories: any,
|
||||||
fetchRepositoriesIfNeeded: () => void
|
fetchRepositoriesIfNeeded: () => void
|
||||||
@@ -20,10 +20,10 @@ class Page extends React.Component<Props> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { loading, error, repositories } = this.props;
|
const { login, error, repositories } = this.props;
|
||||||
|
|
||||||
|
|
||||||
if(loading) {
|
if(login) {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<h1>SCM</h1>
|
<h1>SCM</h1>
|
||||||
@@ -31,7 +31,7 @@ class Page extends React.Component<Props> {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else if(!loading){
|
else if(!login){
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<h1>SCM</h1>
|
<h1>SCM</h1>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { fetchRepositoriesIfNeeded } from '../modules/users';
|
|||||||
import Login from '../Login';
|
import Login from '../Login';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
loading: boolean,
|
login: boolean,
|
||||||
error: any,
|
error: any,
|
||||||
repositories: any,
|
repositories: any,
|
||||||
fetchRepositoriesIfNeeded: () => void
|
fetchRepositoriesIfNeeded: () => void
|
||||||
@@ -19,11 +19,11 @@ class Users extends React.Component<Props> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { loading, error, repositories } = this.props;
|
const { login, error, repositories } = this.props;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(loading) {
|
if(login) {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<h1>SCM</h1>
|
<h1>SCM</h1>
|
||||||
@@ -31,7 +31,7 @@ class Users extends React.Component<Props> {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else if(!loading){
|
else if(!login){
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<h1>SCM</h1>
|
<h1>SCM</h1>
|
||||||
|
|||||||
@@ -37,13 +37,13 @@ export default function reducer(state = {}, action = {}) {
|
|||||||
case FETCH_REPOSITORIES:
|
case FETCH_REPOSITORIES:
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
loading: true,
|
login: true,
|
||||||
error: null
|
error: null
|
||||||
};
|
};
|
||||||
case FETCH_REPOSITORIES_SUCCESS:
|
case FETCH_REPOSITORIES_SUCCESS:
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
loading: true,
|
login: true,
|
||||||
timestamp: action.timestamp,
|
timestamp: action.timestamp,
|
||||||
error: null,
|
error: null,
|
||||||
repositories: action.payload
|
repositories: action.payload
|
||||||
@@ -51,7 +51,7 @@ export default function reducer(state = {}, action = {}) {
|
|||||||
case FETCH_REPOSITORIES_FAILURE:
|
case FETCH_REPOSITORIES_FAILURE:
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
loading: true,
|
login: true,
|
||||||
error: action.payload
|
error: action.payload
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -37,13 +37,13 @@ export default function reducer(state = {}, action = {}) {
|
|||||||
case FETCH_REPOSITORIES:
|
case FETCH_REPOSITORIES:
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
loading: true,
|
login: true,
|
||||||
error: null
|
error: null
|
||||||
};
|
};
|
||||||
case FETCH_REPOSITORIES_SUCCESS:
|
case FETCH_REPOSITORIES_SUCCESS:
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
loading: false,
|
login: false,
|
||||||
timestamp: action.timestamp,
|
timestamp: action.timestamp,
|
||||||
error: null,
|
error: null,
|
||||||
repositories: action.payload
|
repositories: action.payload
|
||||||
@@ -51,7 +51,7 @@ export default function reducer(state = {}, action = {}) {
|
|||||||
case FETCH_REPOSITORIES_FAILURE:
|
case FETCH_REPOSITORIES_FAILURE:
|
||||||
return {
|
return {
|
||||||
...state,
|
...state,
|
||||||
loading: false,
|
login: false,
|
||||||
error: action.payload
|
error: action.payload
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user