Remove editor theme switching for now.
This commit is contained in:
parent
b359159c00
commit
fbe07da0ea
|
@ -114,13 +114,7 @@ export const RookeriesApp = withRouter(connect(
|
||||||
'title': state.page.title,
|
'title': state.page.title,
|
||||||
|
|
||||||
// TODO: Migrate to using standalone editor
|
// TODO: Migrate to using standalone editor
|
||||||
'editorTheme': state.editor.theme,
|
|
||||||
'userCanEdit': state.user.token !== ''
|
'userCanEdit': state.user.token !== ''
|
||||||
},
|
},
|
||||||
|
|
||||||
'editor': {
|
|
||||||
'editorTheme': state.editor.theme,
|
|
||||||
'userCanEdit': state.user.token !== ''
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
})(App));
|
})(App));
|
||||||
|
|
|
@ -59,25 +59,8 @@ function userLoginStateReducer(state = {...DEFAULT_USER_LOGIN}, action) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const DEFAULT_EDITOR_STATE = {
|
|
||||||
state: 0,
|
|
||||||
theme: 'default'
|
|
||||||
};
|
|
||||||
|
|
||||||
function editorStateReducer(state = {...DEFAULT_EDITOR_STATE}, action) {
|
|
||||||
switch (action.type) {
|
|
||||||
case actions.SWITCH_THEME_ACTION:
|
|
||||||
return {...state, theme: action.editorTheme};
|
|
||||||
case actions.LOAD_THEME_ACTION:
|
|
||||||
return {...state, theme: action.editorTheme};
|
|
||||||
default:
|
|
||||||
return state;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const reducer = combineReducers({
|
const reducer = combineReducers({
|
||||||
page: pageStateReducer,
|
page: pageStateReducer,
|
||||||
editor: editorStateReducer,
|
|
||||||
site: siteInfoStateReducer,
|
site: siteInfoStateReducer,
|
||||||
user: userLoginStateReducer,
|
user: userLoginStateReducer,
|
||||||
});
|
});
|
||||||
|
|
|
@ -194,7 +194,7 @@ export const PageBlock = withRouter(
|
||||||
'slug': state.page.slug,
|
'slug': state.page.slug,
|
||||||
'article': state.page.content,
|
'article': state.page.content,
|
||||||
'title': state.page.title,
|
'title': state.page.title,
|
||||||
'editorTheme': state.editor.theme,
|
'editorTheme': 'monokai',
|
||||||
'userCanEdit': state.user.token !== ''
|
'userCanEdit': state.user.token !== ''
|
||||||
};
|
};
|
||||||
})(EditableMarkdownBlock)
|
})(EditableMarkdownBlock)
|
||||||
|
|
Loading…
Reference in New Issue