@@ -7,8 +7,6 @@ import {$transform, $get} from 'plow-js';
7
7
8
8
import Badge from '@neos-project/react-ui-components/src/Badge/' ;
9
9
import Icon from '@neos-project/react-ui-components/src/Icon/' ;
10
- import CheckBox from '@neos-project/react-ui-components/src/CheckBox/' ;
11
- import Label from '@neos-project/react-ui-components/src/Label/' ;
12
10
import DropDown from '@neos-project/react-ui-components/src/DropDown/' ;
13
11
14
12
import I18n from '@neos-project/neos-ui-i18n' ;
@@ -29,10 +27,8 @@ import style from './style.module.css';
29
27
publishableNodesInDocument : publishableNodesInDocumentSelector ,
30
28
personalWorkspaceName : personalWorkspaceNameSelector ,
31
29
baseWorkspace : baseWorkspaceSelector ,
32
- isWorkspaceReadOnly : isWorkspaceReadOnlySelector ,
33
- isAutoPublishingEnabled : $get ( 'user.settings.isAutoPublishingEnabled' )
30
+ isWorkspaceReadOnly : isWorkspaceReadOnlySelector
34
31
} ) , {
35
- toggleAutoPublishing : actions . User . Settings . toggleAutoPublishing ,
36
32
changeBaseWorkspaceAction : actions . CR . Workspaces . changeBaseWorkspace ,
37
33
publishAction : actions . CR . Workspaces . publish ,
38
34
discardAction : actions . CR . Workspaces . commenceDiscard
@@ -52,8 +48,6 @@ export default class PublishDropDown extends PureComponent {
52
48
personalWorkspaceName : PropTypes . string . isRequired ,
53
49
baseWorkspace : PropTypes . string . isRequired ,
54
50
neos : PropTypes . object . isRequired ,
55
- isAutoPublishingEnabled : PropTypes . bool ,
56
- toggleAutoPublishing : PropTypes . func . isRequired ,
57
51
publishAction : PropTypes . func . isRequired ,
58
52
discardAction : PropTypes . func . isRequired ,
59
53
changeBaseWorkspaceAction : PropTypes . func . isRequired ,
@@ -92,9 +86,7 @@ export default class PublishDropDown extends PureComponent {
92
86
isSaving,
93
87
isPublishing,
94
88
isDiscarding,
95
- isAutoPublishingEnabled,
96
89
isWorkspaceReadOnly,
97
- toggleAutoPublishing,
98
90
baseWorkspace,
99
91
changeBaseWorkspaceAction,
100
92
i18nRegistry,
@@ -107,10 +99,6 @@ export default class PublishDropDown extends PureComponent {
107
99
const canPublishLocally = ! isSaving && ! isPublishing && ! isDiscarding && publishableNodesInDocument && ( publishableNodesInDocument . length > 0 ) ;
108
100
const canPublishGlobally = ! isSaving && ! isPublishing && ! isDiscarding && publishableNodes && ( publishableNodes . length > 0 ) ;
109
101
const changingWorkspaceAllowed = ! canPublishGlobally ;
110
- const autoPublishWrapperClassNames = mergeClassNames ( {
111
- [ style . dropDown__item ] : true ,
112
- [ style [ 'dropDown__item--noHover' ] ] : true
113
- } ) ;
114
102
const mainButton = this . getTranslatedMainButton ( baseWorkspaceTitle ) ;
115
103
const dropDownBtnClassName = mergeClassNames ( {
116
104
[ style . dropDown__btn ] : true ,
@@ -213,27 +201,6 @@ export default class PublishDropDown extends PureComponent {
213
201
< I18n id = "Neos.Neos:Main:reviewChanges" fallback = "Review changes" />
214
202
</ a >
215
203
</ li > ) }
216
- < li className = { autoPublishWrapperClassNames } >
217
- {
218
- /**
219
- PLEASE NOTE: this additional styleClass is a fix, because react checkboxes inside a react select component are buggy,
220
- for further information see https://github.com/neos/neos-ui/pull/3211
221
- */
222
- }
223
- < Label htmlFor = "neos-PublishDropDown-AutoPublish" className = { style . dropdownOptionCheckbox } >
224
- <
225
- // @ts -ignore
226
- CheckBox
227
- id = "neos-PublishDropDown-AutoPublish"
228
- onChange = { toggleAutoPublishing }
229
- isChecked = { isAutoPublishingEnabled }
230
- className = { style . dropdownOptionCheckbox__input }
231
- />
232
- < span className = { style . dropdownOptionCheckbox__label } >
233
- < I18n id = "Neos.Neos:Main:autoPublish" fallback = "Auto-Publish" />
234
- </ span >
235
- </ Label >
236
- </ li >
237
204
< li className = { style . dropDown__item } >
238
205
< a id = "neos-PublishDropDown-Workspaces" href = { workspaceModuleUri } >
239
206
< div className = { style . dropDown__iconWrapper } >
@@ -253,8 +220,7 @@ export default class PublishDropDown extends PureComponent {
253
220
publishableNodesInDocument,
254
221
isSaving,
255
222
isPublishing,
256
- isDiscarding,
257
- isAutoPublishingEnabled
223
+ isDiscarding
258
224
} = this . props ;
259
225
const canPublishLocally = publishableNodesInDocument && ( publishableNodesInDocument . length > 0 ) ;
260
226
@@ -270,13 +236,6 @@ export default class PublishDropDown extends PureComponent {
270
236
return 'Discarding...' ;
271
237
}
272
238
273
- if ( isAutoPublishingEnabled ) {
274
- if ( baseWorkspaceTitle ) {
275
- return < I18n id = "Neos.Neos:Main:autoPublishTo" fallback = { 'Auto publish to ' + baseWorkspaceTitle } params = { { 0 : baseWorkspaceTitle } } /> ;
276
- }
277
- return < I18n id = "Neos.Neos:Main:autoPublish" fallback = "Auto publish" /> ;
278
- }
279
-
280
239
if ( canPublishLocally ) {
281
240
return < I18n id = "Neos.Neos:Main:publishTo" fallback = "Publish to" params = { { 0 : baseWorkspaceTitle } } /> ;
282
241
}
0 commit comments