|
1 | 1 | import { UMB_DOCUMENT_TYPE_WORKSPACE_CONTEXT } from '../../document-type-workspace.context-token.js';
|
2 |
| -import { css, html, customElement, state, when } from '@umbraco-cms/backoffice/external/lit'; |
| 2 | +import { css, html, customElement, state, when, nothing } from '@umbraco-cms/backoffice/external/lit'; |
3 | 3 | import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
|
4 | 4 | import type { UUIBooleanInputEvent, UUIToggleElement } from '@umbraco-cms/backoffice/external/uui';
|
5 | 5 | import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
|
@@ -103,23 +103,29 @@ export class UmbDocumentTypeWorkspaceViewSettingsElement extends UmbLitElement i
|
103 | 103 | label=${this.localize.term('contentTypeEditor_cultureVariantLabel')}></uui-toggle>
|
104 | 104 | </div>
|
105 | 105 | </umb-property-layout>
|
106 |
| - <umb-property-layout |
107 |
| - alias="VaryBySegments" |
108 |
| - label=${this.localize.term('contentTypeEditor_segmentVariantHeading')}> |
109 |
| - <div slot="description"> |
110 |
| - <umb-localize key="contentTypeEditor_segmentVariantDescription" |
111 |
| - >Allow editors to segment their content.</umb-localize |
112 |
| - > |
113 |
| - </div> |
114 |
| - <div slot="editor"> |
115 |
| - <uui-toggle |
116 |
| - ?checked=${this._variesBySegment} |
117 |
| - @change=${(e: CustomEvent) => { |
118 |
| - this.#workspaceContext?.setVariesBySegment((e.target as UUIToggleElement).checked); |
119 |
| - }} |
120 |
| - label=${this.localize.term('contentTypeEditor_segmentVariantLabel')}></uui-toggle> |
121 |
| - </div> |
122 |
| - </umb-property-layout> |
| 106 | +
|
| 107 | + ${this._isElement |
| 108 | + ? nothing |
| 109 | + : html` |
| 110 | + <umb-property-layout |
| 111 | + alias="VaryBySegments" |
| 112 | + label=${this.localize.term('contentTypeEditor_segmentVariantHeading')}> |
| 113 | + <div slot="description"> |
| 114 | + <umb-localize key="contentTypeEditor_segmentVariantDescription" |
| 115 | + >Allow editors to segment their content.</umb-localize |
| 116 | + > |
| 117 | + </div> |
| 118 | + <div slot="editor"> |
| 119 | + <uui-toggle |
| 120 | + ?checked=${this._variesBySegment} |
| 121 | + @change=${(e: CustomEvent) => { |
| 122 | + this.#workspaceContext?.setVariesBySegment((e.target as UUIToggleElement).checked); |
| 123 | + }} |
| 124 | + label=${this.localize.term('contentTypeEditor_segmentVariantLabel')}></uui-toggle> |
| 125 | + </div> |
| 126 | + </umb-property-layout> |
| 127 | + `} |
| 128 | +
|
123 | 129 | <umb-property-layout alias="ElementType" label=${this.localize.term('contentTypeEditor_elementHeading')}>
|
124 | 130 | <div slot="description">
|
125 | 131 | <umb-localize key="contentTypeEditor_elementDescription"
|
|
0 commit comments