feat: Add console announcements and FAQ management system

- Add SettingsAnnouncements component with full CRUD operations for system announcements
  * Support multiple announcement types (default, ongoing, success, warning, error)
  * Include publish date, content, type classification and additional notes
  * Implement batch operations and pagination for better data management
  * Add real-time preview with relative time display and date formatting

- Add SettingsFAQ component for comprehensive FAQ management
  * Support question-answer pairs with rich text content
  * Include full editing, deletion and creation capabilities
  * Implement batch delete operations and paginated display
  * Add validation for complete Q&A information

- Integrate announcement and FAQ modules into DashboardSetting
  * Add unified configuration interface in admin console
  * Implement auto-refresh functionality for real-time updates
  * Add loading states and error handling for better UX

- Enhance backend API support in controller and setting modules
  * Add validation functions for console settings
  * Include time and sorting utilities for announcement management
  * Extend API endpoints for announcement and FAQ data persistence

- Improve frontend infrastructure
  * Add new translation keys for internationalization support
  * Update utility functions for date/time formatting
  * Enhance CSS styles for better component presentation
  * Add icons and visual improvements for announcements and FAQ sections

This implementation provides administrators with comprehensive tools to manage
system-wide announcements and user FAQ content through an intuitive console interface.
This commit is contained in:
Apple\Apple
2025-06-10 20:10:07 +08:00
parent 56188c33b5
commit 26b70d6a25
11 changed files with 1487 additions and 36 deletions

View File

@@ -510,7 +510,7 @@
"此项可选,输入镜像站地址,格式为:": "This is optional, enter the mirror site address, the format is:",
"模型映射": "Model mapping",
"请输入默认 API 版本例如2023-03-15-preview该配置可以被实际的请求查询参数所覆盖": "Please enter the default API version, for example: 2023-03-15-preview, this configuration can be overridden by the actual request query parameters",
"默认": "default",
"默认": "Default",
"图片演示": "Image demo",
"注意系统请求的时模型名称中的点会被剔除例如gpt-4.1会请求为gpt-41所以在Azure部署的时候部署模型名称需要手动改为gpt-41": "Note that the dot in the model name requested by the system will be removed, for example: gpt-4.1 will be requested as gpt-41, so when deploying on Azure, the deployment model name needs to be manually changed to gpt-41",
"2025年5月10日后添加的渠道不需要再在部署的时候移除模型名称中的\".\"": "After May 10, 2025, channels added do not need to remove the dot in the model name during deployment",
@@ -882,7 +882,7 @@
"线路监控": "line monitoring",
"查看全部": "View all",
"高延迟": "high latency",
"异常": "abnormal",
"异常": "Abnormal",
"的未命名令牌": "unnamed token",
"令牌更新成功!": "Token updated successfully!",
"(origin) Discord原链接": "(origin) Discord original link",
@@ -1584,14 +1584,13 @@
"模型数据分析": "Model Data Analysis",
"搜索无结果": "No results found",
"仪表盘配置": "Dashboard Configuration",
"API信息管理可以配置多个API地址用于状态展示和负载均衡": "API information management, you can configure multiple API addresses for status display and load balancing",
"API信息管理可以配置多个API地址用于状态展示和负载均衡最多50个": "API information management, you can configure multiple API addresses for status display and load balancing (maximum 50)",
"线路描述": "Route description",
"颜色": "Color",
"标识颜色": "Identifier color",
"添加API": "Add API",
"保存配置": "Save Configuration",
"API信息": "API Information",
"暂无API信息配置": "No API information configured",
"暂无API信息": "No API information",
"请输入API地址": "Please enter the API address",
"请输入线路描述": "Please enter the route description",
@@ -1599,6 +1598,36 @@
"请输入说明": "Please enter the description",
"如:香港线路": "e.g. Hong Kong line",
"请联系管理员在系统设置中配置API信息": "Please contact the administrator to configure API information in the system settings.",
"请联系管理员在系统设置中配置公告信息": "Please contact the administrator to configure notice information in the system settings.",
"请联系管理员在系统设置中配置常见问答": "Please contact the administrator to configure FAQ information in the system settings.",
"确定要删除此API信息吗": "Are you sure you want to delete this API information?",
"测速": "Speed Test"
"测速": "Speed Test",
"批量删除": "Batch Delete",
"常见问答": "FAQ",
"进行中": "Ongoing",
"警告": "Warning",
"添加公告": "Add Notice",
"编辑公告": "Edit Notice",
"公告内容": "Notice Content",
"请输入公告内容": "Please enter the notice content",
"发布日期": "Publish Date",
"请选择发布日期": "Please select the publish date",
"发布时间": "Publish Time",
"公告类型": "Notice Type",
"说明信息": "Description",
"可选,公告的补充说明": "Optional, additional information for the notice",
"确定要删除此公告吗?": "Are you sure you want to delete this notice?",
"系统公告管理,可以发布系统通知和重要消息": "System notice management, you can publish system notices and important messages",
"暂无系统公告": "No system notice",
"添加问答": "Add FAQ",
"编辑问答": "Edit FAQ",
"问题标题": "Question Title",
"请输入问题标题": "Please enter the question title",
"回答内容": "Answer Content",
"请输入回答内容": "Please enter the answer content",
"确定要删除此问答吗?": "Are you sure you want to delete this FAQ?",
"系统公告管理可以发布系统通知和重要消息最多100个前端显示最新20条": "System notice management, you can publish system notices and important messages (maximum 100, display latest 20 on the front end)",
"常见问答管理为用户提供常见问题的答案最多50个前端显示最新20条": "FAQ management, providing answers to common questions for users (maximum 50, display latest 20 on the front end)",
"暂无常见问答": "No FAQ",
"显示最新20条": "Display latest 20"
}