diff --git a/client/constants.js b/client/constants.js index 4250cc3b..338d7914 100644 --- a/client/constants.js +++ b/client/constants.js @@ -13,14 +13,6 @@ export const OPEN_PREFERENCES = 'OPEN_PREFERENCES'; export const CLOSE_PREFERENCES = 'CLOSE_PREFERENCES'; export const SET_FONT_SIZE = 'SET_FONT_SIZE'; -export const INCREASE_INDENTATION = 'INCREASE_INDENTATION'; -export const DECREASE_INDENTATION = 'DECREASE_INDENTATION'; -export const UPDATE_INDENTATION = 'UPDATE_INDENTATION'; -export const SET_INDENTATION = 'SET_INDENTATION'; - -export const INDENT_WITH_SPACE = 'INDENT_WITH_SPACE'; -export const INDENT_WITH_TAB = 'INDENT_WITH_TAB'; - export const AUTH_USER = 'AUTH_USER'; export const UNAUTH_USER = 'UNAUTH_USER'; export const AUTH_ERROR = 'AUTH_ERROR'; diff --git a/client/modules/IDE/actions/preferences.js b/client/modules/IDE/actions/preferences.js index 3e26e45a..8919167d 100644 --- a/client/modules/IDE/actions/preferences.js +++ b/client/modules/IDE/actions/preferences.js @@ -32,58 +32,6 @@ export function setFontSize(value) { }; } -export function setIndentation(value) { - return (dispatch, getState) => { - dispatch({ - type: ActionTypes.SET_INDENTATION, - value - }); - const state = getState(); - if (state.user.authenticated) { - const formParams = { - preferences: { - indentationAmount: value - } - }; - updatePreferences(formParams, dispatch); - } - }; -} - -export function indentWithTab() { - return (dispatch, getState) => { - dispatch({ - type: ActionTypes.INDENT_WITH_TAB - }); - const state = getState(); - if (state.user.authenticated) { - const formParams = { - preferences: { - isTabIndent: true - } - }; - updatePreferences(formParams, dispatch); - } - }; -} - -export function indentWithSpace() { - return (dispatch, getState) => { - dispatch({ - type: ActionTypes.INDENT_WITH_SPACE - }); - const state = getState(); - if (state.user.authenticated) { - const formParams = { - preferences: { - isTabIndent: false - } - }; - updatePreferences(formParams, dispatch); - } - }; -} - export function setAutosave(value) { return (dispatch, getState) => { dispatch({ diff --git a/client/modules/IDE/reducers/preferences.js b/client/modules/IDE/reducers/preferences.js index 8441f042..21efcb8d 100644 --- a/client/modules/IDE/reducers/preferences.js +++ b/client/modules/IDE/reducers/preferences.js @@ -2,8 +2,6 @@ import * as ActionTypes from '../../../constants'; const initialState = { fontSize: 18, - indentationAmount: 2, - isTabIndent: true, autosave: true, lintWarning: false, textOutput: false, @@ -17,16 +15,6 @@ const preferences = (state = initialState, action) => { switch (action.type) { case ActionTypes.SET_FONT_SIZE: return Object.assign({}, state, { fontSize: action.value }); - case ActionTypes.SET_INDENTATION: - return Object.assign({}, state, { indentationAmount: action.value }); - case ActionTypes.INDENT_WITH_TAB: - return Object.assign({}, state, { - isTabIndent: true - }); - case ActionTypes.INDENT_WITH_SPACE: - return Object.assign({}, state, { - isTabIndent: false - }); case ActionTypes.SET_AUTOSAVE: return Object.assign({}, state, { autosave: action.value }); case ActionTypes.SET_LINT_WARNING: