Ivan - Fix installation issues [skip ci]
This commit is contained in:
parent
199921b213
commit
d10de13626
|
@ -6,5 +6,7 @@ var config = require('../config');
|
||||||
gulp.task('copyIndex', function() {
|
gulp.task('copyIndex', function() {
|
||||||
|
|
||||||
gulp.src(config.sourceDir + 'index.html').pipe(gulp.dest(config.buildDir));
|
gulp.src(config.sourceDir + 'index.html').pipe(gulp.dest(config.buildDir));
|
||||||
|
gulp.src(config.sourceDir + 'index.php').pipe(gulp.dest(config.buildDir));
|
||||||
|
gulp.src(config.sourceDir + '.htaccess').pipe(gulp.dest(config.buildDir));
|
||||||
|
|
||||||
});
|
});
|
|
@ -0,0 +1,5 @@
|
||||||
|
RewriteEngine on
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteCond %{REQUEST_URI} !^/?(api)/
|
||||||
|
RewriteRule .* index.php [PT,L]
|
|
@ -102,6 +102,14 @@ class App extends React.Component {
|
||||||
if(props.config['user-system-enabled'] && _.includes(props.location.pathname, '/check-ticket')) {
|
if(props.config['user-system-enabled'] && _.includes(props.location.pathname, '/check-ticket')) {
|
||||||
browserHistory.push('/');
|
browserHistory.push('/');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(props.config.installedDone && !props.config.installed && !_.includes(props.location.pathname, '/install')) {
|
||||||
|
browserHistory.push('/install');
|
||||||
|
}
|
||||||
|
|
||||||
|
if(props.config.installedDone && props.config.installed && _.includes(props.location.pathname, '/install')) {
|
||||||
|
browserHistory.push('/');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
isPathAvailableForStaff(props) {
|
isPathAvailableForStaff(props) {
|
||||||
|
|
|
@ -2,6 +2,7 @@ import React from 'react';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import {browserHistory} from 'react-router';
|
import {browserHistory} from 'react-router';
|
||||||
|
import DocumentTitle from 'react-document-title';
|
||||||
|
|
||||||
import i18n from 'lib-app/i18n';
|
import i18n from 'lib-app/i18n';
|
||||||
import API from 'lib-app/api-call';
|
import API from 'lib-app/api-call';
|
||||||
|
@ -33,6 +34,7 @@ class InstallLayout extends React.Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
|
<DocumentTitle title="OpenSupports Installation">
|
||||||
<Widget className="install-layout">
|
<Widget className="install-layout">
|
||||||
<div className="install-layout__header">
|
<div className="install-layout__header">
|
||||||
<div className="install-layout__header-logo">
|
<div className="install-layout__header-logo">
|
||||||
|
@ -59,6 +61,7 @@ class InstallLayout extends React.Component {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Widget>
|
</Widget>
|
||||||
|
</DocumentTitle>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
&__next {
|
&__next {
|
||||||
float: left;
|
float: left;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
margin-left: 286px;
|
margin-left: 230px;
|
||||||
|
min-width: 70px;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -30,7 +30,6 @@ class InstallStep5Admin extends React.Component {
|
||||||
<FormField name="password" validation="PASSWORD" label={i18n('ADMIN_PASSWORD')} infoMessage={i18n('ADMIN_PASSWORD_DESCRIPTION')} fieldProps={{size: 'large', autoComplete: 'off'}} required/>
|
<FormField name="password" validation="PASSWORD" label={i18n('ADMIN_PASSWORD')} infoMessage={i18n('ADMIN_PASSWORD_DESCRIPTION')} fieldProps={{size: 'large', autoComplete: 'off'}} required/>
|
||||||
<div className="install-step-5__buttons">
|
<div className="install-step-5__buttons">
|
||||||
<SubmitButton className="install-step-5__next" size="medium" type="secondary">{i18n('NEXT')}</SubmitButton>
|
<SubmitButton className="install-step-5__next" size="medium" type="secondary">{i18n('NEXT')}</SubmitButton>
|
||||||
<Button className="install-step-5__previous" size="medium" onClick={this.onPreviousClick.bind(this)}>{i18n('PREVIOUS')}</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</Form>
|
</Form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -51,11 +50,6 @@ class InstallStep5Admin extends React.Component {
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
onPreviousClick(event) {
|
|
||||||
event.preventDefault();
|
|
||||||
browserHistory.push('/install/step-4');
|
|
||||||
}
|
|
||||||
|
|
||||||
onSubmit(form) {
|
onSubmit(form) {
|
||||||
this.setState({
|
this.setState({
|
||||||
loading: true
|
loading: true
|
||||||
|
|
|
@ -6,13 +6,7 @@
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__previous {
|
|
||||||
margin-right: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&__next {
|
&__next {
|
||||||
float: left;
|
min-width: 70px;
|
||||||
position: absolute;
|
|
||||||
margin-left: 286px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
RewriteEngine on
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteRule .* index.php [PT,L]
|
|
@ -14,7 +14,7 @@ class InitDatabaseController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function handler() {
|
public function handler() {
|
||||||
if(InstallationDoneController::isInstallationDone()) {
|
if(defined('MYSQL_HOST')) {
|
||||||
throw new Exception(ERRORS::INIT_SETTINGS_DONE);
|
throw new Exception(ERRORS::INIT_SETTINGS_DONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue