dsh-workbench-tasks 5.11.0 → 5.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/client.js CHANGED
@@ -13163,7 +13163,7 @@ var require_timeline_view = __commonJS({
13163
13163
  var TimelineView = require_timeline_view()({ React, COPY, injectCss, statusInfo, configClient, CFG_FALLBACK, TaskItem, EditModal, DoneModal, TimelineModal, CreateModal });
13164
13164
  host.registerAddon({
13165
13165
  id: "wb-addon-tasks",
13166
- version: "5.11.0",
13166
+ version: "5.12.1",
13167
13167
  icon: ICONS["list-checks"],
13168
13168
  // 贡献声明写在 registerAddon 里:卸载任务插件时宿主按 addonId 一起撤销,
13169
13169
  // 不会在邮件里留一个渲染即报错的孤儿按钮。
@@ -149,22 +149,22 @@ const ITEMS = [
149
149
  aliases: { recentPublish: "recent", recentDone: "recent", recentShutdown: "recent", trend: "eventTrend" },
150
150
  },
151
151
  {
152
- id: "stats.recentPublishLimit", group: "stats", type: "int", surface: "ui", apply: "mount", default: 10, min: 1, max: 50,
152
+ id: "stats.recentPublishLimit", condition: { dependent_config_key: "stats.sections", condition_value: "recent" }, group: "stats", type: "int", surface: "ui", apply: "mount", default: 10, min: 1, max: 50,
153
153
  zh: "最近发布条数", en: "Recently published rows",
154
154
  hintZh: "「最近发布」区块显示多少条(1–50)", hintEn: "Rows in Recently published (1–50)",
155
155
  },
156
156
  {
157
- id: "stats.recentDoneLimit", group: "stats", type: "int", surface: "ui", apply: "mount", default: 10, min: 1, max: 50,
157
+ id: "stats.recentDoneLimit", condition: { dependent_config_key: "stats.sections", condition_value: "recent" }, group: "stats", type: "int", surface: "ui", apply: "mount", default: 10, min: 1, max: 50,
158
158
  zh: "最近完成条数", en: "Recently completed rows",
159
159
  hintZh: "「最近完成」区块显示多少条(1–50)", hintEn: "Rows in Recently completed (1–50)",
160
160
  },
161
161
  {
162
- id: "stats.recentShutdownLimit", group: "stats", type: "int", surface: "ui", apply: "mount", default: 10, min: 1, max: 50,
162
+ id: "stats.recentShutdownLimit", condition: { dependent_config_key: "stats.sections", condition_value: "recent" }, group: "stats", type: "int", surface: "ui", apply: "mount", default: 10, min: 1, max: 50,
163
163
  zh: "最近关闭条数", en: "Recently closed rows",
164
164
  hintZh: "「最近关闭」区块显示多少条(1–50)", hintEn: "Rows in Recently closed (1–50)",
165
165
  },
166
166
  {
167
- id: "stats.recentClaimedLimit", group: "stats", type: "int", surface: "ui", apply: "mount", default: 10, min: 1, max: 50,
167
+ id: "stats.recentClaimedLimit", condition: { dependent_config_key: "stats.sections", condition_value: "recent" }, group: "stats", type: "int", surface: "ui", apply: "mount", default: 10, min: 1, max: 50,
168
168
  zh: "最近接取条数", en: "Recently claimed rows",
169
169
  hintZh: "「最近接取」页签显示多少条(1–50);只统计有真实接取时间的任务", hintEn: "Rows in Recently claimed (1–50); only tasks with a real claim time",
170
170
  },
@@ -240,6 +240,9 @@ function declItem(item, index) {
240
240
  if (item.max !== undefined) out.max = item.max;
241
241
  if (ui.uiType === "slider") out.step = 1;
242
242
  if (item.values) out.options = optionsOf(item);
243
+ // 条件展示由宿主统一执行:声明里写依赖,页面不再逐处手写判断。
244
+ if (item.condition) out.condition = item.condition;
245
+
243
246
  return out;
244
247
  }
245
248
 
@@ -155,7 +155,7 @@ export function registerWorkspaceActions(api) {
155
155
  },
156
156
  render: function (r) {
157
157
  const lines = ['工作区 ' + r.total + ' 个(返回 ' + r.returned + ')'];
158
- for (const w of r.records) lines.push('- ' + (w.title || w.name || w.id) + ' · ' + w.taskCount + ' 个任务' + (w.dir ? ' · ' + w.dir : ''));
158
+ for (const w of r.records) lines.push('- ' + (w.title || w.name || w.id) + ' · ' + w.taskCount + ' 个任务' + (w.dir ? ' · ' + w.dir : '') + ' · id=' + w.id);
159
159
  return lines.join('\n');
160
160
  },
161
161
  });
@@ -211,7 +211,7 @@ export function registerWorkspaceActions(api) {
211
211
  },
212
212
  render: function (r) {
213
213
  if (!r.workspaces.length) return '任务 ' + r.taskId + ' 未关联工作区';
214
- return '任务 ' + r.taskId + ' 关联 ' + r.workspaces.length + ' 个工作区:' + r.workspaces.map((w) => w.title || w.name || w.id).join('、');
214
+ return '任务 ' + r.taskId + ' 关联 ' + r.workspaces.length + ' 个工作区:' + r.workspaces.map((w) => (w.title || w.name || w.id) + '(id=' + w.id + ')').join('、');
215
215
  },
216
216
  });
217
217
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-workbench-tasks",
3
- "version": "5.11.0",
3
+ "version": "5.12.1",
4
4
  "description": "个人工作台任务插件:任务树、优先级、截止日、时间线与重启",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -17,7 +17,7 @@
17
17
  "id": "wb-addon-tasks",
18
18
  "title": "任务",
19
19
  "description": "任务树 + 统计/记录/时间线/工作区四个视图:紧急/已关闭/已开启/已完成/总览,可按标签筛选,附统计报表;配置项由宿主统一配置中心渲染",
20
- "version": "5.11.0",
20
+ "version": "5.12.1",
21
21
  "minShell": "0.21.0",
22
22
  "tables": [
23
23
  "task",
@@ -91,7 +91,7 @@
91
91
  "./package.json": "./package.json"
92
92
  },
93
93
  "dependencies": {
94
- "dsh-workbench-host": "^0.21.1"
94
+ "dsh-workbench-host": "^0.24.1"
95
95
  },
96
96
  "dsh": {
97
97
  "bundle": {