arch(sprint1): add unknown widget fallback diagnostics
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
export * from './footer-navigation-widget.component';
|
||||
export * from './hero-widget.component';
|
||||
export * from './product-carousel-widget.component';
|
||||
export * from './unknown-widget.component';
|
||||
|
||||
38
src/app/widgets/ui/unknown-widget.component.ts
Normal file
38
src/app/widgets/ui/unknown-widget.component.ts
Normal file
@@ -0,0 +1,38 @@
|
||||
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-unknown-widget',
|
||||
standalone: true,
|
||||
template: `
|
||||
<section class="unknown-widget" role="status" aria-live="polite">
|
||||
<strong>Widget unavailable</strong>
|
||||
<p>{{ widgetType }}@{{ widgetVersion }}</p>
|
||||
</section>
|
||||
`,
|
||||
styles: [
|
||||
`
|
||||
.unknown-widget {
|
||||
border: 1px dashed var(--border-color, #d3dad9);
|
||||
border-radius: var(--radius-md, 12px);
|
||||
padding: 0.75rem;
|
||||
color: var(--text-secondary, #667a77);
|
||||
background: var(--background-secondary, #f5f5f5);
|
||||
}
|
||||
|
||||
.unknown-widget strong {
|
||||
display: block;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.unknown-widget p {
|
||||
margin: 0.25rem 0 0;
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
`
|
||||
],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush
|
||||
})
|
||||
export class UnknownWidgetComponent {
|
||||
@Input() widgetType: string = 'unknown';
|
||||
@Input() widgetVersion: string = 'unknown';
|
||||
}
|
||||
Reference in New Issue
Block a user