v1.3.13: 模块化注册架构 + PDS流程设计套件更名 + 依赖/圆周交互修复
- 模块化:EdcModule 契约 + registry + 模块独立目录;发布包增加 modules/registry.json - 更名:PDS流程设计套件 / ProcessDesignSuite;同步构建、发布脚本与文档 - 时序图:依赖偏移以时间显示/编辑;紧贴依赖隐藏箭头并在接缝显示标签;动作条磁吸 - 圆周:依赖标签沿圆弧方向、环间空隙;动作旋转磁吸增强;短弧标签优先动作名 - 清理:release 移至源码同级(本地不入库);tool 合并到 tools;发布说明迁移 docs/release-notes
This commit is contained in:
+24
-21
@@ -1,4 +1,4 @@
|
||||
/// 左上角品牌按钮 +「EDC易得」设计合集菜单。
|
||||
/// 左上角品牌按钮 +「PDS流程设计套件」品牌菜单。
|
||||
///
|
||||
/// 点开左上角 logo:菜单从 logo **下方**下拉展开(不遮挡 logo)。
|
||||
/// 菜单由模块注册表驱动:首页入口 + 已开放模块(可进入/新建)+
|
||||
@@ -11,11 +11,10 @@ import 'dart:math' as math;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../model/models.dart';
|
||||
import '../modules/module_registry.dart';
|
||||
import '../state/app_controller.dart';
|
||||
import '../theme/tokens.dart';
|
||||
import '../version.dart';
|
||||
import 'package:sequence_diagram/modules/registry.dart';
|
||||
import 'package:sequence_diagram/state/app_controller.dart';
|
||||
import 'package:sequence_diagram/theme/tokens.dart';
|
||||
import 'package:sequence_diagram/version.dart';
|
||||
import 'app_logo.dart';
|
||||
|
||||
/// 品牌按钮:logo + 当前模块名,点击在下方弹出合集菜单。
|
||||
@@ -41,10 +40,10 @@ class BrandMenuButton extends StatelessWidget {
|
||||
/// 紧凑布局(隐藏副标题)。
|
||||
final bool compact;
|
||||
|
||||
/// 当前模块名(首页显示「设计合集」)。
|
||||
/// 当前模块名(首页显示「流程设计套件」)。
|
||||
String get _label {
|
||||
final EdcModule? m = moduleOf(controller.appMode);
|
||||
return m == null ? '设计合集' : '${m.name}设计';
|
||||
final EdcModule? m = moduleById(controller.activeModuleId);
|
||||
return m == null ? '流程设计套件' : '${m.name}设计';
|
||||
}
|
||||
|
||||
/// 构建按钮。
|
||||
@@ -56,7 +55,7 @@ class BrandMenuButton extends StatelessWidget {
|
||||
final Tokens t = context.tok;
|
||||
final BorderRadius radius = BorderRadius.circular(10);
|
||||
return Tooltip(
|
||||
message: 'EDC易得:设计合集',
|
||||
message: 'PDS流程设计套件',
|
||||
child: Material(
|
||||
color: t.panel,
|
||||
borderRadius: radius,
|
||||
@@ -94,7 +93,7 @@ class BrandMenuButton extends StatelessWidget {
|
||||
),
|
||||
if (!compact)
|
||||
Text(
|
||||
'Easy Design Collection',
|
||||
'Process Design Suite',
|
||||
style: TextStyle(
|
||||
color: t.dim,
|
||||
fontSize: 9.5 * scale,
|
||||
@@ -211,8 +210,8 @@ class BrandMenuButton extends StatelessWidget {
|
||||
/// 菜单面板(品牌头部 + 首页 + 模块注册表 + 未开放模块 + 软件设置)。
|
||||
Widget _panel(BuildContext context) {
|
||||
final Tokens t = context.tok;
|
||||
final bool atHome = controller.appMode == AppMode.home;
|
||||
final String? curId = moduleOf(controller.appMode)?.id;
|
||||
final bool atHome = controller.isHome;
|
||||
final String? curId = moduleById(controller.activeModuleId)?.id;
|
||||
final double maxH = math.max(
|
||||
180,
|
||||
MediaQuery.sizeOf(context).height - 120,
|
||||
@@ -238,13 +237,17 @@ class BrandMenuButton extends StatelessWidget {
|
||||
padding: const EdgeInsets.fromLTRB(12, 6, 12, 8),
|
||||
child: Row(
|
||||
children: <Widget>[
|
||||
Text('EDC易得',
|
||||
style: TextStyle(
|
||||
color: t.text,
|
||||
fontSize: 12.5,
|
||||
fontWeight: FontWeight.w700,
|
||||
)),
|
||||
const Spacer(),
|
||||
Expanded(
|
||||
child: Text('PDS流程设计套件',
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: TextStyle(
|
||||
color: t.text,
|
||||
fontSize: 12.5,
|
||||
fontWeight: FontWeight.w700,
|
||||
)),
|
||||
),
|
||||
const SizedBox(width: 6),
|
||||
Text('v$kAppVersion',
|
||||
style: TextStyle(color: t.dim, fontSize: 10)),
|
||||
],
|
||||
@@ -257,7 +260,7 @@ class BrandMenuButton extends StatelessWidget {
|
||||
const SizedBox(height: 6),
|
||||
Divider(height: 1, thickness: 1, color: t.line),
|
||||
const SizedBox(height: 4),
|
||||
// 已开放模块(可通过「设计合集」进入并新建文档)。
|
||||
// 已开放模块(可通过「品牌菜单」进入并新建文档)。
|
||||
for (final EdcModule m in kModules)
|
||||
if (m.available) _item(context, m, current: curId == m.id),
|
||||
const SizedBox(height: 6),
|
||||
|
||||
Reference in New Issue
Block a user