dsh-calendar 0.8.2 → 0.8.4

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,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.3(2026-09-21)
4
+
5
+ - 已知事件的修改、删除及创建后回读改为直接 CalDAV multiget,省掉整集合索引查询;每次仍读取最新 ETag,保留条件写入。
6
+ - 限定事件地址属于当前日历;无 calendar-data 的响应不会触发写入或删除。
7
+ - 新增真实 tsdav 请求回归,覆盖请求次数、ETag、取消与缺失事件;全量 161 项测试通过。更新中英文介绍,补齐已有的可视化面板与连接设置说明。
8
+
3
9
  ## 0.8.2(2026-09-20)
4
10
 
5
11
  - **修主题色误用**:此前把宿主遮罩 token `--dsw-alias-bg-mask-3` 当淡色 hover/底纹用;DSH 0.1.6-alpha.2 里它实测亮/暗主题都是 `rgba(0,0,0,.48)`,导致周视图「今天」整列、月视图格子 hover、加载骨架屏、详情 tag 全部发深灰(浏览器视觉验收抓到,视觉上像一块无字灰板)。现改为 `color-mix`(label-primary 5%~7% / business-primary 7%),mask-3 只保留在 `.dshc-overlay` / `.dshc-modalwrap` 两处真正的遮罩上。
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 stardustlc
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 stardustlc
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.en.md CHANGED
@@ -4,13 +4,17 @@
4
4
 
5
5
  [![Awesome DSH Plugin](https://awesome-dsh-plugin.com/badge.svg)](https://awesome-dsh-plugin.com)
6
6
 
7
- DSH community plugin: read/write calendar events via CalDAV. Provides 5 calendar tools (calendar_list / calendar_create / calendar_update / calendar_delete / calendar_search) plus the offline `calendar_health` configuration check. Google uses OAuth 2.0; iCloud / Nextcloud / custom servers retain Basic authentication by default. No settings-page UI; all configuration goes through the profile's cordis.patch.yml.
7
+ DSH community plugin: read/write calendar events via CalDAV. Provides 5 calendar tools (calendar_list / calendar_create / calendar_update / calendar_delete / calendar_search) plus the offline `calendar_health` configuration check. Google uses OAuth 2.0; iCloud / Nextcloud / custom servers retain Basic authentication by default. Includes visual week/month views, drag and keyboard rescheduling, connection settings and connection tests. Profile cordis.patch.yml configuration is also supported. Updates and deletes fetch the known event directly, avoiding a collection-wide index request.
8
8
 
9
9
  ## Compatibility
10
10
 
11
+ Version **0.8.4** (2026-09-23) supports the Web mount paths introduced in Harness **0.1.7**. The calendar panel keeps its requests under the application path when deployed through a reverse proxy, preserving normal settings and event operations. The current host baseline is official-source 0.1.7-alpha.2 with a local tool-scheduler fix; external CalDAV operations require their own account validation.
12
+
13
+ 2026-09-21: the current release package was installed through the official CLI in an isolated profile and co-loaded with the other two most-downloaded plugins on source-built Harness `0.1.6-alpha.2`. All 18 plugin tools registered; calendar/email configuration checks, PPT theme listing and 17-row table generation passed. The host is based on the official alpha.2 release plus the tool-scheduler `Symbol.for` fix (`93badd88`). This run did not connect to live mail or calendar services.
14
+
11
15
  Verified with official `@deepseek-ai/dsh@0.1.5-rc.1` and Node `24.16.0` on 2026-09-11: all 18 components load alongside Modlens, with passing tool-schema, skill-registration and offline read-only invocation checks. Uses the `cordis.patch.yml` + `dsh.bundle.patch` bundle model. Node requirements match this Harness release: 22.19 or later within 22.x, or 24 or later. Live external-service workflows require separate configuration and validation.
12
16
 
13
- On 2026-09-10, npm `dsh-calendar@0.5.2` passed installation through this Harness release's official CLI and registration of all 6 tools. Host execution of `calendar_list` refreshed a real Google token (200), read via CalDAV REPORT (207) and rendered model-facing results. Only Google reads were tested; no writes were performed. This patch does not change runtime code.
17
+ On 2026-09-10, npm `dsh-calendar@0.5.2` passed installation through this Harness release's official CLI and registration of all 6 tools. Host execution of `calendar_list` refreshed a real Google token (200), read via CalDAV REPORT (207) and rendered model-facing results. Only Google reads were tested; no writes were performed. This is a historical read-only verification record.
14
18
 
15
19
  Follows the official [plugin packaging and installation requirements](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/user/develop/basic/publish.md): an ESM entry point, prebuilt `lib/`, `dsh.bundle.patch` and a `cordis.patch.yml` layer. The plugin explicitly injects `tools` and supplies JSON Schema parameters, canonical output and rendering, with no runtime imports of `@deepseek-ai/*` internals. Use Node 22.19 or later within 22.x, or Node 24 or later. Harness is evolving rapidly; the version above is the tested baseline.
16
20
 
package/README.md CHANGED
@@ -9,13 +9,17 @@
9
9
  [![Awesome DSH Plugin](https://awesome-dsh-plugin.com/badge.svg)](https://awesome-dsh-plugin.com)
10
10
 
11
11
 
12
- DSH 社区插件:通过 CalDAV 读写日历事件。提供 5 个日历操作工具(calendar_list / calendar_create / calendar_update / calendar_delete / calendar_search)和 `calendar_health` 配置自检。Google 使用 OAuth 2.0;iCloud / Nextcloud / 自定义服务器默认保留 Basic 认证。不含设置页 UI,配置全部走 profile 的 cordis.patch.yml。
12
+ DSH 社区插件:通过 CalDAV 读写日历事件。提供 5 个日历操作工具(calendar_list / calendar_create / calendar_update / calendar_delete / calendar_search)和 `calendar_health` 配置自检。Google 使用 OAuth 2.0;iCloud / Nextcloud / 自定义服务器默认保留 Basic 认证。提供可视化周/月日历、拖拽与键盘改期、连接设置和连通性测试;也支持通过 profile 的 cordis.patch.yml 配置。已知事件的更新与删除直接读取该事件,减少一次整集合索引请求。
13
13
 
14
14
  ## 兼容性
15
15
 
16
+ **0.8.4(2026-09-23)**适配 Harness **0.1.7** 的 Web 子路径部署:日历面板的请求会跟随应用路径,修复经过反向代理访问时设置与事件操作失败的问题。当前验证宿主为官方源码构建的 0.1.7-alpha.2(含本地工具调度器修复);真实 CalDAV 业务仍需有效账号单独验证。
17
+
18
+ 2026-09-21:当前发布包经官方 CLI 安装到隔离 profile,在源码构建的 Harness `0.1.6-alpha.2` 上与另外两个下载量前三插件共同加载,18 个插件工具注册正常;日历/邮件配置自检、PPT 主题查询和 17 行表格生成通过。测试本体基于官方 alpha.2 发布提交,另含工具调度器 `Symbol.for` 修复(`93badd88`)。本轮未连接真实邮箱或日历服务。
19
+
16
20
  已在官方 `@deepseek-ai/dsh@0.1.5-rc.1`、Node `24.16.0` 上验证(2026-09-11):18 个组件与 Modlens 同载,工具 schema、技能注册及离线只读调用检查通过。采用 `cordis.patch.yml` + `dsh.bundle.patch` 组合包模型。Node 要求与该版本 Harness 一致:22.19 及以上的 22.x,或 24 及以上。外部服务的实际业务操作需按各组件配置单独验证。
17
21
 
18
- 2026-09-10,npm `dsh-calendar@0.5.2` 已通过该 Harness 的官方 CLI 安装和 6 个工具注册;经宿主执行 `calendar_list`,真实 Google 令牌刷新返回 200、CalDAV REPORT 返回 207,并生成模型可读结果。验证仅含 Google 读取,未执行写入;本次补丁不修改运行时代码。
22
+ 2026-09-10,npm `dsh-calendar@0.5.2` 已通过该 Harness 的官方 CLI 安装和 6 个工具注册;经宿主执行 `calendar_list`,真实 Google 令牌刷新返回 200、CalDAV REPORT 返回 207,并生成模型可读结果。验证仅含 Google 读取,未执行写入;这是历史只读验证记录。
19
23
 
20
24
  遵循官方[插件打包与安装要求](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/user/develop/basic/publish.md):ESM 入口、预构建 `lib/`、`dsh.bundle.patch` 和 `cordis.patch.yml` 配置层;显式注入 `tools`,提供 JSON Schema 参数、规范化输出和渲染函数,运行时不 import `@deepseek-ai/*` 内部模块。使用 Node 22.19 及以上的 22.x 或 Node 24 及以上版本;Harness 仍在快速迭代,上述版本是实测基线。
21
25
 
package/cordis.patch.yml CHANGED
@@ -1,23 +1,23 @@
1
- # dsh-calendar 组合包补丁:把日历工具插件行插入 profile。
2
- # 本补丁按 id 覆盖;用户应在自己 profile 的 cordis.patch.yml 里覆盖本行的整个
3
- # config(见 README 的配置示例)。配置缺失时插件仍会加载,但每个工具在调用时
4
- # 会抛出带中文指引的错误,提示补全配置后重启。
5
- #
6
- # 示例(用户 profile 的 cordis.patch.yml):
7
- # - id: calendar
8
- # name: 'dsh-calendar'
9
- # config:
10
- # provider: google # google | icloud | nextcloud | custom
11
- # calendarId: you@gmail.com # google:日历 ID(通常是你的邮箱地址)
12
- # # authMethod: oauth # google 默认 oauth,不接受 Basic/应用专用密码
13
- # # clientId: ... # 或 DSH_CALENDAR_CLIENT_ID
14
- # # clientSecret: ... # 推荐用环境变量 DSH_CALENDAR_CLIENT_SECRET
15
- # # refreshToken: ... # 推荐用环境变量 DSH_CALENDAR_REFRESH_TOKEN
16
- # # proxyUrl: http://127.0.0.1:7890 # 若需要,令牌刷新与 CalDAV 共用此代理
17
- # # iCloud/Nextcloud/custom 默认 Basic:配置 username 与 DSH_CALENDAR_PASSWORD
18
- #
19
- - insert:
20
- - id: calendar
21
- name: 'dsh-calendar'
22
- config:
23
- provider: custom
1
+ # dsh-calendar 组合包补丁:把日历工具插件行插入 profile。
2
+ # 本补丁按 id 覆盖;用户应在自己 profile 的 cordis.patch.yml 里覆盖本行的整个
3
+ # config(见 README 的配置示例)。配置缺失时插件仍会加载,但每个工具在调用时
4
+ # 会抛出带中文指引的错误,提示补全配置后重启。
5
+ #
6
+ # 示例(用户 profile 的 cordis.patch.yml):
7
+ # - id: calendar
8
+ # name: 'dsh-calendar'
9
+ # config:
10
+ # provider: google # google | icloud | nextcloud | custom
11
+ # calendarId: you@gmail.com # google:日历 ID(通常是你的邮箱地址)
12
+ # # authMethod: oauth # google 默认 oauth,不接受 Basic/应用专用密码
13
+ # # clientId: ... # 或 DSH_CALENDAR_CLIENT_ID
14
+ # # clientSecret: ... # 推荐用环境变量 DSH_CALENDAR_CLIENT_SECRET
15
+ # # refreshToken: ... # 推荐用环境变量 DSH_CALENDAR_REFRESH_TOKEN
16
+ # # proxyUrl: http://127.0.0.1:7890 # 若需要,令牌刷新与 CalDAV 共用此代理
17
+ # # iCloud/Nextcloud/custom 默认 Basic:配置 username 与 DSH_CALENDAR_PASSWORD
18
+ #
19
+ - insert:
20
+ - id: calendar
21
+ name: 'dsh-calendar'
22
+ config:
23
+ provider: custom
package/lib/caldav.js CHANGED
@@ -144,16 +144,35 @@ export class CalendarService {
144
144
  /** 按 uid(href)找到服务器对象(含 etag 与原始 data)。 */
145
145
  async findObject(uid, signal) {
146
146
  signal?.throwIfAborted();
147
+ // 直接 multiget 已知 href;先限制到当前集合,不能把任意 URL 当作事件。
148
+ let target;
149
+ try {
150
+ const collection = new URL(this.collectionUrl);
151
+ const object = new URL(uid.trim());
152
+ const relativePath = object.pathname.slice(collection.pathname.length);
153
+ const decodedPath = decodeURIComponent(relativePath);
154
+ if (object.origin !== collection.origin || object.username || object.password || object.hash
155
+ || !object.pathname.startsWith(collection.pathname) || !relativePath
156
+ || decodedPath.split(/[\\/]/).some(segment => segment === '.' || segment === '..')
157
+ || /%2f|%5c/i.test(relativePath))
158
+ throw new Error('invalid href');
159
+ target = normalizeUrl(object.href);
160
+ }
161
+ catch {
162
+ throw new CalDAVError('uid 必须是当前日历中的事件地址:请用 calendar_list 或 calendar_search 重新获取。');
163
+ }
147
164
  const client = await this.client();
148
165
  signal?.throwIfAborted();
149
- const target = normalizeUrl(uid);
150
166
  const objects = await client.fetchCalendarObjects({
151
167
  calendar: this.calendar(),
168
+ objectUrls: [target],
152
169
  urlFilter: (url) => normalizeUrl(url) === target,
153
170
  ...(signal !== undefined ? { fetchOptions: { signal } } : {}),
154
171
  });
155
172
  signal?.throwIfAborted();
156
- return objects.find((object) => normalizeUrl(object.url) === target);
173
+ // 207 中单个 href 的 404 也可能被 tsdav 转成无 data 的对象,不能据此 PUT/DELETE。
174
+ return objects.find((object) => normalizeUrl(object.url) === target
175
+ && typeof object.data === 'string' && object.data.trim() !== '');
157
176
  }
158
177
  /** 新建事件,返回带 href/uid 的事件。 */
159
178
  async create(fields, signal) {
package/lib/client.js CHANGED
@@ -13,7 +13,8 @@ const React = require("react");
13
13
  const { useState, useEffect, useMemo, useRef, useCallback } = React;
14
14
  const h = React.createElement;
15
15
 
16
- const ROUTE = "/_dsh/dsh-calendar/settings";
16
+ // Resolve against the Harness document base, including any reverse-proxy prefix.
17
+ const ROUTE = "_dsh/dsh-calendar/settings";
17
18
 
18
19
  /** 三视图;order 决定 tab 顺序。 */
19
20
  const VIEWS = ["month", "week", "agenda"];
@@ -149,7 +150,7 @@ const UI = {
149
150
  "action.demo": "查看示例", "action.exitDemo": "退出示例",
150
151
  "state.loading": "正在读取日历…", "state.empty": "这段时间没有日程。",
151
152
  "state.notConfigured": "还没配置 CalDAV 账号",
152
- "state.notConfiguredHint": "在 profile 的 cordis.patch.yml 里给 dsh-calendar 填上 provider / caldavUrl / username / password(或 OAuth 四件套)后重启即可。现在可以先看看示例面板。",
153
+ "state.notConfiguredHint": "点击“连接设置”,选择日历服务并填写账号信息,测试连接后保存即可。也可以先查看示例,了解日历的用法。",
153
154
  "state.readonly": "只读",
154
155
  "demo.banner": "示例数据(不是你的真实日历)—— 点右上角「退出示例」回到真实数据。",
155
156
  "field.summary": "标题", "field.date": "日期", "field.start": "开始", "field.end": "结束",
@@ -179,7 +180,7 @@ const UI = {
179
180
  "move.failed": "改期失败:{message}",
180
181
  "conn.button": "连接设置",
181
182
  "conn.title": "CalDAV 连接设置",
182
- "conn.intro": "填完点「测试连接」,通了才会保存。密码只存在本机(不进日志、不进导出)。",
183
+ "conn.intro": "测试连接不会修改日历。连接成功后,点击“保存并启用”。",
183
184
  "conn.provider": "服务商",
184
185
  "conn.caldavUrl": "日历集合 URL",
185
186
  "conn.username": "账号",
@@ -202,8 +203,8 @@ const UI = {
202
203
  "conn.okSample": "(例如:{sample})",
203
204
  "conn.fail": "连接失败",
204
205
  "conn.savedToast": "连接已保存,工具下一次调用就用它",
205
- "conn.noSettings": "当前宿主的 settings 服务不可用,面板不能保存:请在 profile 的 cordis.patch.yml 里配置 dsh-calendar 后重启。",
206
- "conn.storageFallback": "连接保存在插件自己的文件:~/.dsh/data/dsh-calendar/connection.json({reason},功能不受影响)。",
206
+ "conn.noSettings": "当前无法保存连接设置。请检查 DSH 与日历插件是否已更新,再重新打开此页面。",
207
+ "conn.storageFallback": "连接信息保存在运行 DSH 的设备上,保存后立即生效。",
207
208
  "conn.needProvider": "先选一个服务商",
208
209
  "conn.current": "当前:{summary}",
209
210
  "conn.steps": "怎么拿到这些值?(点开看步骤)",
@@ -244,7 +245,7 @@ const UI = {
244
245
  "action.demo": "See a sample", "action.exitDemo": "Exit sample",
245
246
  "state.loading": "Loading your calendar…", "state.empty": "Nothing scheduled in this range.",
246
247
  "state.notConfigured": "No CalDAV account configured yet",
247
- "state.notConfiguredHint": "Fill in provider / caldavUrl / username / password (or the four OAuth fields) for dsh-calendar in your profile's cordis.patch.yml and restart. Meanwhile you can look at a sample panel.",
248
+ "state.notConfiguredHint": "Open Connection settings, choose your calendar service and enter your account details, then test and save the connection. You can also explore the sample calendar first.",
248
249
  "state.readonly": "read-only",
249
250
  "demo.banner": "Sample data (not your real calendar) — hit「Exit sample」to go back.",
250
251
  "field.summary": "Title", "field.date": "Date", "field.start": "Start", "field.end": "End",
@@ -274,7 +275,7 @@ const UI = {
274
275
  "move.failed": "Could not reschedule: {message}",
275
276
  "conn.button": "Connection",
276
277
  "conn.title": "CalDAV connection",
277
- "conn.intro": "Fill this in and hit「Test connection」— nothing is saved until it works. The password stays on this machine only (no logs, no exports).",
278
+ "conn.intro": "Testing the connection does not change your calendar. Once it succeeds, click Save and enable.",
278
279
  "conn.provider": "Provider",
279
280
  "conn.caldavUrl": "Calendar collection URL",
280
281
  "conn.username": "Account",
@@ -297,8 +298,8 @@ const UI = {
297
298
  "conn.okSample": " (e.g. {sample})",
298
299
  "conn.fail": "Connection failed",
299
300
  "conn.savedToast": "Saved — the tools pick it up on their next call",
300
- "conn.noSettings": "This host has no settings service, so the panel cannot save: configure dsh-calendar in the profile's cordis.patch.yml and restart.",
301
- "conn.storageFallback": "Saved in the plugin's own file: ~/.dsh/data/dsh-calendar/connection.json ({reason}; nothing else changes).",
301
+ "conn.noSettings": "Connection settings cannot be saved right now. Check that DSH and the calendar plugin are up to date, then reopen this page.",
302
+ "conn.storageFallback": "Connection details are stored on the device running DSH. Saved changes take effect immediately.",
302
303
  "conn.needProvider": "Pick a provider first",
303
304
  "conn.current": "Now: {summary}",
304
305
  "conn.steps": "Where do these values come from?",
@@ -1455,7 +1456,7 @@ function ConnectionForm(props) {
1455
1456
  : null,
1456
1457
  h("div", { className: "dshc-field" }, [
1457
1458
  h("label", null, t("conn.provider")),
1458
- h("select", { className: "dshc-input", value: form.provider, onChange: (e) => patch({ provider: e.target.value }) },
1459
+ h("select", { className: "dshc-input", "aria-label": t("conn.provider"), value: form.provider, onChange: (e) => patch({ provider: e.target.value }) },
1459
1460
  [h("option", { value: "", key: "__none" }, "— " + t("conn.needProvider") + " —")].concat(
1460
1461
  PROVIDER_NAMES.map((name) => h("option", { value: name, key: name }, name === "custom" ? "自建 CalDAV" : name === "icloud" ? "iCloud" : name === "nextcloud" ? "Nextcloud" : "Google"))
1461
1462
  ))
@@ -1476,8 +1477,9 @@ function ConnectionForm(props) {
1476
1477
  const hintKey = FIELD_HINT[form.provider] ? FIELD_HINT[form.provider][key] : undefined;
1477
1478
  return h("div", { className: "dshc-field", key }, [
1478
1479
  h("label", null, t(FIELD_LABEL[key])),
1479
- h(Txt, {
1480
- type: secret ? "password" : "text",
1480
+ h(Txt, {
1481
+ type: secret ? "password" : "text",
1482
+ "aria-label": t(FIELD_LABEL[key]),
1481
1483
  value: form[key] || "",
1482
1484
  placeholder: stored ? t("conn.keep") : "",
1483
1485
  onChange: (e) => patch({ [key]: e.target.value })
@@ -1496,7 +1498,7 @@ function ConnectionForm(props) {
1496
1498
  maySave !== true || (connection !== null && connection !== undefined && connection.settingsKind === "file")
1497
1499
  ? h("div", { className: "dshc-sub", style: { marginTop: "10px" } },
1498
1500
  connection !== null && connection !== undefined && connection.settingsKind === "file"
1499
- ? t("conn.storageFallback", { reason: connection.settingsReason || "插件未注入宿主 settings 服务" })
1501
+ ? t("conn.storageFallback")
1500
1502
  : t("conn.current", { summary: connectionSummary(connection) }))
1501
1503
  : null
1502
1504
  ]);
@@ -1597,7 +1599,7 @@ function CalendarPanel(props) {
1597
1599
  const [configured, setConfigured] = useState(null);
1598
1600
  const [conn, setConn] = useState(null);
1599
1601
  const [connOpen, setConnOpen] = useState(false);
1600
-
1602
+
1601
1603
  const layerOpen = draft !== null || selected !== null || connOpen === true;
1602
1604
  const rootRef = useRef(null);
1603
1605
 
package/lib/config.js CHANGED
@@ -93,12 +93,10 @@ export function resolveCredentials(config, env = process.env) {
93
93
  const username = nonEmpty(config?.username);
94
94
  const password = nonEmpty(config?.password) ?? nonEmpty(env.DSH_CALENDAR_PASSWORD);
95
95
  if (username === undefined) {
96
- throw new ConfigError('dsh-calendar 未配置 username:请在 profile 的 cordis.patch.yml 覆盖 calendar 行的 config,' +
97
- '填上 CalDAV 账号(iCloud 为账号邮箱)后重启。');
96
+ throw new ConfigError('日历账号未填写:请在日历的“连接设置”中填写“账号”(iCloud 使用 Apple ID 邮箱),然后重新测试连接。');
98
97
  }
99
98
  if (password === undefined) {
100
- throw new ConfigError('dsh-calendar 未配置密码:请设置环境变量 DSH_CALENDAR_PASSWORD,' +
101
- '或在 profile 的 cordis.patch.yml 覆盖 calendar 行的 password(iCloud 请用应用专用密码)后重启。');
99
+ throw new ConfigError('日历密码未填写:请在“连接设置”中填写“密码 / 应用专用密码”,然后重新测试连接。iCloud 需要应用专用密码。');
102
100
  }
103
101
  return { username, password };
104
102
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-calendar",
3
- "version": "0.8.2",
4
- "description": "DSH 日历插件:CalDAV 日程查询、创建、修改、删除与搜索,支持 Google OAuth2、iCloud、Nextcloud 与自建服务。",
3
+ "version": "0.8.4",
4
+ "description": "DSH 日历插件:可视化周/月视图、拖拽改期与 CalDAV 日程管理,支持 Google OAuth2、iCloud、Nextcloud。",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",