only show culture variant options in dialogs
This commit is contained in:
@@ -35,7 +35,8 @@ export class UmbDocumentSaveAndPublishWorkspaceAction extends UmbWorkspaceAction
|
||||
async hasAdditionalOptions() {
|
||||
const workspaceContext = await this.getContext(UMB_DOCUMENT_WORKSPACE_CONTEXT);
|
||||
const variantOptions = await this.observe(workspaceContext.variantOptions).asPromise();
|
||||
return variantOptions?.length > 1;
|
||||
const cultureVariantOptions = variantOptions?.filter((option) => option.segment === null);
|
||||
return cultureVariantOptions?.length > 1;
|
||||
}
|
||||
|
||||
override async execute() {
|
||||
|
||||
@@ -377,7 +377,8 @@ export class UmbDocumentPublishingWorkspaceContext extends UmbContextBase<UmbDoc
|
||||
await this.#init;
|
||||
if (!this.#documentWorkspaceContext) throw new Error('Document workspace context is missing');
|
||||
|
||||
const options = await firstValueFrom(this.#documentWorkspaceContext.variantOptions);
|
||||
const allOptions = await firstValueFrom(this.#documentWorkspaceContext.variantOptions);
|
||||
const options = allOptions.filter((option) => option.segment === null);
|
||||
|
||||
// TODO: this is a temporary copy of the content-detail workspace context method.
|
||||
// we need to implement custom selection that makes sense for each the publishing modal.
|
||||
|
||||
Reference in New Issue
Block a user