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',
|
||||
height: '10em'
|
||||
},
|
||||
loading: {
|
||||
login: {
|
||||
margin: 'auto',
|
||||
textAlign: 'center'
|
||||
}
|
||||
@@ -24,7 +24,7 @@ class Login extends React.Component<Props> {
|
||||
const { classes } = this.props;
|
||||
return (
|
||||
<div className={classes.wrapper}>
|
||||
<div className={classes.loading}>
|
||||
<div className={classes.login}>
|
||||
You need to log in! ...
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -7,7 +7,7 @@ import Login from '../Login';
|
||||
|
||||
|
||||
type Props = {
|
||||
loading: boolean,
|
||||
login: boolean,
|
||||
error: any,
|
||||
repositories: any,
|
||||
fetchRepositoriesIfNeeded: () => void
|
||||
@@ -20,10 +20,10 @@ class Page extends React.Component<Props> {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { loading, error, repositories } = this.props;
|
||||
const { login, error, repositories } = this.props;
|
||||
|
||||
|
||||
if(loading) {
|
||||
if(login) {
|
||||
return (
|
||||
<div>
|
||||
<h1>SCM</h1>
|
||||
@@ -31,7 +31,7 @@ class Page extends React.Component<Props> {
|
||||
</div>
|
||||
);
|
||||
}
|
||||
else if(!loading){
|
||||
else if(!login){
|
||||
return (
|
||||
<div>
|
||||
<h1>SCM</h1>
|
||||
|
||||
@@ -6,7 +6,7 @@ import { fetchRepositoriesIfNeeded } from '../modules/users';
|
||||
import Login from '../Login';
|
||||
|
||||
type Props = {
|
||||
loading: boolean,
|
||||
login: boolean,
|
||||
error: any,
|
||||
repositories: any,
|
||||
fetchRepositoriesIfNeeded: () => void
|
||||
@@ -19,11 +19,11 @@ class Users extends React.Component<Props> {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { loading, error, repositories } = this.props;
|
||||
const { login, error, repositories } = this.props;
|
||||
|
||||
|
||||
|
||||
if(loading) {
|
||||
if(login) {
|
||||
return (
|
||||
<div>
|
||||
<h1>SCM</h1>
|
||||
@@ -31,7 +31,7 @@ class Users extends React.Component<Props> {
|
||||
</div>
|
||||
);
|
||||
}
|
||||
else if(!loading){
|
||||
else if(!login){
|
||||
return (
|
||||
<div>
|
||||
<h1>SCM</h1>
|
||||
|
||||
@@ -37,13 +37,13 @@ export default function reducer(state = {}, action = {}) {
|
||||
case FETCH_REPOSITORIES:
|
||||
return {
|
||||
...state,
|
||||
loading: true,
|
||||
login: true,
|
||||
error: null
|
||||
};
|
||||
case FETCH_REPOSITORIES_SUCCESS:
|
||||
return {
|
||||
...state,
|
||||
loading: true,
|
||||
login: true,
|
||||
timestamp: action.timestamp,
|
||||
error: null,
|
||||
repositories: action.payload
|
||||
@@ -51,7 +51,7 @@ export default function reducer(state = {}, action = {}) {
|
||||
case FETCH_REPOSITORIES_FAILURE:
|
||||
return {
|
||||
...state,
|
||||
loading: true,
|
||||
login: true,
|
||||
error: action.payload
|
||||
};
|
||||
|
||||
|
||||
@@ -37,13 +37,13 @@ export default function reducer(state = {}, action = {}) {
|
||||
case FETCH_REPOSITORIES:
|
||||
return {
|
||||
...state,
|
||||
loading: true,
|
||||
login: true,
|
||||
error: null
|
||||
};
|
||||
case FETCH_REPOSITORIES_SUCCESS:
|
||||
return {
|
||||
...state,
|
||||
loading: false,
|
||||
login: false,
|
||||
timestamp: action.timestamp,
|
||||
error: null,
|
||||
repositories: action.payload
|
||||
@@ -51,7 +51,7 @@ export default function reducer(state = {}, action = {}) {
|
||||
case FETCH_REPOSITORIES_FAILURE:
|
||||
return {
|
||||
...state,
|
||||
loading: false,
|
||||
login: false,
|
||||
error: action.payload
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user