Skip to content

Commit

Permalink
updated instafeed gutenberg controls
Browse files Browse the repository at this point in the history
  • Loading branch information
akashmdiu committed May 21, 2024
1 parent 4d38ea6 commit 5c3a7f6
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 34 deletions.
2 changes: 1 addition & 1 deletion Gutenberg/dist/blocks.build.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion Gutenberg/dist/blocks.style.build.css
Original file line number Diff line number Diff line change
Expand Up @@ -1371,7 +1371,8 @@ button.skip-ad-button {
clear: both; }

.pro-control {
position: relative; }
position: relative;
margin-bottom: 20px; }

span.isPro {
position: absolute;
Expand Down
1 change: 1 addition & 0 deletions Gutenberg/src/embedpress-pdf/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

.pro-control{
position: relative;
margin-bottom: 20px;
}
span.isPro {
position: absolute;
Expand Down
67 changes: 35 additions & 32 deletions Gutenberg/src/embedpress/InspectorControl/instafeed.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,9 @@ export default function Instafeed({ attributes, setAttributes }) {
}


<div className={isProPluginActive ? "pro-control-active" : "pro-control"} onClick={(e) => { addProAlert(e, isProPluginActive) }}>
{instafeedProfileImage && (
{instafeedProfileImage && (
<div className={isProPluginActive ? "pro-control-active" : "pro-control"} onClick={(e) => { addProAlert(e, isProPluginActive) }}>

<MediaUpload
onSelect={onSelectImage}
allowedTypes={['image']}
Expand All @@ -250,13 +251,15 @@ export default function Instafeed({ attributes, setAttributes }) {
</Button>
)}
/>
)}
{
(!isProPluginActive) && (
<span className='isPro'>{__('pro', 'embedpress')}</span>
)
}
</div>


{
(!isProPluginActive) && (
<span className='isPro'>{__('pro', 'embedpress')}</span>
)
}
</div>
)}

<ToggleControl
label={__('Follow Button', 'embedpress')}
Expand Down Expand Up @@ -431,42 +434,42 @@ export default function Instafeed({ attributes, setAttributes }) {
)
}
</div>
{
(instafeedAccountType === 'business' || instafeedFeedType === 'hashtag_type') && (
<div className={isProPluginActive ? "pro-control-active" : "pro-control"} onClick={(e) => { addProAlert(e, isProPluginActive) }}>

<div className={isProPluginActive ? "pro-control-active" : "pro-control"} onClick={(e) => { addProAlert(e, isProPluginActive) }}>
{
(instafeedAccountType === 'business' || instafeedFeedType === 'hashtag_type') && (
<ToggleControl
label={__('Likes Count', 'embedpress')}
checked={instafeedLikesCount}
onChange={(instafeedLikesCount) => setAttributes({ instafeedLikesCount })}
/>
)
}
{
(!isProPluginActive) && (
<span className='isPro'>{__('pro', 'embedpress')}</span>
)
}
</div>

<div className={isProPluginActive ? "pro-control-active" : "pro-control"} onClick={(e) => { addProAlert(e, isProPluginActive) }}>
{
(instafeedAccountType === 'business' || instafeedFeedType === 'hashtag_type') && (
{
(!isProPluginActive) && (
<span className='isPro'>{__('pro', 'embedpress')}</span>
)
}
</div>
)
}
{
(instafeedAccountType === 'business' || instafeedFeedType === 'hashtag_type') && (
<div className={isProPluginActive ? "pro-control-active" : "pro-control"} onClick={(e) => { addProAlert(e, isProPluginActive) }}>

<ToggleControl
label={__('Comments Count', 'embedpress')}
checked={instafeedCommentsCount}
onChange={(instafeedCommentsCount) => setAttributes({ instafeedCommentsCount })}
/>
)
}
{
(!isProPluginActive) && (
<span className='isPro'>{__('pro', 'embedpress')}</span>
)
}
</div>


{
(!isProPluginActive) && (
<span className='isPro'>{__('pro', 'embedpress')}</span>
)
}
</div>
)
}


<ToggleControl
Expand Down

0 comments on commit 5c3a7f6

Please sign in to comment.