File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed
assets/src/dashboard/parts/connected/settings Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -55,12 +55,16 @@ const menuItems = [
55
55
const SubMenu = ( {
56
56
children,
57
57
tab,
58
+ settings,
58
59
setTab
59
60
} ) => {
60
61
return (
61
62
< ul className = "flex flex-col gap-1 m-0 mt-1" >
62
63
{ children . map ( item => {
63
64
const { value, label } = item ;
65
+ if ( 'lazyload' === item . value && 'disabled' === settings . lazyload ) {
66
+ return ;
67
+ }
64
68
const classes = classnames (
65
69
{
66
70
'bg-light-blue hover:text-purple-gray' : tab === value ,
@@ -82,13 +86,16 @@ const SubMenu = ({
82
86
83
87
const Menu = ( {
84
88
tab,
89
+ settings,
85
90
setTab
86
91
} ) => {
87
92
return (
88
93
< div className = "basis-1/5" >
89
94
< ul className = "grid m-0 gap-1" >
90
95
{ menuItems . map ( item => {
91
96
const isActive = tab === item . value || ( item . children && item . children . some ( child => child . value === tab ) ) ;
97
+
98
+
92
99
const buttonClasses = classnames ( { '!text-info' : isActive } , 'w-full bg-transparent border-0 flex items-center appearance-none not-italic font-semibold text-base text-purple-gray cursor-pointer hover:text-info py-2' ) ;
93
100
return (
94
101
< li key = { item . value } className = 'm-0' >
@@ -110,6 +117,7 @@ const Menu = ({
110
117
< SubMenu
111
118
children = { item . children }
112
119
tab = { tab }
120
+ settings = { settings }
113
121
setTab = { setTab }
114
122
/>
115
123
) }
Original file line number Diff line number Diff line change @@ -108,7 +108,7 @@ const Resize = ({
108
108
109
109
< hr className = "my-8 border-grayish-blue" />
110
110
111
- < ToggleControl
111
+ { 'disabled' !== settings . lazyload && ( < > < ToggleControl
112
112
label = { optimoleDashboardApp . strings . options_strings . enable_retina_title }
113
113
help = { ( ) => < p dangerouslySetInnerHTML = { { __html : optimoleDashboardApp . strings . options_strings . enable_retina_desc } } /> }
114
114
checked = { isRetinaEnabled }
@@ -119,9 +119,9 @@ const Resize = ({
119
119
}
120
120
) }
121
121
onChange = { value => updateOption ( 'retina_images' , value ) }
122
- />
122
+ /> < hr className = "my-8 border-grayish-blue" /> </ > )
123
+ }
123
124
124
- < hr className = "my-8 border-grayish-blue" />
125
125
126
126
< ToggleControl
127
127
label = { optimoleDashboardApp . strings . options_strings . enable_limit_dimensions_title }
Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ const Settings = ({
85
85
< Menu
86
86
tab = { tab }
87
87
setTab = { setTab }
88
+ settings = { settings }
88
89
/>
89
90
90
91
< div className = "basis-4/5" >
You can’t perform that action at this time.
0 commit comments