diff --git a/src/Umbraco.Web.UI.Client/src/assets/lang/en-us.ts b/src/Umbraco.Web.UI.Client/src/assets/lang/en-us.ts index bf7d91a548af..df5bd8c8dcd7 100644 --- a/src/Umbraco.Web.UI.Client/src/assets/lang/en-us.ts +++ b/src/Umbraco.Web.UI.Client/src/assets/lang/en-us.ts @@ -1705,16 +1705,6 @@ export default { compositionUsageHeading: 'Where is this composition used?', compositionUsageSpecification: 'This composition is currently used in the composition of the following\n Content Types:\n ', - variantsHeading: 'Allow variations', - cultureVariantHeading: 'Allow vary by culture', - segmentVariantHeading: 'Allow segmentation', - cultureVariantLabel: 'Vary by culture', - segmentVariantLabel: 'Vary by segments', - variantsDescription: 'Allow editors to create content of this type in different languages.', - cultureVariantDescription: 'Allow editors to create content of different languages.', - segmentVariantDescription: 'Allow editors to create segments of this content.', - allowVaryByCulture: 'Allow varying by culture', - allowVaryBySegment: 'Allow segmentation', elementType: 'Element Type', elementHeading: 'Is an Element Type', elementDescription: diff --git a/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts b/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts index 4f29dcb7f1fd..39f7edc0ac01 100644 --- a/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts +++ b/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts @@ -1735,11 +1735,11 @@ export default { compositionUsageHeading: 'Where is this composition used?', compositionUsageSpecification: 'This composition is currently used in the composition of the following\n Content Types:\n ', - variantsHeading: 'Allow variations', + variantsHeading: 'Variation', cultureVariantHeading: 'Allow vary by culture', segmentVariantHeading: 'Allow segmentation', cultureVariantLabel: 'Vary by culture', - segmentVariantLabel: 'Vary by segments', + segmentVariantLabel: 'Vary by segment', variantsDescription: 'Allow editors to create content of this type in different languages.', cultureVariantDescription: 'Allow editors to create content of different languages.', segmentVariantDescription: 'Allow editors to create segments of this content.', diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-property.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-property.element.ts index 63ef5a556713..5b8cf052940b 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-property.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-property.element.ts @@ -299,6 +299,11 @@ export class UmbContentTypeDesignEditorPropertyElement extends UmbLitElement { ${this.localize.term('contentTypeEditor_cultureVariantLabel')} ` : nothing} + ${this.property.variesBySegment + ? html` + ${this.localize.term('contentTypeEditor_segmentVariantLabel')} + ` + : nothing} ${this.property.appearance?.labelOnTop == true ? html` ${this.localize.term('contentTypeEditor_displaySettingsLabelOnTop')} diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/property-type/workspace/views/settings/property-workspace-view-settings.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/property-type/workspace/views/settings/property-workspace-view-settings.element.ts index 56db8cbf598b..8c069f12d1e3 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/property-type/workspace/views/settings/property-workspace-view-settings.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/property-type/workspace/views/settings/property-workspace-view-settings.element.ts @@ -203,9 +203,12 @@ export class UmbPropertyTypeWorkspaceViewSettingsElement extends UmbLitElement i #onVaryByCultureChange(event: UUIBooleanInputEvent) { const variesByCulture = event.target.checked; - this.updateValue({ - variesByCulture, - }); + this.updateValue({ variesByCulture }); + } + + #onVaryBySegmentChange(event: UUIBooleanInputEvent) { + const variesBySegment = event.target.checked; + this.updateValue({ variesBySegment }); } override render() { @@ -267,14 +270,11 @@ export class UmbPropertyTypeWorkspaceViewSettingsElement extends UmbLitElement i

${this.#renderCustomValidation()} -
${this.#renderVariationControls()} -
- - Appearance - -
${this.#renderAlignLeftIcon()} ${this.#renderAlignTopIcon()}
-
+ +
${this.#renderAlignLeftIcon()} ${this.#renderAlignTopIcon()}
+
+ ${this.#renderMemberTypeOptions()} `; @@ -405,18 +405,35 @@ export class UmbPropertyTypeWorkspaceViewSettingsElement extends UmbLitElement i #renderVariationControls() { return this._contentTypeVariesByCulture || this._contentTypeVariesBySegment - ? html`
- Allow variations - ${this._contentTypeVariesByCulture ? this.#renderVaryByCulture() : ''} -
-
` + ? html` + + ${this._contentTypeVariesByCulture ? this.#renderVaryByCulture() : nothing} + ${this._contentTypeVariesBySegment ? this.#renderVaryBySegment() : nothing} + + ` : ''; } + #renderVaryByCulture() { - return html` `; + return html` +
+ +
+ `; + } + + #renderVaryBySegment() { + return html` +
+ +
+ `; } static override styles = [