@zaclinley/dsh-mailharbor 0.22.0 → 0.22.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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.22.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 2a996e5: Hide empty recipient lines in the reader.
8
+
9
+ - Expanded conversation cards only render the 收件人/抄送 block when addresses
10
+ exist, and fall back to the loaded detail when the summary has none.
11
+ - The single-message reader no longer prints "收件人:—" either.
12
+
3
13
  ## 0.22.0
4
14
 
5
15
  ### Minor Changes
package/lib/client.js CHANGED
@@ -2410,10 +2410,10 @@ function Reader({
2410
2410
  (0, import_react8.createElement)(Icon, { name: detailOpen ? "chevronLeft" : "chevronRight", size: 12 })
2411
2411
  )
2412
2412
  ),
2413
- threaded || !detailOpen ? null : (0, import_react8.createElement)(
2413
+ threaded || !detailOpen || detail.to.length === 0 && detail.cc.length === 0 ? null : (0, import_react8.createElement)(
2414
2414
  "div",
2415
2415
  { className: "mailharbor-reader-recipients" },
2416
- (0, import_react8.createElement)("span", null, `\u6536\u4EF6\u4EBA\uFF1A${addressLine(detail.to) || "\u2014"}`),
2416
+ detail.to.length === 0 ? null : (0, import_react8.createElement)("span", null, `\u6536\u4EF6\u4EBA\uFF1A${addressLine(detail.to)}`),
2417
2417
  detail.cc.length === 0 ? null : (0, import_react8.createElement)("span", null, `\u6284\u9001\uFF1A${addressLine(detail.cc)}`)
2418
2418
  ),
2419
2419
  (0, import_react8.createElement)(
@@ -2534,6 +2534,8 @@ function Reader({
2534
2534
  const sentItem = isSentMailbox(mailbox) && item.to.length > 0;
2535
2535
  const who = sentItem ? item.to[0] ?? item.from : item.from;
2536
2536
  const selectedItem = item.id === detail.id;
2537
+ const toLine = addressLine(item.to) || (itemDetail === void 0 ? "" : addressLine(itemDetail.to));
2538
+ const ccLine = itemDetail === void 0 ? "" : addressLine(itemDetail.cc);
2537
2539
  return (0, import_react8.createElement)(
2538
2540
  "div",
2539
2541
  {
@@ -2568,11 +2570,11 @@ function Reader({
2568
2570
  expandedItem ? (0, import_react8.createElement)(
2569
2571
  "div",
2570
2572
  { className: "mailharbor-thread-body" },
2571
- (0, import_react8.createElement)(
2573
+ toLine === "" && ccLine === "" ? null : (0, import_react8.createElement)(
2572
2574
  "div",
2573
2575
  { className: "mailharbor-thread-recipients small muted" },
2574
- (0, import_react8.createElement)("span", null, `\u6536\u4EF6\u4EBA\uFF1A${addressLine(item.to) || "\u2014"}`),
2575
- itemDetail !== void 0 && itemDetail.cc.length > 0 ? (0, import_react8.createElement)("span", null, `\u6284\u9001\uFF1A${addressLine(itemDetail.cc)}`) : null
2576
+ toLine === "" ? null : (0, import_react8.createElement)("span", null, `\u6536\u4EF6\u4EBA\uFF1A${toLine}`),
2577
+ ccLine === "" ? null : (0, import_react8.createElement)("span", null, `\u6284\u9001\uFF1A${ccLine}`)
2576
2578
  ),
2577
2579
  itemDetail === void 0 ? (0, import_react8.createElement)(
2578
2580
  "div",
@@ -6368,7 +6370,7 @@ function TaskEditor({
6368
6370
  }
6369
6371
 
6370
6372
  // src/client/index.tsx
6371
- var VERSION = "0.22.0";
6373
+ var VERSION = "0.22.1";
6372
6374
  var inject = ["slots"];
6373
6375
  var PANEL_ID = "mailharbor";
6374
6376
  var TASKS_PANEL_ID = "mailharbor-tasks";