Add instructions management functionality and update related components
- Introduced new endpoints for managing instruction intros and tabs, allowing admins to create, update, and delete instructional content. - Enhanced the FactoryResetCommandHandler to include the seeding of instruction data during a factory reset. - Updated the database schema to include InstructionIntro and InstructionTab entities, with corresponding migrations. - Improved frontend routing and components to support the new instructions section, including a dedicated page for displaying instructions and tabs. - Enhanced API documentation to reflect the new instruction management features and their expected request/response formats. - Added localization support for the new instructions functionality in both Russian and English.
This commit is contained in:
@@ -117,6 +117,22 @@ export type NewsPostDto = {
|
||||
updatedAt: string | null
|
||||
}
|
||||
|
||||
export type InstructionIntroDto = {
|
||||
id: string
|
||||
body: string
|
||||
updatedAt: string
|
||||
}
|
||||
|
||||
/** Один DTO на пользовательскую страницу и админку — у вкладки нет полей, скрытых от юзера. */
|
||||
export type InstructionTabDto = {
|
||||
id: string
|
||||
title: string
|
||||
body: string
|
||||
sortOrder: number
|
||||
createdAt: string
|
||||
updatedAt: string | null
|
||||
}
|
||||
|
||||
export type LinkTokenResponse = {
|
||||
deepLink: string | null
|
||||
expiresAt: string
|
||||
|
||||
@@ -102,10 +102,6 @@ const resources = {
|
||||
|
||||
instructions: {
|
||||
title: 'Инструкции по подключению',
|
||||
intro: 'Как подключиться за три шага — на любом устройстве.',
|
||||
step1: 'Установите приложение для вашей ОС из списка ниже.',
|
||||
step2: 'На странице «Мои конфиги» скопируйте ссылку или откройте QR-код нужного конфига.',
|
||||
step3: 'Импортируйте ссылку или отсканируйте QR в приложении — готово.',
|
||||
appsTitle: 'Приложения',
|
||||
noApps: 'Каталог приложений пока пуст.',
|
||||
recommended: 'Рекомендуем',
|
||||
@@ -196,6 +192,7 @@ const resources = {
|
||||
roles: 'Роли',
|
||||
nodes: 'Ноды',
|
||||
apps: 'Приложения',
|
||||
instructions: 'Инструкции',
|
||||
news: 'Новости',
|
||||
support: 'Тикеты',
|
||||
audit: 'Аудит',
|
||||
@@ -319,6 +316,20 @@ const resources = {
|
||||
deleted: 'Приложение удалено.',
|
||||
confirmDelete: 'Удалить приложение из каталога?',
|
||||
},
|
||||
instructions: {
|
||||
introTitle: 'Основная инструкция',
|
||||
introHint: 'Показывается над вкладками на странице «Инструкции» (Markdown).',
|
||||
introSaved: 'Инструкция сохранена.',
|
||||
tabsTitle: 'Дополнительные вкладки',
|
||||
tabsEmpty: 'Дополнительных вкладок пока нет.',
|
||||
createTab: 'Добавить вкладку',
|
||||
tabTitle: 'Название вкладки',
|
||||
tabBody: 'Текст (Markdown)',
|
||||
tabCreated: 'Вкладка добавлена.',
|
||||
tabUpdated: 'Вкладка обновлена.',
|
||||
tabDeleted: 'Вкладка удалена.',
|
||||
confirmDeleteTab: 'Удалить вкладку инструкций?',
|
||||
},
|
||||
news: {
|
||||
create: 'Добавить новость',
|
||||
title: 'Заголовок',
|
||||
@@ -509,10 +520,6 @@ const resources = {
|
||||
|
||||
instructions: {
|
||||
title: 'Connection instructions',
|
||||
intro: 'Get connected in three steps, on any device.',
|
||||
step1: 'Install the app for your OS from the list below.',
|
||||
step2: 'On the "My configs" page, copy the link or open the QR code for the config you want.',
|
||||
step3: 'Import the link or scan the QR code in the app — done.',
|
||||
appsTitle: 'Apps',
|
||||
noApps: 'The app catalog is empty right now.',
|
||||
recommended: 'Recommended',
|
||||
@@ -603,6 +610,7 @@ const resources = {
|
||||
roles: 'Roles',
|
||||
nodes: 'Nodes',
|
||||
apps: 'Apps',
|
||||
instructions: 'Instructions',
|
||||
news: 'News',
|
||||
support: 'Tickets',
|
||||
audit: 'Audit',
|
||||
@@ -726,6 +734,20 @@ const resources = {
|
||||
deleted: 'App deleted.',
|
||||
confirmDelete: 'Remove this app from the catalog?',
|
||||
},
|
||||
instructions: {
|
||||
introTitle: 'Main instruction',
|
||||
introHint: 'Shown above the tabs on the Instructions page (Markdown).',
|
||||
introSaved: 'Instruction saved.',
|
||||
tabsTitle: 'Additional tabs',
|
||||
tabsEmpty: 'No additional tabs yet.',
|
||||
createTab: 'Add tab',
|
||||
tabTitle: 'Tab title',
|
||||
tabBody: 'Body (Markdown)',
|
||||
tabCreated: 'Tab added.',
|
||||
tabUpdated: 'Tab updated.',
|
||||
tabDeleted: 'Tab deleted.',
|
||||
confirmDeleteTab: 'Delete this instruction tab?',
|
||||
},
|
||||
news: {
|
||||
create: 'Add post',
|
||||
title: 'Title',
|
||||
|
||||
Reference in New Issue
Block a user