|
13 | 13 |
|
14 | 14 | <template #default> |
15 | 15 | <div> |
16 | | - <KRadioButtonGroup> |
| 16 | + <component :is="showDraftMode ? 'KRadioButtonGroup' : 'div'"> |
17 | 17 | <KRadioButton |
| 18 | + v-if="showDraftMode" |
18 | 19 | :label="modeLive$()" |
19 | 20 | :buttonValue="PublishModes.LIVE" |
20 | 21 | :currentValue="mode" |
|
26 | 27 | <div |
27 | 28 | v-if="mode === PublishModes.LIVE" |
28 | 29 | class="live-mode-content" |
29 | | - style="margin-top: 16px; margin-left: 24px" |
| 30 | + :style="showDraftMode ? { marginLeft: '24px', marginTop: '16px' } : {}" |
30 | 31 | > |
31 | 32 | <div class="live-publish-info"> |
32 | 33 | <KIcon |
|
126 | 127 | </div> |
127 | 128 |
|
128 | 129 | <KRadioButton |
| 130 | + v-if="showDraftMode" |
129 | 131 | :label="modeDraft$()" |
130 | 132 | :buttonValue="PublishModes.DRAFT" |
131 | 133 | :currentValue="mode" |
132 | 134 | :description="modeDraftDescription$()" |
133 | 135 | @input="mode = PublishModes.DRAFT" |
134 | 136 | /> |
135 | | - </KRadioButtonGroup> |
| 137 | + </component> |
136 | 138 | </div> |
137 | 139 | </template> |
138 | 140 |
|
|
166 | 168 | import { communityChannelsStrings } from 'shared/strings/communityChannelsStrings'; |
167 | 169 | import { LanguagesList } from 'shared/leUtils/Languages'; |
168 | 170 | import logging from 'shared/logging'; |
| 171 | + import { FeatureFlagKeys } from 'shared/constants'; |
169 | 172 |
|
170 | 173 | export default { |
171 | 174 | name: 'PublishSidePanel', |
|
221 | 224 | const currentChannel = computed(() => store.getters['currentChannel/currentChannel']); |
222 | 225 | const getContentNode = computed(() => store.getters['contentNode/getContentNode']); |
223 | 226 | const areAllChangesSaved = computed(() => store.getters['areAllChangesSaved']); |
| 227 | + const hasFeatureEnabled = computed(() => store.getters['hasFeatureEnabled']); |
224 | 228 |
|
225 | 229 | const incompleteResourcesCount = computed(() => { |
226 | 230 | if (!currentChannel.value) return 0; |
|
259 | 263 | return true; |
260 | 264 | }); |
261 | 265 |
|
| 266 | + const showDraftMode = computed(() => |
| 267 | + hasFeatureEnabled.value(FeatureFlagKeys.test_dev_feature), |
| 268 | + ); |
| 269 | +
|
262 | 270 | const submitText = computed(() => { |
263 | 271 | return mode.value === PublishModes.DRAFT ? saveDraft$() : publishAction$(); |
264 | 272 | }); |
|
392 | 400 | isChannelLanguageLoading, |
393 | 401 | PublishModes, |
394 | 402 | mode, |
| 403 | + showDraftMode, |
395 | 404 | version_notes, |
396 | 405 | submitting, |
397 | 406 | languageOptions, |
|
0 commit comments