feat(admin): build shared admin shell

Sidebar (Dashboard/Catalog group/Products/Categories/Orders/Transactions/
Reviews/Reports/Content/Media/Marketplace Builder/Users/Settings/
Monitoring/Analytics + Documentation/Help/Logout), sticky topbar
(breadcrumbs, page title/description, search, notifications, tenant
selector and quick-publish placeholders, current user), reserved
right-rail slot, scrollable content area. Desktop 280px sidebar, tablet
icon rail, mobile drawer with focus management and Escape-to-close.

Nav items without a built page (Reviews, Reports, Settings, Docs, Help)
render disabled with a coming-soon badge instead of dead links; Content
and Marketplace Builder route to the existing project-editor pages
(static-pages / general) rather than duplicating them.

All 15 /backoffice/** routes now render through AdminLayoutComponent;
the public storefront header/back-button/footer no longer render on
admin routes (app.ts/app.html gate on a new isAdminRoute signal).

Added the adminShell i18n namespace (ru/en/hy) for every new shell
string so this doesn't add to the existing untranslated-admin-UI gap
tracked in KNOWN-ISSUES.md.

Colors/type sizes follow DESIGN.md tokens; the two rgba() modal-scrim
values are a documented, intentional exception (neutral overlay,
not a themed token).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
sdarbinyan
2026-07-18 00:12:19 +04:00
parent 6be3c5892d
commit eb7b5c996d
12 changed files with 1384 additions and 15 deletions

View File

@@ -960,4 +960,61 @@ export const en: Translations = {
topProductsEmptyTitle: 'No product sales in this period',
topProductsEmptyDescription: 'Try a wider date range.',
},
adminShell: {
skipToContent: 'Skip to content',
openSidebar: 'Open menu',
closeSidebar: 'Close menu',
collapseSidebar: 'Collapse menu',
expandSidebar: 'Expand menu',
nav: {
dashboard: 'Dashboard',
catalogGroup: 'Catalog',
products: 'Products',
categories: 'Categories',
orders: 'Orders',
transactions: 'Transactions',
reviews: 'Reviews',
reports: 'Reports',
content: 'Content',
mediaLibrary: 'Media Library',
marketplaceBuilder: 'Marketplace Builder',
users: 'Users',
settings: 'Settings',
monitoring: 'Monitoring',
analytics: 'Analytics',
documentation: 'Documentation',
help: 'Help',
logout: 'Log out',
comingSoonBadge: 'Soon',
},
topbar: {
searchLabel: 'Search the admin panel',
searchPlaceholder: 'Search products, orders, pages...',
notifications: 'Notifications',
notificationsEmpty: 'No new notifications',
account: 'Admin account',
tenantSelector: 'Store',
tenantSelectorComingSoon: 'Switching between stores is coming soon',
quickPublish: 'Publish',
quickPublishComingSoon: 'Quick publish is coming soon',
},
breadcrumbHome: 'Admin',
pages: {
dashboard: { title: 'Dashboard', description: 'An overview of your marketplace' },
products: { title: 'Products', description: 'Manage product listings and their visibility' },
productCreate: { title: 'New product', description: 'Fill in the details to add a product to the catalog' },
productEdit: { title: 'Edit product', description: 'Change this product\'s details' },
productDuplicate: { title: 'Duplicate product', description: 'Create a new product based on an existing one' },
categories: { title: 'Categories', description: 'Build your catalog\'s category tree' },
categoryCreate: { title: 'New category', description: 'Add a category to the catalog tree' },
categoryEdit: { title: 'Edit category', description: 'Change this category\'s details' },
orders: { title: 'Orders', description: 'View and process customer orders' },
orderDetail: { title: 'Order', description: 'Order details and status' },
transactions: { title: 'Transactions', description: 'Payments, refunds, and fraud review' },
media: { title: 'Media Library', description: 'Images and files for products and pages' },
users: { title: 'Users', description: 'Admin team members and permissions' },
monitoring: { title: 'Monitoring', description: 'Queue, webhook, and system event status' },
analytics: { title: 'Analytics', description: 'Sales, products, and shopper behavior' },
},
},
};

View File

@@ -955,4 +955,61 @@ export const hy: Translations = {
topProductsEmptyTitle: 'Այս ժամանակահատվածում ապրանքների վաճառք չկա',
topProductsEmptyDescription: 'Փորձեք ընտրել ավելի լայն ամսաթվերի միջակայք։',
},
adminShell: {
skipToContent: 'Անցնել բովանդակությանը',
openSidebar: 'Բացել ընտրացանկը',
closeSidebar: 'Փակել ընտրացանկը',
collapseSidebar: 'Ծալել ընտրացանկը',
expandSidebar: 'Ընդարձակել ընտրացանկը',
nav: {
dashboard: 'Կառավարման վահանակ',
catalogGroup: 'Կատալոգ',
products: 'Ապրանքներ',
categories: 'Կատեգորիաներ',
orders: 'Պատվերներ',
transactions: 'Գործարքներ',
reviews: 'Կարծիքներ',
reports: 'Հաշվետվություններ',
content: 'Բովանդակություն',
mediaLibrary: 'Մեդիադարան',
marketplaceBuilder: 'Մարկետփլեյսի կոնստրուկտոր',
users: 'Օգտատերեր',
settings: 'Կարգավորումներ',
monitoring: 'Մոնիտորինգ',
analytics: 'Վերլուծություն',
documentation: 'Փաստաթղթեր',
help: 'Օգնություն',
logout: 'Ելք',
comingSoonBadge: 'Շուտով',
},
topbar: {
searchLabel: 'Որոնում ադմին վահանակում',
searchPlaceholder: 'Փնտրել ապրանքներ, պատվերներ, էջեր...',
notifications: 'Ծանուցումներ',
notificationsEmpty: 'Նոր ծանուցումներ չկան',
account: 'Ադմինիստրատորի հաշիվ',
tenantSelector: 'Խանութ',
tenantSelectorComingSoon: 'Խանութների միջև անցումը շուտով կհասանելի լինի',
quickPublish: 'Հրապարակել',
quickPublishComingSoon: 'Արագ հրապարակումը շուտով կհասանելի լինի',
},
breadcrumbHome: 'Ադմին վահանակ',
pages: {
dashboard: { title: 'Կառավարման վահանակ', description: 'Ձեր մարկետփլեյսի ընդհանուր վիճակը' },
products: { title: 'Ապրանքներ', description: 'Կառավարեք ապրանքների քարտերը և տեսանելիությունը' },
productCreate: { title: 'Նոր ապրանք', description: 'Լրացրեք տվյալները՝ կատալոգում ապրանք ավելացնելու համար' },
productEdit: { title: 'Ապրանքի խմբագրում', description: 'Փոփոխեք ապրանքի տվյալները' },
productDuplicate: { title: 'Ապրանքի կրկնօրինակ', description: 'Ստեղծեք նոր ապրանք առկա ապրանքի հիման վրա' },
categories: { title: 'Կատեգորիաներ', description: 'Կառուցեք կատալոգի կատեգորիաների ծառը' },
categoryCreate: { title: 'Նոր կատեգորիա', description: 'Ավելացրեք կատեգորիա կատալոգի ծառում' },
categoryEdit: { title: 'Կատեգորիայի խմբագրում', description: 'Փոփոխեք կատեգորիայի տվյալները' },
orders: { title: 'Պատվերներ', description: 'Դիտեք և մշակեք գնորդների պատվերները' },
orderDetail: { title: 'Պատվեր', description: 'Պատվերի մանրամասներն ու կարգավիճակը' },
transactions: { title: 'Գործարքներ', description: 'Վճարումներ, վերադարձներ և կեղծիքի ստուգում' },
media: { title: 'Մեդիադարան', description: 'Ապրանքների և էջերի պատկերներ ու ֆայլեր' },
users: { title: 'Օգտատերեր', description: 'Ադմինիստրատորների թիմը և իրավունքները' },
monitoring: { title: 'Մոնիտորինգ', description: 'Հերթերի, webhook-ների և համակարգային իրադարձությունների վիճակը' },
analytics: { title: 'Վերլուծություն', description: 'Վաճառքներ, ապրանքներ և գնորդների վարքագիծ' },
},
},
};

View File

@@ -955,4 +955,61 @@ export const ru: Translations = {
topProductsEmptyTitle: 'Нет продаж товаров за этот период',
topProductsEmptyDescription: 'Попробуйте выбрать более широкий диапазон дат.',
},
adminShell: {
skipToContent: 'Перейти к содержимому',
openSidebar: 'Открыть меню',
closeSidebar: 'Закрыть меню',
collapseSidebar: 'Свернуть меню',
expandSidebar: 'Развернуть меню',
nav: {
dashboard: 'Панель управления',
catalogGroup: 'Каталог',
products: 'Товары',
categories: 'Категории',
orders: 'Заказы',
transactions: 'Транзакции',
reviews: 'Отзывы',
reports: 'Отчёты',
content: 'Контент',
mediaLibrary: 'Медиатека',
marketplaceBuilder: 'Конструктор маркетплейса',
users: 'Пользователи',
settings: 'Настройки',
monitoring: 'Мониторинг',
analytics: 'Аналитика',
documentation: 'Документация',
help: 'Помощь',
logout: 'Выйти',
comingSoonBadge: 'Скоро',
},
topbar: {
searchLabel: 'Поиск по админ-панели',
searchPlaceholder: 'Искать товары, заказы, страницы...',
notifications: 'Уведомления',
notificationsEmpty: 'Новых уведомлений нет',
account: 'Аккаунт администратора',
tenantSelector: 'Магазин',
tenantSelectorComingSoon: 'Переключение между магазинами скоро появится',
quickPublish: 'Опубликовать',
quickPublishComingSoon: 'Быстрая публикация скоро появится',
},
breadcrumbHome: 'Админ-панель',
pages: {
dashboard: { title: 'Панель управления', description: 'Обзор состояния вашего маркетплейса' },
products: { title: 'Товары', description: 'Управляйте карточками товаров и их видимостью' },
productCreate: { title: 'Новый товар', description: 'Заполните карточку, чтобы добавить товар в каталог' },
productEdit: { title: 'Редактирование товара', description: 'Измените данные товара' },
productDuplicate: { title: 'Копия товара', description: 'Создайте новый товар на основе существующего' },
categories: { title: 'Категории', description: 'Постройте дерево категорий каталога' },
categoryCreate: { title: 'Новая категория', description: 'Добавьте категорию в дерево каталога' },
categoryEdit: { title: 'Редактирование категории', description: 'Измените данные категории' },
orders: { title: 'Заказы', description: 'Просматривайте и обрабатывайте заказы покупателей' },
orderDetail: { title: 'Заказ', description: 'Детали и статус заказа' },
transactions: { title: 'Транзакции', description: 'Платежи, возвраты и проверка мошенничества' },
media: { title: 'Медиатека', description: 'Изображения и файлы для товаров и страниц' },
users: { title: 'Пользователи', description: 'Команда администраторов и права доступа' },
monitoring: { title: 'Мониторинг', description: 'Состояние очередей, вебхуков и системных событий' },
analytics: { title: 'Аналитика', description: 'Продажи, товары и поведение покупателей' },
},
},
};

View File

@@ -967,4 +967,61 @@ export interface Translations {
topProductsEmptyTitle: string;
topProductsEmptyDescription: string;
};
adminShell: {
skipToContent: string;
openSidebar: string;
closeSidebar: string;
collapseSidebar: string;
expandSidebar: string;
nav: {
dashboard: string;
catalogGroup: string;
products: string;
categories: string;
orders: string;
transactions: string;
reviews: string;
reports: string;
content: string;
mediaLibrary: string;
marketplaceBuilder: string;
users: string;
settings: string;
monitoring: string;
analytics: string;
documentation: string;
help: string;
logout: string;
comingSoonBadge: string;
};
topbar: {
searchLabel: string;
searchPlaceholder: string;
notifications: string;
notificationsEmpty: string;
account: string;
tenantSelector: string;
tenantSelectorComingSoon: string;
quickPublish: string;
quickPublishComingSoon: string;
};
breadcrumbHome: string;
pages: {
dashboard: { title: string; description: string };
products: { title: string; description: string };
productCreate: { title: string; description: string };
productEdit: { title: string; description: string };
productDuplicate: { title: string; description: string };
categories: { title: string; description: string };
categoryCreate: { title: string; description: string };
categoryEdit: { title: string; description: string };
orders: { title: string; description: string };
orderDetail: { title: string; description: string };
transactions: { title: string; description: string };
media: { title: string; description: string };
users: { title: string; description: string };
monitoring: { title: string; description: string };
analytics: { title: string; description: string };
};
};
}