feat(static-pages): live device preview (desktop/tablet/mobile)

Milestone 5 of the Static Pages Module sprint.

- New StaticPagePreviewComponent: client-side, sanitized HTML preview at
  desktop/tablet(768px)/mobile(375px) widths, entirely without navigation or
  publish. Uses the same DomSanitizer.sanitize(SecurityContext.HTML, ...)
  pattern as the real storefront renderer (StaticPageComponent), so what
  authors preview here matches what will actually render live.
- Wired into static-pages-editor as a per-page collapsible "Preview" toggle,
  showing the default-locale (or first available) translation's html/title.
- i18n: staticPages.previewDesktop/Tablet/Mobile/Toggle in interface + en/ru/hy.

Gate: tsc --noEmit, npm test (57/57), arch:check, build all green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
sdarbinyan
2026-07-17 10:11:31 +04:00
parent 910690c4d1
commit 35ce9ee78a
9 changed files with 160 additions and 0 deletions

View File

@@ -746,6 +746,10 @@ export interface Translations {
customTemplateLabel: string;
seoRobotsLabel: string;
disabledBadge: string;
previewDesktop: string;
previewTablet: string;
previewMobile: string;
previewToggle: string;
};
widgets: {
unavailable: string;