mirror of
https://github.com/wassname/talk.git
synced 2026-07-29 11:28:24 +08:00
clearer api - wip debug tools
This commit is contained in:
@@ -465,7 +465,7 @@ const mapStateToProps = state => ({
|
||||
activeStreamTab: state.stream.activeTab,
|
||||
previousStreamTab: state.stream.previousTab,
|
||||
commentClassNames: state.stream.commentClassNames,
|
||||
pluginConfig: state.config.plugin_config,
|
||||
pluginConfig: state.config.plugins_config,
|
||||
sortOrder: state.stream.sortOrder,
|
||||
sortBy: state.stream.sortBy,
|
||||
});
|
||||
|
||||
@@ -84,7 +84,8 @@ class PluginsService {
|
||||
* query datas are only passed to the component if it is defined in `component.fragments`.
|
||||
*/
|
||||
getSlotComponentProps(component, reduxState, props, queryData) {
|
||||
const pluginConfig = get(reduxState, 'config.plugin_config') || emptyConfig;
|
||||
const pluginConfig =
|
||||
get(reduxState, 'config.plugins_config') || emptyConfig;
|
||||
return {
|
||||
...props,
|
||||
config: pluginConfig,
|
||||
@@ -98,7 +99,8 @@ class PluginsService {
|
||||
* Returns React Elements for given slot.
|
||||
*/
|
||||
getSlotElements(slot, reduxState, props = {}, queryData = {}, options = {}) {
|
||||
const pluginConfig = get(reduxState, 'config.plugin_config') || emptyConfig;
|
||||
const pluginConfig =
|
||||
get(reduxState, 'config.plugins_config') || emptyConfig;
|
||||
const { slotSize = 0 } = options;
|
||||
|
||||
const isDisabled = component => {
|
||||
|
||||
+2
-2
@@ -42,7 +42,7 @@
|
||||
* });
|
||||
* },
|
||||
*/
|
||||
plugin_config: {
|
||||
plugins_config: {
|
||||
/**
|
||||
* You can disable rendering slot components of a plugin by doing:
|
||||
*
|
||||
@@ -51,7 +51,7 @@
|
||||
* },
|
||||
*/
|
||||
test: 'data',
|
||||
debug: false
|
||||
debug: true
|
||||
}
|
||||
})
|
||||
"></script>
|
||||
|
||||
Reference in New Issue
Block a user