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:
@@ -42,6 +42,10 @@ class JournalEntry {
|
||||
final bool isPrivate;
|
||||
final bool sharedToClass;
|
||||
final String? assignedTopicId;
|
||||
|
||||
/// 内容摘要 — 自动从文本元素提取,用于列表预览
|
||||
final String? contentExcerpt;
|
||||
|
||||
final int version;
|
||||
final DateTime createdAt;
|
||||
final DateTime updatedAt;
|
||||
@@ -58,6 +62,7 @@ class JournalEntry {
|
||||
this.isPrivate = true,
|
||||
this.sharedToClass = false,
|
||||
this.assignedTopicId,
|
||||
this.contentExcerpt,
|
||||
this.version = 1,
|
||||
required this.createdAt,
|
||||
required this.updatedAt,
|
||||
@@ -77,6 +82,8 @@ class JournalEntry {
|
||||
bool? sharedToClass,
|
||||
String? assignedTopicId,
|
||||
bool clearAssignedTopicId = false,
|
||||
String? contentExcerpt,
|
||||
bool clearContentExcerpt = false,
|
||||
int? version,
|
||||
DateTime? createdAt,
|
||||
DateTime? updatedAt,
|
||||
@@ -94,6 +101,9 @@ class JournalEntry {
|
||||
sharedToClass: sharedToClass ?? this.sharedToClass,
|
||||
assignedTopicId:
|
||||
clearAssignedTopicId ? null : (assignedTopicId ?? this.assignedTopicId),
|
||||
contentExcerpt: clearContentExcerpt
|
||||
? null
|
||||
: (contentExcerpt ?? this.contentExcerpt),
|
||||
version: version ?? this.version,
|
||||
createdAt: createdAt ?? this.createdAt,
|
||||
updatedAt: updatedAt ?? this.updatedAt,
|
||||
@@ -111,6 +121,7 @@ class JournalEntry {
|
||||
'is_private': isPrivate,
|
||||
'shared_to_class': sharedToClass,
|
||||
'assigned_topic_id': assignedTopicId,
|
||||
'content_excerpt': contentExcerpt,
|
||||
'version': version,
|
||||
'created_at': createdAt.toIso8601String(),
|
||||
'updated_at': updatedAt.toIso8601String(),
|
||||
@@ -134,6 +145,7 @@ class JournalEntry {
|
||||
isPrivate: (json['is_private'] as bool?) ?? true,
|
||||
sharedToClass: (json['shared_to_class'] as bool?) ?? false,
|
||||
assignedTopicId: json['assigned_topic_id'] as String?,
|
||||
contentExcerpt: json['content_excerpt'] as String?,
|
||||
version: (json['version'] as int?) ?? 1,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
|
||||
Reference in New Issue
Block a user