diff --git a/.gitignore b/.gitignore index caaa71d1..c2230d54 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,4 @@ server/composer.lock server/vendor .idea -.jshintrc -server/files/ -!server/files/.gitkeep +.jshintrc \ No newline at end of file diff --git a/client/gulp/config.js b/client/gulp/config.js index 2525122c..86e35dc7 100644 --- a/client/gulp/config.js +++ b/client/gulp/config.js @@ -2,7 +2,7 @@ module.exports = { - 'serverport': 3006, + 'serverport': 3000, 'scripts': { 'src': './src/*.js', diff --git a/client/src/app/App.js b/client/src/app/App.js index 053fd186..4faa9121 100644 --- a/client/src/app/App.js +++ b/client/src/app/App.js @@ -64,12 +64,12 @@ class App extends React.Component { loggedInStaff: !_.includes(props.location.pathname, '/admin/panel') && props.session.logged && props.session.staff, loggedOutStaff: _.includes(props.location.pathname, '/admin/panel') && !props.session.logged }; - - if(props.config['maintenance-mode'] && !_.includes(props.location.pathname, '/admin') && !_.includes(props.location.pathname, '/maintenance')) { + + if(props.config['maintenance-mode'] === '1' && !_.includes(props.location.pathname, '/admin') && !_.includes(props.location.pathname, '/maintenance')) { history.push('/maintenance'); } - if(!props.config['maintenance-mode'] && _.includes(props.location.pathname, '/maintenance')) { + if(props.config['maintenance-mode'] === '0' && _.includes(props.location.pathname, '/maintenance')) { history.push('/'); } @@ -139,4 +139,4 @@ export default connect((store) => { session: store.session, routing: store.routing }; -})(App); +})(App); \ No newline at end of file diff --git a/client/src/lib-app/session-store.js b/client/src/lib-app/session-store.js index bfcf14cb..7d2c35eb 100644 --- a/client/src/lib-app/session-store.js +++ b/client/src/lib-app/session-store.js @@ -60,7 +60,6 @@ class SessionStore { this.setItem('registration', configs.registration); this.setItem('user-system-enabled', configs['user-system-enabled']); this.setItem('allow-attachments', configs['allow-attachments']); - this.setItem('maintenance-mode', configs['maintenance-mode']); } getConfigs() { @@ -116,4 +115,4 @@ class SessionStore { } } -export default new SessionStore(); +export default new SessionStore(); \ No newline at end of file