Skip to content

Commit

Permalink
(feat) Enable online and offline extensions through configuration (op…
Browse files Browse the repository at this point in the history
  • Loading branch information
icrc-jofrancisco authored Mar 22, 2024
1 parent 1306721 commit bdf68fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions packages/framework/esm-config/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ export interface ConfigObject {

export interface DisplayConditionsConfigObject {
privileges?: string[];
online?: boolean;
offline?: boolean;
}

export type ConfigValue = string | number | boolean | void | Array<any> | object;
Expand Down
4 changes: 2 additions & 2 deletions packages/framework/esm-extensions/src/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ function getAssignedExtensionsFromSlotData(
config: extensionConfig,
featureFlag: extension.featureFlag,
meta: extension.meta,
online: extension.online ?? true,
offline: extension.offline ?? false,
online: extensionConfig?.['Display conditions']?.online ?? extension.online ?? true,
offline: extensionConfig?.['Display conditions']?.offline ?? extension.offline ?? false,
});
}
}
Expand Down

0 comments on commit bdf68fe

Please sign in to comment.