v1.3.13: 模块化注册架构 + PDS流程设计套件更名 + 依赖/圆周交互修复
- 模块化:EdcModule 契约 + registry + 模块独立目录;发布包增加 modules/registry.json - 更名:PDS流程设计套件 / ProcessDesignSuite;同步构建、发布脚本与文档 - 时序图:依赖偏移以时间显示/编辑;紧贴依赖隐藏箭头并在接缝显示标签;动作条磁吸 - 圆周:依赖标签沿圆弧方向、环间空隙;动作旋转磁吸增强;短弧标签优先动作名 - 清理:release 移至源码同级(本地不入库);tool 合并到 tools;发布说明迁移 docs/release-notes
This commit is contained in:
+13
-11
@@ -14,7 +14,7 @@ import 'package:flutter/services.dart';
|
||||
|
||||
import 'license/license_service.dart';
|
||||
import 'model/models.dart';
|
||||
import 'modules/module_registry.dart';
|
||||
import 'modules/registry.dart';
|
||||
import 'persistence/app_paths.dart';
|
||||
import 'persistence/storage.dart';
|
||||
import 'state/app_controller.dart';
|
||||
@@ -32,6 +32,7 @@ Future<void> main() async {
|
||||
await SystemChrome.setEnabledSystemUIMode(SystemUiMode.edgeToEdge);
|
||||
}
|
||||
await Storage.instance.init();
|
||||
await initModuleRegistry();
|
||||
runApp(const SequenceDiagramApp());
|
||||
}
|
||||
|
||||
@@ -87,18 +88,19 @@ class _SequenceDiagramAppState extends State<SequenceDiagramApp> {
|
||||
/// 更新原生窗口标题为「模块名 - <文件名 | 未命名文件>」,
|
||||
/// 有未保存修改时追加 ` *`。
|
||||
void _updateWindowTitle() {
|
||||
final String name = _controller.currentFilePath == null
|
||||
? '未命名文件'
|
||||
: _controller.currentFilePath!.split(RegExp(r'[\\/]')).last;
|
||||
final String dirty = _controller.dirty ? ' *' : '';
|
||||
// 标题走模块注册表(首页显示品牌名,不带文件名)。
|
||||
if (_controller.appMode == AppMode.home) {
|
||||
// 标题走模块注册表:文件路径也由当前模块提供,新增模块无需改这里。
|
||||
if (_controller.isHome) {
|
||||
_windowChannel
|
||||
.invokeMethod<void>('setTitle', 'EDC易得')
|
||||
.invokeMethod<void>('setTitle', kBrandName)
|
||||
.catchError((Object _) {});
|
||||
return;
|
||||
}
|
||||
final String brand = appModeLabel(_controller.appMode);
|
||||
final EdcModule? module = moduleById(_controller.activeModuleId);
|
||||
final String? path = module?.filePath(_controller) ?? _controller.currentFilePath;
|
||||
final String name =
|
||||
path == null ? '未命名文件' : path.split(RegExp(r'[\\/]')).last;
|
||||
final String dirty = _controller.dirty ? ' *' : '';
|
||||
final String brand = moduleTitle(_controller.activeModuleId);
|
||||
_windowChannel
|
||||
.invokeMethod<void>('setTitle', '$brand - $name$dirty')
|
||||
.catchError((Object _) {});
|
||||
@@ -158,7 +160,7 @@ class _SequenceDiagramAppState extends State<SequenceDiagramApp> {
|
||||
// 恢复流程:choice == 1 走 .bak 备份,否则走自动快照;解码失败时静默忽略。
|
||||
// 当前快照仅为时序图文档:恢复前先切到对应模块(避免停留在首页看不到内容)。
|
||||
try {
|
||||
_controller.setAppMode(AppMode.sequence);
|
||||
_controller.setModuleId('sequence', status: '时序图设计');
|
||||
if (choice == 1 && info.bakContent != null) {
|
||||
_controller.loadProject(Project.decode(info.bakContent!), path: info.projectPath, dirty: true);
|
||||
} else {
|
||||
@@ -177,7 +179,7 @@ class _SequenceDiagramAppState extends State<SequenceDiagramApp> {
|
||||
builder: (BuildContext context, Widget? child) {
|
||||
final Tokens tokens = Tokens.of(_controller.brightness);
|
||||
return MaterialApp(
|
||||
title: 'EDC易得 · Easy Design Collection',
|
||||
title: 'PDS流程设计套件 · Process Design Suite',
|
||||
debugShowCheckedModeBanner: false,
|
||||
theme: buildTheme(tokens),
|
||||
// 固定文本缩放;系统栏图标随主题亮度自动切换(透明系统栏,
|
||||
|
||||
Reference in New Issue
Block a user