2026-07-10 13:52:01 +04:00
|
|
|
<section class="editor-section-card">
|
|
|
|
|
<div class="editor-actions">
|
|
|
|
|
<h2>{{ 'builder.staticPages' | translate }}</h2>
|
feat(content-management): adopt Design System primitives in Static Pages editor
Replace raw button/input elements with app-button, app-input, app-card,
app-form-field, app-badge, app-empty-state across the static pages CMS editor.
Checkboxes left native (no checkbox primitive built yet).
Also fix pre-existing bug in ContentPageService.normalizePages: iterating
Object.values(config) lost the record key, so legacy-shaped bootstrap entries
without explicit id/slug fields (e.g. mock bootstrap.json's about-us,
privacy-policy, terms-of-service) crashed normalizeSlug(undefined). Now
falls back to the record key for id/slug/title.
Verified in browser at /edit/static-pages: renders correctly, primitives
styled per tenant CSS vars, no console errors after fix.
2026-07-15 04:01:13 +04:00
|
|
|
<app-button variant="primary" (click)="createPage()">{{ 'builder.createPage' | translate }}</app-button>
|
2026-07-10 13:52:01 +04:00
|
|
|
</div>
|
2026-07-17 16:18:22 +04:00
|
|
|
@if (fieldError('staticPages'); as msg) {
|
|
|
|
|
<p class="editor-error">{{ msg }}</p>
|
|
|
|
|
}
|
2026-07-10 13:52:01 +04:00
|
|
|
|
feat(static-pages): CRUD completion + search/filter/bulk actions
Milestone 2 of the Static Pages Module sprint.
- StaticPagesEditorComponent: duplicate page, confirm-before-delete/bulk-
delete (matches the resetDraft confirm pattern), route/enabled/customTemplate/
media(hero/thumbnail/gallery) fields wired into the card, per-page publish/
unpublish action, status + duplicate-route/invalid-html/invalid-seo badges.
- Search (id/slug/route/title across all locales), filter by status
(draft/published) and by locale (hides pages missing a translation for the
selected locale) - all local computed() filters, no new service.
- Bulk selection (per-row + select-all-visible checkboxes) with bulk delete/
enable/disable/publish/unpublish, one updateBootstrap() call each.
- Correctness note: introduced `allPages` (unfiltered) vs `pages` (filtered
view) computeds. Every mutation (create/duplicate/delete/move/bulk) reads
from allPages(), never the filtered pages() - reading from the filtered
view would have silently deleted whatever an active search/filter hid on
the next persist(). Documented inline on persist() as a guardrail for
future edits.
- Fixed a template compile error found by the build gate: Angular templates
don't support inline arrow functions in binding expressions
((ngModelChange)="...map(v => v.trim())..." failed to parse) - moved the
gallery CSV-parsing into a component method (updateGallery).
- SEO robots field added to the page card (validated against a known-token
set from M1).
- i18n: staticPages.* extended (search/filter/bulk/route/enabled/status/
media/robots/disabled labels) across the 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>
2026-07-17 09:55:21 +04:00
|
|
|
<div class="editor-grid three static-pages-toolbar">
|
|
|
|
|
<app-form-field [label]="'staticPages.searchPlaceholder' | translate">
|
|
|
|
|
<app-input [ngModel]="searchQuery()" (ngModelChange)="updateSearchQuery($event)" [placeholder]="'staticPages.searchPlaceholder' | translate" />
|
|
|
|
|
</app-form-field>
|
|
|
|
|
<app-form-field [label]="'staticPages.statusLabel' | translate">
|
|
|
|
|
<app-select [options]="statusFilterOptions()" [ngModel]="statusFilter()" (ngModelChange)="updateStatusFilter($event)" />
|
|
|
|
|
</app-form-field>
|
|
|
|
|
<app-form-field [label]="'builder.languagesTab' | translate">
|
|
|
|
|
<app-select [options]="localeFilterOptions()" [ngModel]="localeFilter()" (ngModelChange)="updateLocaleFilter($event)" />
|
|
|
|
|
</app-form-field>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
@if (pages().length > 0) {
|
|
|
|
|
<div class="editor-actions static-pages-bulk-bar">
|
|
|
|
|
<label class="toggle-row">
|
|
|
|
|
<app-toggle [ngModel]="allVisibleSelected()" (ngModelChange)="toggleSelectAllVisible($event)" [ariaLabel]="'staticPages.selectAll' | translate" />
|
|
|
|
|
<span>{{ 'staticPages.selectAll' | translate }}</span>
|
|
|
|
|
</label>
|
|
|
|
|
@if (selectedCount() > 0) {
|
|
|
|
|
<span>{{ selectedCount() }} {{ 'staticPages.selectedCount' | translate }}</span>
|
|
|
|
|
<app-button variant="secondary" size="sm" (click)="bulkSetEnabled(true)">{{ 'staticPages.bulkEnable' | translate }}</app-button>
|
|
|
|
|
<app-button variant="secondary" size="sm" (click)="bulkSetEnabled(false)">{{ 'staticPages.bulkDisable' | translate }}</app-button>
|
|
|
|
|
<app-button variant="secondary" size="sm" (click)="bulkSetStatus('published')">{{ 'staticPages.bulkPublishAction' | translate }}</app-button>
|
|
|
|
|
<app-button variant="secondary" size="sm" (click)="bulkSetStatus('draft')">{{ 'staticPages.bulkUnpublish' | translate }}</app-button>
|
|
|
|
|
<app-button variant="danger" size="sm" (click)="bulkDelete()">{{ 'staticPages.bulkDelete' | translate }}</app-button>
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
|
feat(content-management): adopt Design System primitives in Static Pages editor
Replace raw button/input elements with app-button, app-input, app-card,
app-form-field, app-badge, app-empty-state across the static pages CMS editor.
Checkboxes left native (no checkbox primitive built yet).
Also fix pre-existing bug in ContentPageService.normalizePages: iterating
Object.values(config) lost the record key, so legacy-shaped bootstrap entries
without explicit id/slug fields (e.g. mock bootstrap.json's about-us,
privacy-policy, terms-of-service) crashed normalizeSlug(undefined). Now
falls back to the record key for id/slug/title.
Verified in browser at /edit/static-pages: renders correctly, primitives
styled per tenant CSS vars, no console errors after fix.
2026-07-15 04:01:13 +04:00
|
|
|
@if (pages().length === 0) {
|
|
|
|
|
<app-empty-state [title]="'builder.staticPages' | translate" [description]="'builder.createPage' | translate">
|
|
|
|
|
<span slot="actions">
|
|
|
|
|
<app-button variant="primary" (click)="createPage()">{{ 'builder.createPage' | translate }}</app-button>
|
|
|
|
|
</span>
|
|
|
|
|
</app-empty-state>
|
2026-07-10 13:52:01 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<div class="stack-list">
|
|
|
|
|
@for (page of pages(); track page.id) {
|
feat(content-management): adopt Design System primitives in Static Pages editor
Replace raw button/input elements with app-button, app-input, app-card,
app-form-field, app-badge, app-empty-state across the static pages CMS editor.
Checkboxes left native (no checkbox primitive built yet).
Also fix pre-existing bug in ContentPageService.normalizePages: iterating
Object.values(config) lost the record key, so legacy-shaped bootstrap entries
without explicit id/slug fields (e.g. mock bootstrap.json's about-us,
privacy-policy, terms-of-service) crashed normalizeSlug(undefined). Now
falls back to the record key for id/slug/title.
Verified in browser at /edit/static-pages: renders correctly, primitives
styled per tenant CSS vars, no console errors after fix.
2026-07-15 04:01:13 +04:00
|
|
|
<app-card padding="md">
|
|
|
|
|
<div class="page-card">
|
|
|
|
|
<div class="page-card__header">
|
feat(static-pages): CRUD completion + search/filter/bulk actions
Milestone 2 of the Static Pages Module sprint.
- StaticPagesEditorComponent: duplicate page, confirm-before-delete/bulk-
delete (matches the resetDraft confirm pattern), route/enabled/customTemplate/
media(hero/thumbnail/gallery) fields wired into the card, per-page publish/
unpublish action, status + duplicate-route/invalid-html/invalid-seo badges.
- Search (id/slug/route/title across all locales), filter by status
(draft/published) and by locale (hides pages missing a translation for the
selected locale) - all local computed() filters, no new service.
- Bulk selection (per-row + select-all-visible checkboxes) with bulk delete/
enable/disable/publish/unpublish, one updateBootstrap() call each.
- Correctness note: introduced `allPages` (unfiltered) vs `pages` (filtered
view) computeds. Every mutation (create/duplicate/delete/move/bulk) reads
from allPages(), never the filtered pages() - reading from the filtered
view would have silently deleted whatever an active search/filter hid on
the next persist(). Documented inline on persist() as a guardrail for
future edits.
- Fixed a template compile error found by the build gate: Angular templates
don't support inline arrow functions in binding expressions
((ngModelChange)="...map(v => v.trim())..." failed to parse) - moved the
gallery CSV-parsing into a component method (updateGallery).
- SEO robots field added to the page card (validated against a known-token
set from M1).
- i18n: staticPages.* extended (search/filter/bulk/route/enabled/status/
media/robots/disabled labels) across the 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>
2026-07-17 09:55:21 +04:00
|
|
|
<label class="toggle-row page-card__select">
|
|
|
|
|
<app-toggle [ngModel]="isSelected(page.id)" (ngModelChange)="toggleSelect(page.id, $event)" [ariaLabel]="page.id" />
|
|
|
|
|
</label>
|
2026-07-15 04:46:27 +04:00
|
|
|
<h3 class="page-card__title">
|
|
|
|
|
{{ page.id }}
|
feat(static-pages): CRUD completion + search/filter/bulk actions
Milestone 2 of the Static Pages Module sprint.
- StaticPagesEditorComponent: duplicate page, confirm-before-delete/bulk-
delete (matches the resetDraft confirm pattern), route/enabled/customTemplate/
media(hero/thumbnail/gallery) fields wired into the card, per-page publish/
unpublish action, status + duplicate-route/invalid-html/invalid-seo badges.
- Search (id/slug/route/title across all locales), filter by status
(draft/published) and by locale (hides pages missing a translation for the
selected locale) - all local computed() filters, no new service.
- Bulk selection (per-row + select-all-visible checkboxes) with bulk delete/
enable/disable/publish/unpublish, one updateBootstrap() call each.
- Correctness note: introduced `allPages` (unfiltered) vs `pages` (filtered
view) computeds. Every mutation (create/duplicate/delete/move/bulk) reads
from allPages(), never the filtered pages() - reading from the filtered
view would have silently deleted whatever an active search/filter hid on
the next persist(). Documented inline on persist() as a guardrail for
future edits.
- Fixed a template compile error found by the build gate: Angular templates
don't support inline arrow functions in binding expressions
((ngModelChange)="...map(v => v.trim())..." failed to parse) - moved the
gallery CSV-parsing into a component method (updateGallery).
- SEO robots field added to the page card (validated against a known-token
set from M1).
- i18n: staticPages.* extended (search/filter/bulk/route/enabled/status/
media/robots/disabled labels) across the 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>
2026-07-17 09:55:21 +04:00
|
|
|
<app-badge [variant]="page.status === 'published' ? 'success' : 'neutral'">{{ (page.status === 'published' ? 'builder.statusPublished' : 'builder.statusDraft') | translate }}</app-badge>
|
|
|
|
|
@if (!page.enabled) {
|
|
|
|
|
<app-badge variant="neutral">{{ 'staticPages.disabledBadge' | translate }}</app-badge>
|
|
|
|
|
}
|
2026-07-17 10:05:50 +04:00
|
|
|
@if (isModified(page)) {
|
|
|
|
|
<app-badge variant="info">{{ 'builder.unsavedChanges' | translate }}</app-badge>
|
|
|
|
|
}
|
2026-07-15 04:46:27 +04:00
|
|
|
@if (hasDuplicateSlug(page)) {
|
|
|
|
|
<app-badge variant="danger">{{ 'staticPages.duplicateSlug' | translate }}</app-badge>
|
|
|
|
|
}
|
feat(static-pages): CRUD completion + search/filter/bulk actions
Milestone 2 of the Static Pages Module sprint.
- StaticPagesEditorComponent: duplicate page, confirm-before-delete/bulk-
delete (matches the resetDraft confirm pattern), route/enabled/customTemplate/
media(hero/thumbnail/gallery) fields wired into the card, per-page publish/
unpublish action, status + duplicate-route/invalid-html/invalid-seo badges.
- Search (id/slug/route/title across all locales), filter by status
(draft/published) and by locale (hides pages missing a translation for the
selected locale) - all local computed() filters, no new service.
- Bulk selection (per-row + select-all-visible checkboxes) with bulk delete/
enable/disable/publish/unpublish, one updateBootstrap() call each.
- Correctness note: introduced `allPages` (unfiltered) vs `pages` (filtered
view) computeds. Every mutation (create/duplicate/delete/move/bulk) reads
from allPages(), never the filtered pages() - reading from the filtered
view would have silently deleted whatever an active search/filter hid on
the next persist(). Documented inline on persist() as a guardrail for
future edits.
- Fixed a template compile error found by the build gate: Angular templates
don't support inline arrow functions in binding expressions
((ngModelChange)="...map(v => v.trim())..." failed to parse) - moved the
gallery CSV-parsing into a component method (updateGallery).
- SEO robots field added to the page card (validated against a known-token
set from M1).
- i18n: staticPages.* extended (search/filter/bulk/route/enabled/status/
media/robots/disabled labels) across the 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>
2026-07-17 09:55:21 +04:00
|
|
|
@if (hasDuplicateRoute(page)) {
|
|
|
|
|
<app-badge variant="danger">{{ 'staticPages.duplicateRoute' | translate }}</app-badge>
|
|
|
|
|
}
|
2026-07-15 04:46:27 +04:00
|
|
|
@if (hasEmptyTitle(page)) {
|
|
|
|
|
<app-badge variant="danger">{{ 'staticPages.emptyTitle' | translate }}</app-badge>
|
|
|
|
|
}
|
feat(static-pages): CRUD completion + search/filter/bulk actions
Milestone 2 of the Static Pages Module sprint.
- StaticPagesEditorComponent: duplicate page, confirm-before-delete/bulk-
delete (matches the resetDraft confirm pattern), route/enabled/customTemplate/
media(hero/thumbnail/gallery) fields wired into the card, per-page publish/
unpublish action, status + duplicate-route/invalid-html/invalid-seo badges.
- Search (id/slug/route/title across all locales), filter by status
(draft/published) and by locale (hides pages missing a translation for the
selected locale) - all local computed() filters, no new service.
- Bulk selection (per-row + select-all-visible checkboxes) with bulk delete/
enable/disable/publish/unpublish, one updateBootstrap() call each.
- Correctness note: introduced `allPages` (unfiltered) vs `pages` (filtered
view) computeds. Every mutation (create/duplicate/delete/move/bulk) reads
from allPages(), never the filtered pages() - reading from the filtered
view would have silently deleted whatever an active search/filter hid on
the next persist(). Documented inline on persist() as a guardrail for
future edits.
- Fixed a template compile error found by the build gate: Angular templates
don't support inline arrow functions in binding expressions
((ngModelChange)="...map(v => v.trim())..." failed to parse) - moved the
gallery CSV-parsing into a component method (updateGallery).
- SEO robots field added to the page card (validated against a known-token
set from M1).
- i18n: staticPages.* extended (search/filter/bulk/route/enabled/status/
media/robots/disabled labels) across the 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>
2026-07-17 09:55:21 +04:00
|
|
|
@if (hasInvalidHtml(page)) {
|
|
|
|
|
<app-badge variant="danger">{{ 'staticPages.invalidHtml' | translate }}</app-badge>
|
|
|
|
|
}
|
|
|
|
|
@if (hasInvalidSeo(page)) {
|
|
|
|
|
<app-badge variant="warning">{{ 'staticPages.invalidSeo' | translate }}</app-badge>
|
|
|
|
|
}
|
2026-07-15 04:46:27 +04:00
|
|
|
</h3>
|
feat(content-management): adopt Design System primitives in Static Pages editor
Replace raw button/input elements with app-button, app-input, app-card,
app-form-field, app-badge, app-empty-state across the static pages CMS editor.
Checkboxes left native (no checkbox primitive built yet).
Also fix pre-existing bug in ContentPageService.normalizePages: iterating
Object.values(config) lost the record key, so legacy-shaped bootstrap entries
without explicit id/slug fields (e.g. mock bootstrap.json's about-us,
privacy-policy, terms-of-service) crashed normalizeSlug(undefined). Now
falls back to the record key for id/slug/title.
Verified in browser at /edit/static-pages: renders correctly, primitives
styled per tenant CSS vars, no console errors after fix.
2026-07-15 04:01:13 +04:00
|
|
|
<div class="editor-actions">
|
|
|
|
|
<app-button variant="ghost" size="sm" (click)="move(page.id, -1)">↑</app-button>
|
|
|
|
|
<app-button variant="ghost" size="sm" (click)="move(page.id, 1)">↓</app-button>
|
feat(static-pages): CRUD completion + search/filter/bulk actions
Milestone 2 of the Static Pages Module sprint.
- StaticPagesEditorComponent: duplicate page, confirm-before-delete/bulk-
delete (matches the resetDraft confirm pattern), route/enabled/customTemplate/
media(hero/thumbnail/gallery) fields wired into the card, per-page publish/
unpublish action, status + duplicate-route/invalid-html/invalid-seo badges.
- Search (id/slug/route/title across all locales), filter by status
(draft/published) and by locale (hides pages missing a translation for the
selected locale) - all local computed() filters, no new service.
- Bulk selection (per-row + select-all-visible checkboxes) with bulk delete/
enable/disable/publish/unpublish, one updateBootstrap() call each.
- Correctness note: introduced `allPages` (unfiltered) vs `pages` (filtered
view) computeds. Every mutation (create/duplicate/delete/move/bulk) reads
from allPages(), never the filtered pages() - reading from the filtered
view would have silently deleted whatever an active search/filter hid on
the next persist(). Documented inline on persist() as a guardrail for
future edits.
- Fixed a template compile error found by the build gate: Angular templates
don't support inline arrow functions in binding expressions
((ngModelChange)="...map(v => v.trim())..." failed to parse) - moved the
gallery CSV-parsing into a component method (updateGallery).
- SEO robots field added to the page card (validated against a known-token
set from M1).
- i18n: staticPages.* extended (search/filter/bulk/route/enabled/status/
media/robots/disabled labels) across the 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>
2026-07-17 09:55:21 +04:00
|
|
|
<app-button variant="secondary" size="sm" (click)="duplicatePage(page.id)">{{ 'staticPages.duplicatePage' | translate }}</app-button>
|
2026-07-17 10:11:31 +04:00
|
|
|
<app-button variant="secondary" size="sm" (click)="togglePreview(page.id)">{{ 'staticPages.previewToggle' | translate }}</app-button>
|
feat(static-pages): CRUD completion + search/filter/bulk actions
Milestone 2 of the Static Pages Module sprint.
- StaticPagesEditorComponent: duplicate page, confirm-before-delete/bulk-
delete (matches the resetDraft confirm pattern), route/enabled/customTemplate/
media(hero/thumbnail/gallery) fields wired into the card, per-page publish/
unpublish action, status + duplicate-route/invalid-html/invalid-seo badges.
- Search (id/slug/route/title across all locales), filter by status
(draft/published) and by locale (hides pages missing a translation for the
selected locale) - all local computed() filters, no new service.
- Bulk selection (per-row + select-all-visible checkboxes) with bulk delete/
enable/disable/publish/unpublish, one updateBootstrap() call each.
- Correctness note: introduced `allPages` (unfiltered) vs `pages` (filtered
view) computeds. Every mutation (create/duplicate/delete/move/bulk) reads
from allPages(), never the filtered pages() - reading from the filtered
view would have silently deleted whatever an active search/filter hid on
the next persist(). Documented inline on persist() as a guardrail for
future edits.
- Fixed a template compile error found by the build gate: Angular templates
don't support inline arrow functions in binding expressions
((ngModelChange)="...map(v => v.trim())..." failed to parse) - moved the
gallery CSV-parsing into a component method (updateGallery).
- SEO robots field added to the page card (validated against a known-token
set from M1).
- i18n: staticPages.* extended (search/filter/bulk/route/enabled/status/
media/robots/disabled labels) across the 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>
2026-07-17 09:55:21 +04:00
|
|
|
@if (page.status === 'published') {
|
|
|
|
|
<app-button variant="secondary" size="sm" (click)="updatePage(page.id, { status: 'draft' })">{{ 'staticPages.unpublishPageAction' | translate }}</app-button>
|
|
|
|
|
} @else {
|
|
|
|
|
<app-button variant="primary" size="sm" (click)="updatePage(page.id, { status: 'published' })">{{ 'staticPages.publishPageAction' | translate }}</app-button>
|
|
|
|
|
}
|
feat(content-management): adopt Design System primitives in Static Pages editor
Replace raw button/input elements with app-button, app-input, app-card,
app-form-field, app-badge, app-empty-state across the static pages CMS editor.
Checkboxes left native (no checkbox primitive built yet).
Also fix pre-existing bug in ContentPageService.normalizePages: iterating
Object.values(config) lost the record key, so legacy-shaped bootstrap entries
without explicit id/slug fields (e.g. mock bootstrap.json's about-us,
privacy-policy, terms-of-service) crashed normalizeSlug(undefined). Now
falls back to the record key for id/slug/title.
Verified in browser at /edit/static-pages: renders correctly, primitives
styled per tenant CSS vars, no console errors after fix.
2026-07-15 04:01:13 +04:00
|
|
|
<app-button variant="danger" size="sm" (click)="deletePage(page.id)">{{ 'builder.deletePage' | translate }}</app-button>
|
|
|
|
|
</div>
|
2026-07-10 13:52:01 +04:00
|
|
|
</div>
|
|
|
|
|
|
2026-07-17 10:11:31 +04:00
|
|
|
@if (previewOpenPageId() === page.id) {
|
|
|
|
|
<app-static-page-preview [html]="previewHtml(page)" [title]="previewTitle(page)" />
|
|
|
|
|
}
|
|
|
|
|
|
feat(content-management): adopt Design System primitives in Static Pages editor
Replace raw button/input elements with app-button, app-input, app-card,
app-form-field, app-badge, app-empty-state across the static pages CMS editor.
Checkboxes left native (no checkbox primitive built yet).
Also fix pre-existing bug in ContentPageService.normalizePages: iterating
Object.values(config) lost the record key, so legacy-shaped bootstrap entries
without explicit id/slug fields (e.g. mock bootstrap.json's about-us,
privacy-policy, terms-of-service) crashed normalizeSlug(undefined). Now
falls back to the record key for id/slug/title.
Verified in browser at /edit/static-pages: renders correctly, primitives
styled per tenant CSS vars, no console errors after fix.
2026-07-15 04:01:13 +04:00
|
|
|
<div class="editor-grid three">
|
2026-07-15 04:46:27 +04:00
|
|
|
<app-form-field [label]="'builder.pageId' | translate" [error]="hasEmptyTitle(page) ? ('staticPages.emptyTitle' | translate) : null">
|
feat(content-management): adopt Design System primitives in Static Pages editor
Replace raw button/input elements with app-button, app-input, app-card,
app-form-field, app-badge, app-empty-state across the static pages CMS editor.
Checkboxes left native (no checkbox primitive built yet).
Also fix pre-existing bug in ContentPageService.normalizePages: iterating
Object.values(config) lost the record key, so legacy-shaped bootstrap entries
without explicit id/slug fields (e.g. mock bootstrap.json's about-us,
privacy-policy, terms-of-service) crashed normalizeSlug(undefined). Now
falls back to the record key for id/slug/title.
Verified in browser at /edit/static-pages: renders correctly, primitives
styled per tenant CSS vars, no console errors after fix.
2026-07-15 04:01:13 +04:00
|
|
|
<app-input [ngModel]="page.id" (ngModelChange)="updatePage(page.id, { id: $event })" />
|
|
|
|
|
</app-form-field>
|
2026-07-15 04:46:27 +04:00
|
|
|
<app-form-field [label]="'builder.slug' | translate" [error]="hasDuplicateSlug(page) ? ('staticPages.duplicateSlug' | translate) : null">
|
feat(content-management): adopt Design System primitives in Static Pages editor
Replace raw button/input elements with app-button, app-input, app-card,
app-form-field, app-badge, app-empty-state across the static pages CMS editor.
Checkboxes left native (no checkbox primitive built yet).
Also fix pre-existing bug in ContentPageService.normalizePages: iterating
Object.values(config) lost the record key, so legacy-shaped bootstrap entries
without explicit id/slug fields (e.g. mock bootstrap.json's about-us,
privacy-policy, terms-of-service) crashed normalizeSlug(undefined). Now
falls back to the record key for id/slug/title.
Verified in browser at /edit/static-pages: renders correctly, primitives
styled per tenant CSS vars, no console errors after fix.
2026-07-15 04:01:13 +04:00
|
|
|
<app-input [ngModel]="page.slug" (ngModelChange)="updatePage(page.id, { slug: $event })" />
|
|
|
|
|
</app-form-field>
|
feat(static-pages): CRUD completion + search/filter/bulk actions
Milestone 2 of the Static Pages Module sprint.
- StaticPagesEditorComponent: duplicate page, confirm-before-delete/bulk-
delete (matches the resetDraft confirm pattern), route/enabled/customTemplate/
media(hero/thumbnail/gallery) fields wired into the card, per-page publish/
unpublish action, status + duplicate-route/invalid-html/invalid-seo badges.
- Search (id/slug/route/title across all locales), filter by status
(draft/published) and by locale (hides pages missing a translation for the
selected locale) - all local computed() filters, no new service.
- Bulk selection (per-row + select-all-visible checkboxes) with bulk delete/
enable/disable/publish/unpublish, one updateBootstrap() call each.
- Correctness note: introduced `allPages` (unfiltered) vs `pages` (filtered
view) computeds. Every mutation (create/duplicate/delete/move/bulk) reads
from allPages(), never the filtered pages() - reading from the filtered
view would have silently deleted whatever an active search/filter hid on
the next persist(). Documented inline on persist() as a guardrail for
future edits.
- Fixed a template compile error found by the build gate: Angular templates
don't support inline arrow functions in binding expressions
((ngModelChange)="...map(v => v.trim())..." failed to parse) - moved the
gallery CSV-parsing into a component method (updateGallery).
- SEO robots field added to the page card (validated against a known-token
set from M1).
- i18n: staticPages.* extended (search/filter/bulk/route/enabled/status/
media/robots/disabled labels) across the 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>
2026-07-17 09:55:21 +04:00
|
|
|
<app-form-field [label]="'staticPages.routeLabel' | translate" [error]="hasDuplicateRoute(page) ? ('staticPages.duplicateRoute' | translate) : null">
|
|
|
|
|
<app-input [ngModel]="page.route" (ngModelChange)="updatePage(page.id, { route: $event })" />
|
|
|
|
|
</app-form-field>
|
feat(content-management): adopt Design System primitives in Static Pages editor
Replace raw button/input elements with app-button, app-input, app-card,
app-form-field, app-badge, app-empty-state across the static pages CMS editor.
Checkboxes left native (no checkbox primitive built yet).
Also fix pre-existing bug in ContentPageService.normalizePages: iterating
Object.values(config) lost the record key, so legacy-shaped bootstrap entries
without explicit id/slug fields (e.g. mock bootstrap.json's about-us,
privacy-policy, terms-of-service) crashed normalizeSlug(undefined). Now
falls back to the record key for id/slug/title.
Verified in browser at /edit/static-pages: renders correctly, primitives
styled per tenant CSS vars, no console errors after fix.
2026-07-15 04:01:13 +04:00
|
|
|
<app-form-field [label]="'builder.iconLabel' | translate">
|
|
|
|
|
<app-input [ngModel]="page.icon || ''" (ngModelChange)="updatePage(page.id, { icon: $event })" />
|
|
|
|
|
</app-form-field>
|
|
|
|
|
<app-form-field [label]="'builder.footerGroup' | translate">
|
|
|
|
|
<app-input [ngModel]="page.footerGroup || ''" (ngModelChange)="updatePage(page.id, { footerGroup: $event })" />
|
|
|
|
|
</app-form-field>
|
|
|
|
|
<app-form-field [label]="'builder.orderLabel' | translate">
|
|
|
|
|
<app-input type="number" [ngModel]="page.order" (ngModelChange)="updatePage(page.id, { order: +$event })" />
|
|
|
|
|
</app-form-field>
|
feat(static-pages): CRUD completion + search/filter/bulk actions
Milestone 2 of the Static Pages Module sprint.
- StaticPagesEditorComponent: duplicate page, confirm-before-delete/bulk-
delete (matches the resetDraft confirm pattern), route/enabled/customTemplate/
media(hero/thumbnail/gallery) fields wired into the card, per-page publish/
unpublish action, status + duplicate-route/invalid-html/invalid-seo badges.
- Search (id/slug/route/title across all locales), filter by status
(draft/published) and by locale (hides pages missing a translation for the
selected locale) - all local computed() filters, no new service.
- Bulk selection (per-row + select-all-visible checkboxes) with bulk delete/
enable/disable/publish/unpublish, one updateBootstrap() call each.
- Correctness note: introduced `allPages` (unfiltered) vs `pages` (filtered
view) computeds. Every mutation (create/duplicate/delete/move/bulk) reads
from allPages(), never the filtered pages() - reading from the filtered
view would have silently deleted whatever an active search/filter hid on
the next persist(). Documented inline on persist() as a guardrail for
future edits.
- Fixed a template compile error found by the build gate: Angular templates
don't support inline arrow functions in binding expressions
((ngModelChange)="...map(v => v.trim())..." failed to parse) - moved the
gallery CSV-parsing into a component method (updateGallery).
- SEO robots field added to the page card (validated against a known-token
set from M1).
- i18n: staticPages.* extended (search/filter/bulk/route/enabled/status/
media/robots/disabled labels) across the 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>
2026-07-17 09:55:21 +04:00
|
|
|
<app-form-field [label]="'staticPages.customTemplateLabel' | translate">
|
|
|
|
|
<app-input [ngModel]="page.customTemplate || ''" (ngModelChange)="updatePage(page.id, { customTemplate: $event })" />
|
|
|
|
|
</app-form-field>
|
|
|
|
|
<label class="toggle-row">
|
|
|
|
|
<app-toggle [ngModel]="page.enabled" (ngModelChange)="updatePage(page.id, { enabled: $event })" [ariaLabel]="'staticPages.enabledLabel' | translate" />
|
|
|
|
|
<span>{{ 'staticPages.enabledLabel' | translate }}</span>
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="editor-grid three">
|
|
|
|
|
<app-form-field [label]="'staticPages.heroImageLabel' | translate">
|
2026-07-17 10:05:50 +04:00
|
|
|
<div class="media-field-row">
|
|
|
|
|
<app-input [ngModel]="page.heroImage || ''" (ngModelChange)="updatePage(page.id, { heroImage: $event })" />
|
|
|
|
|
<app-button variant="secondary" size="sm" (click)="openMediaPicker(page.id, 'heroImage')">{{ 'adminCategories.chooseImage' | translate }}</app-button>
|
|
|
|
|
</div>
|
feat(static-pages): CRUD completion + search/filter/bulk actions
Milestone 2 of the Static Pages Module sprint.
- StaticPagesEditorComponent: duplicate page, confirm-before-delete/bulk-
delete (matches the resetDraft confirm pattern), route/enabled/customTemplate/
media(hero/thumbnail/gallery) fields wired into the card, per-page publish/
unpublish action, status + duplicate-route/invalid-html/invalid-seo badges.
- Search (id/slug/route/title across all locales), filter by status
(draft/published) and by locale (hides pages missing a translation for the
selected locale) - all local computed() filters, no new service.
- Bulk selection (per-row + select-all-visible checkboxes) with bulk delete/
enable/disable/publish/unpublish, one updateBootstrap() call each.
- Correctness note: introduced `allPages` (unfiltered) vs `pages` (filtered
view) computeds. Every mutation (create/duplicate/delete/move/bulk) reads
from allPages(), never the filtered pages() - reading from the filtered
view would have silently deleted whatever an active search/filter hid on
the next persist(). Documented inline on persist() as a guardrail for
future edits.
- Fixed a template compile error found by the build gate: Angular templates
don't support inline arrow functions in binding expressions
((ngModelChange)="...map(v => v.trim())..." failed to parse) - moved the
gallery CSV-parsing into a component method (updateGallery).
- SEO robots field added to the page card (validated against a known-token
set from M1).
- i18n: staticPages.* extended (search/filter/bulk/route/enabled/status/
media/robots/disabled labels) across the 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>
2026-07-17 09:55:21 +04:00
|
|
|
</app-form-field>
|
|
|
|
|
<app-form-field [label]="'staticPages.thumbnailLabel' | translate">
|
2026-07-17 10:05:50 +04:00
|
|
|
<div class="media-field-row">
|
|
|
|
|
<app-input [ngModel]="page.thumbnail || ''" (ngModelChange)="updatePage(page.id, { thumbnail: $event })" />
|
|
|
|
|
<app-button variant="secondary" size="sm" (click)="openMediaPicker(page.id, 'thumbnail')">{{ 'adminCategories.chooseImage' | translate }}</app-button>
|
|
|
|
|
</div>
|
feat(static-pages): CRUD completion + search/filter/bulk actions
Milestone 2 of the Static Pages Module sprint.
- StaticPagesEditorComponent: duplicate page, confirm-before-delete/bulk-
delete (matches the resetDraft confirm pattern), route/enabled/customTemplate/
media(hero/thumbnail/gallery) fields wired into the card, per-page publish/
unpublish action, status + duplicate-route/invalid-html/invalid-seo badges.
- Search (id/slug/route/title across all locales), filter by status
(draft/published) and by locale (hides pages missing a translation for the
selected locale) - all local computed() filters, no new service.
- Bulk selection (per-row + select-all-visible checkboxes) with bulk delete/
enable/disable/publish/unpublish, one updateBootstrap() call each.
- Correctness note: introduced `allPages` (unfiltered) vs `pages` (filtered
view) computeds. Every mutation (create/duplicate/delete/move/bulk) reads
from allPages(), never the filtered pages() - reading from the filtered
view would have silently deleted whatever an active search/filter hid on
the next persist(). Documented inline on persist() as a guardrail for
future edits.
- Fixed a template compile error found by the build gate: Angular templates
don't support inline arrow functions in binding expressions
((ngModelChange)="...map(v => v.trim())..." failed to parse) - moved the
gallery CSV-parsing into a component method (updateGallery).
- SEO robots field added to the page card (validated against a known-token
set from M1).
- i18n: staticPages.* extended (search/filter/bulk/route/enabled/status/
media/robots/disabled labels) across the 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>
2026-07-17 09:55:21 +04:00
|
|
|
</app-form-field>
|
|
|
|
|
<app-form-field [label]="'staticPages.galleryLabel' | translate">
|
|
|
|
|
<app-input [ngModel]="(page.gallery || []).join(', ')" (ngModelChange)="updateGallery(page.id, $event)" />
|
|
|
|
|
</app-form-field>
|
2026-07-10 13:52:01 +04:00
|
|
|
</div>
|
feat(content-management): adopt Design System primitives in Static Pages editor
Replace raw button/input elements with app-button, app-input, app-card,
app-form-field, app-badge, app-empty-state across the static pages CMS editor.
Checkboxes left native (no checkbox primitive built yet).
Also fix pre-existing bug in ContentPageService.normalizePages: iterating
Object.values(config) lost the record key, so legacy-shaped bootstrap entries
without explicit id/slug fields (e.g. mock bootstrap.json's about-us,
privacy-policy, terms-of-service) crashed normalizeSlug(undefined). Now
falls back to the record key for id/slug/title.
Verified in browser at /edit/static-pages: renders correctly, primitives
styled per tenant CSS vars, no console errors after fix.
2026-07-15 04:01:13 +04:00
|
|
|
|
|
|
|
|
<div class="toggle-grid">
|
|
|
|
|
<label class="toggle-row"><input type="checkbox" [checked]="page.showInFooter" (change)="updatePage(page.id, { showInFooter: $any($event.target).checked })" /><span>{{ 'builder.showInFooter' | translate }}</span></label>
|
|
|
|
|
<label class="toggle-row"><input type="checkbox" [checked]="page.showInHeader" (change)="updatePage(page.id, { showInHeader: $any($event.target).checked })" /><span>{{ 'builder.showInHeader' | translate }}</span></label>
|
|
|
|
|
<label class="toggle-row"><input type="checkbox" [checked]="page.showInSitemap" (change)="updatePage(page.id, { showInSitemap: $any($event.target).checked })" /><span>{{ 'builder.showInSitemap' | translate }}</span></label>
|
|
|
|
|
<label class="toggle-row"><input type="checkbox" [checked]="page.requiresAuthentication" (change)="updatePage(page.id, { requiresAuthentication: $any($event.target).checked })" /><span>{{ 'builder.requiresAuthentication' | translate }}</span></label>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
@for (locale of locales(); track locale) {
|
|
|
|
|
<div class="editor-grid two">
|
|
|
|
|
<app-form-field [label]="(('builder.translationTitle' | translate) + ' ' + locale)">
|
|
|
|
|
<app-input [ngModel]="page.translations[locale]?.title || ''" (ngModelChange)="updateTranslation(page.id, locale, 'title', $event)" />
|
|
|
|
|
</app-form-field>
|
|
|
|
|
<label class="full">
|
|
|
|
|
<span>{{ 'builder.htmlPreview' | translate }} {{ locale }}</span>
|
|
|
|
|
<app-marketplace-html-editor
|
|
|
|
|
[html]="page.translations[locale]?.html || ''"
|
|
|
|
|
(htmlChange)="updateTranslation(page.id, locale, 'html', $event)"
|
|
|
|
|
/>
|
|
|
|
|
</label>
|
|
|
|
|
</div>
|
|
|
|
|
}
|
2026-07-15 04:11:18 +04:00
|
|
|
|
|
|
|
|
<h4 class="page-card__subheading">{{ 'builder.seoSection' | translate }}</h4>
|
|
|
|
|
<div class="editor-grid two">
|
|
|
|
|
<app-form-field [label]="'builder.seoTitle' | translate">
|
|
|
|
|
<app-input [ngModel]="page.seo?.title || ''" (ngModelChange)="updateSeo(page.id, { title: $event })" />
|
|
|
|
|
</app-form-field>
|
|
|
|
|
<app-form-field [label]="'builder.seoDescription' | translate">
|
|
|
|
|
<app-input [ngModel]="page.seo?.description || ''" (ngModelChange)="updateSeo(page.id, { description: $event })" />
|
|
|
|
|
</app-form-field>
|
|
|
|
|
<app-form-field [label]="'builder.seoKeywords' | translate">
|
|
|
|
|
<app-input [ngModel]="page.seo?.keywords || ''" (ngModelChange)="updateSeo(page.id, { keywords: $event })" />
|
|
|
|
|
</app-form-field>
|
|
|
|
|
<app-form-field [label]="'builder.seoCanonical' | translate">
|
|
|
|
|
<app-input [ngModel]="page.seo?.canonical || ''" (ngModelChange)="updateSeo(page.id, { canonical: $event })" />
|
|
|
|
|
</app-form-field>
|
|
|
|
|
<app-form-field [label]="'builder.seoOgTitle' | translate">
|
|
|
|
|
<app-input [ngModel]="page.seo?.ogTitle || ''" (ngModelChange)="updateSeo(page.id, { ogTitle: $event })" />
|
|
|
|
|
</app-form-field>
|
|
|
|
|
<app-form-field [label]="'builder.seoOgDescription' | translate">
|
|
|
|
|
<app-input [ngModel]="page.seo?.ogDescription || ''" (ngModelChange)="updateSeo(page.id, { ogDescription: $event })" />
|
|
|
|
|
</app-form-field>
|
|
|
|
|
<app-form-field [label]="'builder.seoOgImage' | translate">
|
|
|
|
|
<app-input [ngModel]="page.seo?.ogImage || ''" (ngModelChange)="updateSeo(page.id, { ogImage: $event })" />
|
|
|
|
|
</app-form-field>
|
feat(static-pages): CRUD completion + search/filter/bulk actions
Milestone 2 of the Static Pages Module sprint.
- StaticPagesEditorComponent: duplicate page, confirm-before-delete/bulk-
delete (matches the resetDraft confirm pattern), route/enabled/customTemplate/
media(hero/thumbnail/gallery) fields wired into the card, per-page publish/
unpublish action, status + duplicate-route/invalid-html/invalid-seo badges.
- Search (id/slug/route/title across all locales), filter by status
(draft/published) and by locale (hides pages missing a translation for the
selected locale) - all local computed() filters, no new service.
- Bulk selection (per-row + select-all-visible checkboxes) with bulk delete/
enable/disable/publish/unpublish, one updateBootstrap() call each.
- Correctness note: introduced `allPages` (unfiltered) vs `pages` (filtered
view) computeds. Every mutation (create/duplicate/delete/move/bulk) reads
from allPages(), never the filtered pages() - reading from the filtered
view would have silently deleted whatever an active search/filter hid on
the next persist(). Documented inline on persist() as a guardrail for
future edits.
- Fixed a template compile error found by the build gate: Angular templates
don't support inline arrow functions in binding expressions
((ngModelChange)="...map(v => v.trim())..." failed to parse) - moved the
gallery CSV-parsing into a component method (updateGallery).
- SEO robots field added to the page card (validated against a known-token
set from M1).
- i18n: staticPages.* extended (search/filter/bulk/route/enabled/status/
media/robots/disabled labels) across the 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>
2026-07-17 09:55:21 +04:00
|
|
|
<app-form-field [label]="'staticPages.seoRobotsLabel' | translate" [error]="hasInvalidSeo(page) ? ('staticPages.invalidSeo' | translate) : null">
|
|
|
|
|
<app-input [ngModel]="page.seo?.robots || ''" (ngModelChange)="updateSeo(page.id, { robots: $event })" placeholder="index,follow" />
|
|
|
|
|
</app-form-field>
|
2026-07-15 04:11:18 +04:00
|
|
|
</div>
|
feat(content-management): adopt Design System primitives in Static Pages editor
Replace raw button/input elements with app-button, app-input, app-card,
app-form-field, app-badge, app-empty-state across the static pages CMS editor.
Checkboxes left native (no checkbox primitive built yet).
Also fix pre-existing bug in ContentPageService.normalizePages: iterating
Object.values(config) lost the record key, so legacy-shaped bootstrap entries
without explicit id/slug fields (e.g. mock bootstrap.json's about-us,
privacy-policy, terms-of-service) crashed normalizeSlug(undefined). Now
falls back to the record key for id/slug/title.
Verified in browser at /edit/static-pages: renders correctly, primitives
styled per tenant CSS vars, no console errors after fix.
2026-07-15 04:01:13 +04:00
|
|
|
</div>
|
|
|
|
|
</app-card>
|
2026-07-10 13:52:01 +04:00
|
|
|
}
|
|
|
|
|
</div>
|
2026-07-17 10:05:50 +04:00
|
|
|
<app-media-picker [open]="mediaPickerOpen" (selected)="onImagePicked($event)" (closed)="mediaPickerOpen = false" />
|
2026-07-10 13:52:01 +04:00
|
|
|
</section>
|