mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
feat: FAQ pages — Q&A builder in admin, accordion view for users
Admin editor: - page_type selector: "Страница" / "FAQ" radio buttons - When FAQ: FaqBuilder component replaces TipTap editor - Question input + answer textarea per Q&A item - Add/remove items, up/down reorder buttons - Per-locale Q&A (stored as JSON array in content JSONB) - "Создать FAQ" button in list alongside "Создать страницу" - Filter tabs: Все / Страницы / FAQ - Page type badge on each row (accent for pages, amber for FAQ) Public view (InfoPageView): - Auto-detects page_type='faq' and renders FaqView component - Accordion with smooth height animation (300ms ease-in-out) - Search filter appears when >3 questions - DOMPurify sanitization on FAQ answers - Single-item expand (click to open/close) i18n: full FAQ keys for all 4 locales (questions, answers, search, counts, empty states, builder labels)
This commit is contained in:
@@ -3371,6 +3371,7 @@
|
||||
"title": "信息页面",
|
||||
"subtitle": "管理静态信息页面",
|
||||
"create": "创建页面",
|
||||
"createFaq": "创建FAQ",
|
||||
"edit": "编辑",
|
||||
"save": "保存",
|
||||
"saving": "保存中...",
|
||||
@@ -3382,6 +3383,7 @@
|
||||
"notFound": "页面未找到",
|
||||
"active": "已激活",
|
||||
"inactive": "未激活",
|
||||
"typePage": "页面",
|
||||
"localeLabel": "内容语言",
|
||||
"fields": {
|
||||
"slug": "URL标识",
|
||||
@@ -3389,7 +3391,34 @@
|
||||
"content": "内容",
|
||||
"isActive": "已激活",
|
||||
"sortOrder": "排序",
|
||||
"icon": "图标(表情)"
|
||||
"icon": "图标(表情)",
|
||||
"pageType": "页面类型"
|
||||
},
|
||||
"filter": {
|
||||
"all": "全部",
|
||||
"page": "页面",
|
||||
"faq": "FAQ"
|
||||
},
|
||||
"pageTypes": {
|
||||
"page": "页面",
|
||||
"faq": "FAQ"
|
||||
},
|
||||
"faq": {
|
||||
"questions": "问答",
|
||||
"questionsCount": "个问题",
|
||||
"noQuestions": "暂无问题。点击下方按钮添加。",
|
||||
"questionNumber": "问题 #{{n}}",
|
||||
"question": "问题",
|
||||
"answer": "答案",
|
||||
"questionPlaceholder": "输入问题...",
|
||||
"answerPlaceholder": "输入答案(支持HTML)...",
|
||||
"htmlHint": "支持HTML标记",
|
||||
"addQuestion": "添加问题",
|
||||
"removeQuestion": "删除问题",
|
||||
"moveUp": "上移",
|
||||
"moveDown": "下移",
|
||||
"searchPlaceholder": "搜索问题...",
|
||||
"noResults": "未找到结果"
|
||||
},
|
||||
"locales": {
|
||||
"ru": "俄语",
|
||||
|
||||
Reference in New Issue
Block a user