refactor(admin): polish UX, consistency and overall quality
Admin isolation (Task 1): extended isAdminRoute to also match /edit - the Marketplace Builder no longer renders the storefront header/back- button/footer, matching the isolation the backoffice already had since Sprint 1. Verified no regression on /backoffice or real storefront routes (catalog still shows the storefront header). Added a 'back to dashboard' link on the Builder overview page, since removing the storefront header also removed the only way back to /backoffice from within the Builder. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -63,9 +63,10 @@ export class App implements OnInit {
|
||||
const url = navEnd.urlAfterRedirects || navEnd.url;
|
||||
// Home pages: /ru, /en, /hy (with or without trailing slash)
|
||||
this.isHomePage.set(/^\/[a-z]{2}\/?$/.test(url) || url === '/' || url === '');
|
||||
// Admin backoffice owns its own shell (AdminLayoutComponent) - the
|
||||
// storefront header/back-button/footer never render there.
|
||||
this.isAdminRoute.set(/^\/[a-z]{2}\/backoffice(\/|$|\?)/.test(url));
|
||||
// Admin backoffice and the Marketplace Builder (/edit) own their own
|
||||
// shells (AdminLayoutComponent / ProjectEditorPageComponent's sidebar) -
|
||||
// the storefront header/back-button/footer never render on either.
|
||||
this.isAdminRoute.set(/^\/[a-z]{2}\/(backoffice|edit)(\/|$|\?)/.test(url));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user