Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.50.5 #1524

Merged
merged 13 commits into from
Aug 19, 2023
Prev Previous commit
Next Next commit
Wait for custom UI (#1522)
  • Loading branch information
dnicolson authored Aug 18, 2023
commit e64aaad0677ff15a91118e2c023519df3aff20e5
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h5 class="modal-title">{{ plugin.displayName || plugin.name }}</h5>
style="border: 0;">
</iframe>

<div *ngIf="pluginConfig.length && schema.singular && showSchemaForm" class="card card-body">
<div *ngIf="uiLoaded && pluginConfig.length && schema.singular && showSchemaForm" class="card card-body">
<app-schema-form [configSchema]="schema" [(data)]="pluginConfig[0]"
(dataChanged)="schemaFormUpdatedSubject.next($event)">
</app-schema-form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export class CustomPluginsComponent implements OnInit, OnDestroy {
public loading = true;
public saveInProgress = false;
public pluginSpinner = false;
public uiLoaded = false;

private basePath: string;
private iframe: HTMLIFrameElement;
Expand Down Expand Up @@ -122,6 +123,9 @@ export class CustomPluginsComponent implements OnInit, OnDestroy {
this.iframe = this.customPluginUiElementTarget.nativeElement as HTMLIFrameElement;
this.iframe.src = environment.api.base + this.basePath +
'/index.html?origin=' + encodeURIComponent(location.origin) + '&v=' + encodeURIComponent(this.plugin.installedVersion);
this.iframe.onload = () => {
this.uiLoaded = true;
};
}

handleMessage = (e: MessageEvent) => {
Expand Down