Skip to content

Commit

Permalink
Replacing NBSPs with spaces.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nes-si committed Dec 25, 2020
1 parent f223e31 commit bdb6ba0
Show file tree
Hide file tree
Showing 21 changed files with 59 additions and 59 deletions.
10 changes: 5 additions & 5 deletions build/local.run.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ program.option('--port [port]', 'the port to run Chisel');

program.parse(process.argv);

const port  = program.port || process.env.PORT || 9000;
const port = program.port || process.env.PORT || 9000;
const configServerURL = program.serverURL;
const configAppId = program.appId;
const configJSkey = program.JSkey;
const configRESTkey = program.RESTkey;


const server = new express();
const server = new express();

server.use('/', express.static(path.resolve(__dirname, '../dist')));

Expand All @@ -31,9 +31,9 @@ server.get('*', (req, res) =>
res.sendFile(path.resolve(__dirname, '../dist/index.html'))
);

server.listen(port, error => {
if (error)
server.listen(port, error => {
if (error)
console.error(error);
else
console.info(`==> Listening at http://localhost:${port}/`);
console.info(`==> Listening at http://localhost:${port}/`);
});
14 changes: 7 additions & 7 deletions build/server.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
const webpack = require('webpack');
const WebpackDevServer = require('webpack-dev-server');
const webpack = require('webpack');
const WebpackDevServer = require('webpack-dev-server');
const path = require('path');
const {exec} = require('child_process');

const config = require('./webpack.dev.config');
const config = require('./webpack.dev.config');


const port = process.env.PORT || 9000;
const port = process.env.PORT || 9000;

const server = new WebpackDevServer(
const server = new WebpackDevServer(
webpack(config),
{
contentBase: path.join(__dirname, '../static/'),
Expand All @@ -22,8 +22,8 @@ const server = new WebpackDevServer(
}
);

server.listen(port, 'localhost', error => {
if (error) {
server.listen(port, 'localhost', error => {
if (error) {
console.error(error);
return;
}
Expand Down
14 changes: 7 additions & 7 deletions electron/electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,15 @@ function findReopenMenuItem() {
}


ipcMain.on('server-select--dialog-on-remove', async event => {
const options = {
type: 'info',
title: 'Removing server',
message: "Are you sure?",
buttons: ['Yes', 'No']
ipcMain.on('server-select--dialog-on-remove', async event => {
const options = {
type: 'info',
title: 'Removing server',
message: "Are you sure?",
buttons: ['Yes', 'No']
};
const res = await dialog.showMessageBox(options);
event.sender.send('server-select--dialog-on-remove-answer', res.response);
event.sender.send('server-select--dialog-on-remove-answer', res.response);
});

ipcMain.on('server-select--select', (event, server) => {
Expand Down
14 changes: 7 additions & 7 deletions electron/server-selector/server.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
const webpack = require('webpack');
const WebpackDevServer = require('webpack-dev-server');
const webpack = require('webpack');
const WebpackDevServer = require('webpack-dev-server');
const path = require('path');

const config = require('./webpack.dev.config');
const config = require('./webpack.dev.config');


const port = process.env.PORT || 9900;
const port = process.env.PORT || 9900;

const server = new WebpackDevServer(
const server = new WebpackDevServer(
webpack(config),
{
contentBase: path.join(__dirname, './static/'),
Expand All @@ -21,8 +21,8 @@ const server = new WebpackDevServer(
}
);

server.listen(port, 'localhost', error => {
if (error) {
server.listen(port, 'localhost', error => {
if (error) {
console.error(error);
return;
}
Expand Down
4 changes: 2 additions & 2 deletions electron/server-selector/src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ export default class App extends Component {

onRemoveServer = () => {
ipcRenderer.send('server-select--dialog-on-remove');
ipcRenderer.on('server-select--dialog-on-remove-answer', (event, index) => {
if (index !== 0)
ipcRenderer.on('server-select--dialog-on-remove-answer', (event, index) => {
if (index !== 0)
return;

this.servers.splice(this.servers.indexOf(this.state.server), 1);
Expand Down
4 changes: 2 additions & 2 deletions src/containers/Header/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export class Header extends Component {
render() {
const {models, nav} = this.props;
const {userData} = this.props.user;
const {logout} = this.props.userActions;
const {toggleSidebar} = this.props.sidebarActions;
const {logout} = this.props.userActions;
const {toggleSidebar} = this.props.sidebarActions;

let nameId = models.currentSite ? models.currentSite.nameId : null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class ContentEditContainer extends Component {
if (!modelNameId || !itemId)
return;

const {setCurrentItem} = this.props.contentActions;
const {setCurrentItem} = this.props.contentActions;
const {content} = this.props;
this.item = content.currentItem;

Expand All @@ -52,8 +52,8 @@ export class ContentEditContainer extends Component {
render() {
const {models, content} = this.props;
const {addItem, updateItem, publishItem, discardItem, archiveItem, restoreItem, deleteItem} = this.props.contentActions;
const {showModal, showAlert} = this.props.navActions;
const {addMediaItem, updateMediaItem, removeMediaItem} = this.props.mediaActions;
const {showModal, showAlert} = this.props.navActions;
const {addMediaItem, updateMediaItem, removeMediaItem} = this.props.mediaActions;

const site = models.currentSite;
const item = this.item;
Expand Down
2 changes: 1 addition & 1 deletion src/containers/MainArea/Content/ContentListContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class ContentListContainer extends Component {
render() {
const {models, content, nav} = this.props;
const {addItem, deleteItem, filterModel, filterStatus} = this.props.contentActions;
const {showAlert} = this.props.navActions;
const {showAlert} = this.props.navActions;

let cmpContent = (
<div className="start-working">
Expand Down
6 changes: 3 additions & 3 deletions src/containers/MainArea/Models/Model/ModelContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class ModelContainer extends Component {

modelId = modelId.slice(URL_MODEL.length);

const {setCurrentModel} = props.modelsActions;
const {setCurrentModel} = props.modelsActions;
const {models} = props;
this.model = models.currentModel;

Expand All @@ -39,8 +39,8 @@ export class ModelContainer extends Component {

render() {
const {models, nav} = this.props;
const {updateModel, updateField, deleteField} = this.props.modelsActions;
const {showAlert, showModal} = this.props.navActions;
const {updateModel, updateField, deleteField} = this.props.modelsActions;
const {showAlert, showModal} = this.props.navActions;

let title = `Chisel`;
let content = <NoRights />;
Expand Down
4 changes: 2 additions & 2 deletions src/containers/MainArea/Models/ModelsListContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import NoRights from "components/mainArea/common/NoRights";
export class ModelsListContainer extends Component {
render() {
const {models, nav} = this.props;
const {addModel, deleteModel} = this.props.modelsActions;
const {showAlert} = this.props.navActions;
const {addModel, deleteModel} = this.props.modelsActions;
const {showAlert} = this.props.navActions;

let title = `Chisel`;
let content = <NoRights />;
Expand Down
4 changes: 2 additions & 2 deletions src/containers/MainArea/Settings/SettingsContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import {showAlert, URL_USERSPACE} from 'ducks/nav';
export class SettingsContainer extends Component {
render() {
const {models} = this.props;
const {updateSite, deleteSite} = this.props.modelsActions;
const {showAlert} = this.props.navActions;
const {updateSite, deleteSite} = this.props.modelsActions;
const {showAlert} = this.props.navActions;

const site = models.currentSite;
if (!site)
Expand Down
4 changes: 2 additions & 2 deletions src/containers/MainArea/Sharing/SharingContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import {showAlert, showModal} from 'ducks/nav';
export class SharingContainer extends Component {
render() {
const {models, nav, user} = this.props;
const {addCollaboration, addInviteCollaboration, updateCollaboration, deleteCollaboration, deleteSelfCollaboration} = 
const {addCollaboration, addInviteCollaboration, updateCollaboration, deleteCollaboration, deleteSelfCollaboration} =
this.props.modelsActions;
const {showAlert, showModal} = this.props.navActions;
const {showAlert, showModal} = this.props.navActions;

let site = models.currentSite;
if (!site)
Expand Down
2 changes: 1 addition & 1 deletion src/ducks/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export function filterStatus(status) {
};
}

const initialState = {
const initialState = {
items: [],
itemsDraft: [],

Expand Down
16 changes: 8 additions & 8 deletions src/ducks/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import {combineReducers} from 'redux';
import {combineReducers} from 'redux';
import {routerReducer} from 'react-router-redux';

import models from './models';
import content from './content';
import nav from './nav';
import user from './user';
import media from './media';
import pay from './pay';
import models from './models';
import content from './content';
import nav from './nav';
import user from './user';
import media from './media';
import pay from './pay';


export default combineReducers({
export default combineReducers({
models,
content,
nav,
Expand Down
2 changes: 1 addition & 1 deletion src/ducks/media.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export function removeMediaItem(item) {
};
}

const initialState = {
const initialState = {
items: []
};

Expand Down
2 changes: 1 addition & 1 deletion src/ducks/models.js
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ export function deleteField(field) {
};
}

const initialState = {
const initialState = {
templates: [],
sites: [],
currentSite: null,
Expand Down
2 changes: 1 addition & 1 deletion src/ducks/nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export function setServerProblemB (value = true) {
};
}

const initialState = {
const initialState = {
initEnded: false,

isSidebarVisible: true,
Expand Down
2 changes: 1 addition & 1 deletion src/ducks/pay.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export function updateDefaultSource(sourceId) {
}


const initialState = {
const initialState = {
payPlans: [],
stripeData: {},
stripeInitError: false
Expand Down
2 changes: 1 addition & 1 deletion src/ducks/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ export function checkPayPlan() {
};
}

const initialState = {
const initialState = {
localStorageReady: false,

authorized: false,
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/initialization.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {init as init_pay, INIT_END as INIT_END_pay} from 'ducks/pay'
import {initEnd} from 'ducks/nav';


export const initialization = store => next => action => {
export const initialization = store => next => action => {
next(action);

if ((action.type == REGISTER_RESPONSE || action.type == LOGIN_RESPONSE) &&
Expand Down
2 changes: 1 addition & 1 deletion src/middleware/routing.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ let isEmailURL = URL => {
return false;
};

export const routing = store => next => action => {
export const routing = store => next => action => {
if ((action.type == REGISTER_RESPONSE || action.type == LOGIN_RESPONSE) &&
!action.authorized && !isEmailURL(URL) && URL.indexOf(URL_SIGN) == -1)
browserHistory.push(`/${URL_SIGN}`);
Expand Down

0 comments on commit bdb6ba0

Please sign in to comment.