diff --git a/app/web/src/app/app.routes.ts b/app/web/src/app/app.routes.ts index df80e87b9..ecaf92609 100644 --- a/app/web/src/app/app.routes.ts +++ b/app/web/src/app/app.routes.ts @@ -106,6 +106,15 @@ export const routes: Routes = [ canActivate: [developmentOnly], title: `Debug Components | ${PAGE_TITLE}`, }, + { + path: 'iframe', + loadComponent: () => + import('./features/debug/iframe-debug-page.component').then( + (m) => m.IframeDebugPageComponent + ), + canActivate: [developmentOnly], + title: `Debug iframe | ${PAGE_TITLE}`, + }, ], }, ], diff --git a/app/web/src/app/features/debug/iframe-debug-page.component.ts b/app/web/src/app/features/debug/iframe-debug-page.component.ts new file mode 100644 index 000000000..c9de71965 --- /dev/null +++ b/app/web/src/app/features/debug/iframe-debug-page.component.ts @@ -0,0 +1,20 @@ +import { ChangeDetectionStrategy, Component, inject } from '@angular/core' +import { DomSanitizer } from '@angular/platform-browser' + +@Component({ + selector: 'da-iframe-debug-page', + changeDetection: ChangeDetectionStrategy.OnPush, + template: ` +
+ +
+ `, +}) +export class IframeDebugPageComponent { + private readonly domSanitizer = inject(DomSanitizer) + protected readonly iframeSrc = + this.domSanitizer.bypassSecurityTrustResourceUrl(window.location.origin) +} diff --git a/app/web/src/app/features/kazumi/layout/kazumi-layout.ts b/app/web/src/app/features/kazumi/layout/kazumi-layout.ts index bf070112f..b91969b07 100644 --- a/app/web/src/app/features/kazumi/layout/kazumi-layout.ts +++ b/app/web/src/app/features/kazumi/layout/kazumi-layout.ts @@ -6,11 +6,14 @@ import { RouterOutlet } from '@angular/router' changeDetection: ChangeDetectionStrategy.OnPush, imports: [RouterOutlet], template: ` -
+
`, + host: { + class: 'block h-full', + }, }) export class KazumiLayout {} diff --git a/app/web/src/app/layout/components/sidebar/sidebar.component.ts b/app/web/src/app/layout/components/sidebar/sidebar.component.ts index 4b281c8e6..5a6b3af50 100644 --- a/app/web/src/app/layout/components/sidebar/sidebar.component.ts +++ b/app/web/src/app/layout/components/sidebar/sidebar.component.ts @@ -174,6 +174,11 @@ export class AppSidebar { label: 'Components', icon: 'toolbar', }, + { + path: '/debug/iframe', + label: 'iframe Debug', + icon: 'pip', + }, ], }, ]),