diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/actions/index.js | 8 | ||||
| -rw-r--r-- | src/console/actions/console.js (renamed from src/actions/console.js) | 2 | ||||
| -rw-r--r-- | src/console/actions/index.js | 9 | ||||
| -rw-r--r-- | src/console/components/completion.js (renamed from src/components/completion.js) | 2 | ||||
| -rw-r--r-- | src/console/components/console.js (renamed from src/components/console.js) | 4 | ||||
| -rw-r--r-- | src/console/index.html (renamed from src/pages/console.html) | 0 | ||||
| -rw-r--r-- | src/console/index.js (renamed from src/pages/console.js) | 10 | ||||
| -rw-r--r-- | src/console/reducers/index.js (renamed from src/reducers/console.js) | 2 | ||||
| -rw-r--r-- | src/console/site.scss (renamed from src/pages/console.scss) | 0 | ||||
| -rw-r--r-- | src/reducers/index.js | 3 | 
10 files changed, 19 insertions, 21 deletions
diff --git a/src/actions/index.js b/src/actions/index.js index 6a64795..0b3749d 100644 --- a/src/actions/index.js +++ b/src/actions/index.js @@ -1,12 +1,4 @@  export default { -  // console commands -  CONSOLE_SHOW_COMMAND: 'console.show.command', -  CONSOLE_SET_COMPLETIONS: 'console.set.completions', -  CONSOLE_SHOW_ERROR: 'console.show.error', -  CONSOLE_HIDE: 'console.hide', -  CONSOLE_COMPLETION_NEXT: 'console.completion.next', -  CONSOLE_COMPLETION_PREV: 'console.completion.prev', -    // User input    INPUT_KEY_PRESS: 'input.key,press',    INPUT_CLEAR_KEYS: 'input.clear.keys', diff --git a/src/actions/console.js b/src/console/actions/console.js index 4183489..01d9a9b 100644 --- a/src/actions/console.js +++ b/src/console/actions/console.js @@ -1,4 +1,4 @@ -import actions from 'actions'; +import actions from 'console/actions';  const showCommand = (text) => {    return { diff --git a/src/console/actions/index.js b/src/console/actions/index.js new file mode 100644 index 0000000..a5d03bc --- /dev/null +++ b/src/console/actions/index.js @@ -0,0 +1,9 @@ +export default { +  // console commands +  CONSOLE_SHOW_COMMAND: 'console.show.command', +  CONSOLE_SET_COMPLETIONS: 'console.set.completions', +  CONSOLE_SHOW_ERROR: 'console.show.error', +  CONSOLE_HIDE: 'console.hide', +  CONSOLE_COMPLETION_NEXT: 'console.completion.next', +  CONSOLE_COMPLETION_PREV: 'console.completion.prev', +}; diff --git a/src/components/completion.js b/src/console/components/completion.js index f527a84..5033b5c 100644 --- a/src/components/completion.js +++ b/src/console/components/completion.js @@ -6,7 +6,7 @@ export default class Completion {    }    update() { -    let state = this.store.getState().console; +    let state = this.store.getState();      if (JSON.stringify(this.prevState) === JSON.stringify(state)) {        return;      } diff --git a/src/components/console.js b/src/console/components/console.js index 20d15c2..9023d91 100644 --- a/src/components/console.js +++ b/src/console/components/console.js @@ -1,5 +1,5 @@  import messages from 'shared/messages'; -import * as consoleActions from 'actions/console'; +import * as consoleActions from 'console/actions/console';  export default class ConsoleComponent {    constructor(wrapper, store) { @@ -71,7 +71,7 @@ export default class ConsoleComponent {    }    update() { -    let state = this.store.getState().console; +    let state = this.store.getState();      if (!this.prevState.commandShown && state.commandShown) {        this.showCommand(state.commandText);      } else if (!state.commandShown) { diff --git a/src/pages/console.html b/src/console/index.html index 4222f12..4222f12 100644 --- a/src/pages/console.html +++ b/src/console/index.html diff --git a/src/pages/console.js b/src/console/index.js index 4c6e16c..1bcf8bc 100644 --- a/src/pages/console.js +++ b/src/console/index.js @@ -1,10 +1,10 @@ -import './console.scss'; +import './site.scss';  import messages from 'shared/messages'; -import CompletionComponent from 'components/completion'; -import ConsoleComponent from 'components/console'; -import reducers from 'reducers'; +import CompletionComponent from 'console/components/completion'; +import ConsoleComponent from 'console/components/console'; +import reducers from 'console/reducers';  import { createStore } from 'store'; -import * as consoleActions from 'actions/console'; +import * as consoleActions from 'console/actions/console';  const store = createStore(reducers);  let completionComponent = null; diff --git a/src/reducers/console.js b/src/console/reducers/index.js index b9ed5b8..ee9c691 100644 --- a/src/reducers/console.js +++ b/src/console/reducers/index.js @@ -1,4 +1,4 @@ -import actions from 'actions'; +import actions from 'console/actions';  const defaultState = {    errorShown: false, diff --git a/src/pages/console.scss b/src/console/site.scss index 5823dce..5823dce 100644 --- a/src/pages/console.scss +++ b/src/console/site.scss diff --git a/src/reducers/index.js b/src/reducers/index.js index 8ed6452..3ebe491 100644 --- a/src/reducers/index.js +++ b/src/reducers/index.js @@ -1,11 +1,9 @@  import inputReducer from 'reducers/input'; -import consoleReducer from 'reducers/console';  import settingReducer from 'reducers/setting';  import followReducer from 'reducers/follow';  const defaultState = {    input: inputReducer(undefined, {}), -  console: consoleReducer(undefined, {}),    setting: settingReducer(undefined, {}),    follow: followReducer(undefined, {}),  }; @@ -13,7 +11,6 @@ const defaultState = {  export default function reducer(state = defaultState, action = {}) {    return Object.assign({}, state, {      input: inputReducer(state.input, action), -    console: consoleReducer(state.console, action),      setting: settingReducer(state.setting, action),      follow: followReducer(state.follow, action),    });  | 
