fix(app): Phase 1.1 紧急修复 — SyncEngine 接入 + authorId + catch 异常处理
- feat(sync): SyncEngine 接入 EditorPage, 保存时 enqueue + 网络恢复自动 trySync - fix(editor): authorId 从 AuthBloc 获取, 替代硬编码 'local' - fix(bloc): class_bloc/calendar/profile/parent catch(_).全部改为 debugPrint - feat(editor): 编辑器工具栏拆分 (brush_panel/tag_panel/text_format_bar/dot_grid_painter) - feat(editor): EditorBloc 扩展 + EditorPage 增强 - feat(search): SearchBloc 扩展搜索功能 - feat(home): HomeBloc/HomePage 增强 - feat(auth): LoginPage 增强 - feat(templates): TemplateGalleryPage 重构 - fix(web): 管理端班级/日记页面修复 - fix(server): comment_service + theme_handler 修复 - docs: 添加全链路审计报告和验证截图
This commit is contained in:
@@ -17,10 +17,10 @@ fn default_theme() -> ThemeResp {
|
||||
primary_color: None,
|
||||
logo_url: None,
|
||||
sidebar_style: None,
|
||||
brand_name: Some("HMS 健康管理平台".into()),
|
||||
brand_slogan: Some("新一代健康管理平台".into()),
|
||||
brand_features: Some("患者管理 · 健康监测 · 随访管理 · AI 智能分析".into()),
|
||||
brand_copyright: Some("HMS 健康管理平台 · ©汕头市智界科技有限公司".into()),
|
||||
brand_name: Some("暖记 Nuanji".into()),
|
||||
brand_slogan: Some("温暖治愈的手账日记".into()),
|
||||
brand_features: Some("手写日记 · 班级管理 · 成长追踪 · 互动点评".into()),
|
||||
brand_copyright: Some("© 暖记 Nuanji".into()),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,16 +127,16 @@ pub async fn get_public_brand() -> JsonResponse<ApiResponse<PublicBrandResp>> {
|
||||
JsonResponse(ApiResponse::ok(PublicBrandResp {
|
||||
brand_name: defaults
|
||||
.brand_name
|
||||
.unwrap_or_else(|| "HMS 健康管理平台".into()),
|
||||
.unwrap_or_else(|| "暖记 Nuanji".into()),
|
||||
brand_slogan: defaults
|
||||
.brand_slogan
|
||||
.unwrap_or_else(|| "新一代健康管理平台".into()),
|
||||
.unwrap_or_else(|| "温暖治愈的手账日记".into()),
|
||||
brand_features: defaults
|
||||
.brand_features
|
||||
.unwrap_or_else(|| "患者管理 · 健康监测 · 随访管理 · AI 智能分析".into()),
|
||||
.unwrap_or_else(|| "手写日记 · 班级管理 · 成长追踪 · 互动点评".into()),
|
||||
brand_copyright: defaults
|
||||
.brand_copyright
|
||||
.unwrap_or_else(|| "HMS 健康管理平台 · ©汕头市智界科技有限公司".into()),
|
||||
.unwrap_or_else(|| "© 暖记 Nuanji".into()),
|
||||
}))
|
||||
}
|
||||
|
||||
@@ -150,8 +150,8 @@ mod tests {
|
||||
assert!(theme.primary_color.is_none());
|
||||
assert!(theme.logo_url.is_none());
|
||||
assert!(theme.sidebar_style.is_none());
|
||||
assert_eq!(theme.brand_name, Some("HMS 健康管理平台".to_string()));
|
||||
assert_eq!(theme.brand_slogan, Some("新一代健康管理平台".to_string()));
|
||||
assert_eq!(theme.brand_name, Some("暖记 Nuanji".to_string()));
|
||||
assert_eq!(theme.brand_slogan, Some("温暖治愈的手账日记".to_string()));
|
||||
assert!(theme.brand_features.is_some());
|
||||
assert!(theme.brand_copyright.is_some());
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ use uuid::Uuid;
|
||||
use crate::dto::CommentResp;
|
||||
use crate::entity::{class_member, comment, journal_entry};
|
||||
use crate::error::{DiaryError, DiaryResult};
|
||||
use crate::service::content_safety_service::ContentSafetyService;
|
||||
use crate::service::notification_service::NotificationService;
|
||||
use erp_core::events::{DomainEvent, EventBus};
|
||||
|
||||
@@ -53,8 +54,8 @@ impl CommentService {
|
||||
return Err(DiaryError::Forbidden);
|
||||
}
|
||||
|
||||
// 3. 简单内容安全检查(基础敏感词过滤)
|
||||
if contains_sensitive_words(&content) {
|
||||
// 3. 内容安全检查(使用 ContentSafetyService)
|
||||
if !ContentSafetyService::is_safe(&content) {
|
||||
return Err(DiaryError::ContentSafetyViolation);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user