diff --git a/js/FeedzyBlock/Editor.js b/js/FeedzyBlock/Editor.js index aa026fcd..a4294fbf 100644 --- a/js/FeedzyBlock/Editor.js +++ b/js/FeedzyBlock/Editor.js @@ -15,6 +15,7 @@ import Inspector from './inspector'; import { __, sprintf } from '@wordpress/i18n'; import apiFetch from '@wordpress/api-fetch'; import { Component, Fragment } from '@wordpress/element'; +import { InspectorControls } from '@wordpress/block-editor'; import { unescapeHTML, filterData, @@ -425,9 +426,17 @@ class Editor extends Component { render() { return ( - {'fetched' === this.state.route && ( - - )} + +
+ {'fetched' === this.state.route && ( + + )} +
+
{'home' === this.state.route && (
- - - + + + + {'content' === this.state.tab && ( + + - - - {__('Content', 'feedzy-rss-feeds')} - - - + + + )} + {'fetched' === this.props.state.route && ( + + + + + + )} + + + - - - {__('Style', 'feedzy-rss-feeds')} - - - - - {'content' === this.state.tab && ( + {!window.feedzyjs.isPro && ( +
+ {__( + 'Unlock this feature and more advanced options with', + 'feedzy-rss-feeds' + )}{' '} + + {__('Feedzy Pro', 'feedzy-rss-feeds')} + +
+ )} + + + + +

+ {__( + 'Filter feed item by date range.', + 'feedzy-rss-feeds' + )} +

+ + + + + )} + + {'fetched' === this.props.state.route && + 'style' === this.state.tab && ( - {this.props.attributes.status !== 0 && ( + + + {this.props.attributes.thumb !== 'no' && ( + {this.props.attributes.thumb !== + 'auto' && ( +
+ + ( + + {this.props + .attributes + .default !== + undefined && ( + + + {__( + + + + + )} + + + )} + /> +
+ )} - - -
- )} - {'fetched' === this.props.state.route && ( - - - - )}
+ Pro + + ), + ]} initialOpen={false} - className="feedzy-item-options" + className={ + window.feedzyjs.isPro + ? 'feedzy-layout' + : 'feedzy-layout fz-locked' + } > - + {__( + 'Unlock this feature and more advanced options with', + 'feedzy-rss-feeds' + )}{' '} + + {__( + 'Feedzy Pro', + 'feedzy-rss-feeds' + )} + +
+ )} + + + + - - + + - - {this.props.attributes.itemTitle && ( - +
+ )} + {'fetched' === this.props.state.route && + 'advanced' === this.state.tab && ( + + + + + - )} + + + {__( + 'You can find more info about available meta field values here.', + 'feedzy-rss-feeds' + )} + + - {this.props.attributes.summary && ( - )} + + + + Pro @@ -351,8 +958,8 @@ class Inspector extends Component { initialOpen={false} className={ window.feedzyjs.isPro - ? 'feedzy-item-filter' - : 'feedzy-item-filter fz-locked' + ? 'feedzy-pro-options' + : 'feedzy-pro-options fz-locked' } > {!window.feedzyjs.isPro && ( @@ -361,7 +968,7 @@ class Inspector extends Component { 'Unlock this feature and more advanced options with', 'feedzy-rss-feeds' )}{' '} - + {__( 'Feedzy Pro', 'feedzy-rss-feeds' @@ -371,778 +978,77 @@ class Inspector extends Component { )} - + + + + -

- {__( - 'Filter feed item by date range.', + + - - )} - - {'fetched' === this.props.state.route && - 'style' === this.state.tab && ( - - - - - {this.props.attributes.thumb !== 'no' && ( - - {this.props.attributes.thumb !== - 'auto' && ( -

- - ( - - {this.props - .attributes - .default !== - undefined && ( - - - {__( - - - - - )} - - - )} - /> -
- )} - - -
- )} - - - - Pro - - ), - ]} - initialOpen={false} - className={ - window.feedzyjs.isPro - ? 'feedzy-layout' - : 'feedzy-layout fz-locked' - } - > - {!window.feedzyjs.isPro && ( -
- {__( - 'Unlock this feature and more advanced options with', - 'feedzy-rss-feeds' - )}{' '} - - {__( - 'Feedzy Pro', - 'feedzy-rss-feeds' - )} - -
- )} - - - - -
- - - - - - )} - {'fetched' === this.props.state.route && - 'advanced' === this.state.tab && ( - - - - - - - - {__( - 'You can find more info about available meta field values here.', - 'feedzy-rss-feeds' - )} - - - - - - {this.props.attributes.feedData.channel !== - null && ( - - )} - - - - - - - - Pro - - ), - ]} - initialOpen={false} - className={ - window.feedzyjs.isPro - ? 'feedzy-pro-options' - : 'feedzy-pro-options fz-locked' - } - > - {!window.feedzyjs.isPro && ( -
- {__( - 'Unlock this feature and more advanced options with', - 'feedzy-rss-feeds' - )}{' '} - - {__( - 'Feedzy Pro', - 'feedzy-rss-feeds' - )} - -
- )} - -
- - - - - - - - -
- )} - ); }