feat(待办/日程): 两页时间选择器统一居中弹出 + 待办截止行去掉「修改」字样 (#51)
## 1. 日程页时间选择器也改为居中弹出 用户要求:「新建日程那里,开始和结束时间也用这种方式弹出来吧」 与待办页保持一致:根节点改 Stack,弹层居中浮在内容之上。 移除 bindSheet(SDK 的 SheetOptions 没有 position/alignment,只能底部弹)。 三种弹层(时间选择/重复范围/重复截止)继续共用同一个 sheetMode 切换。 ### 真机验证(5NC0225B27004718) 弹层 y=713~1691,中心 1202;屏幕中心 1222,偏差 20px ✅ ## 2. 待办页截止时间行去掉「修改」二字 用户要求:「修改那两个字没必要,直接点那个时间框,出现选择时间的地方」 整行本来就可点,右侧改为一个 `›` 箭头作视觉暗示(与日程页「开始/结束时间」行一致)。 ## 3. 修复:纯待办本的 event 通道误落库(导致 Inbox 待办消失 + 编辑报错) ### 根因 `SyncEngine` 的 event 通道用 `DavClient.reportEtags(href)`,**不区分本的 COMP_SET 类型**。 对纯待办本(如群晖 Inbox,COMP_SET=todo)也照常跑 event REPORT: - 服务器返回了文件列表(里面其实是 VTODO 文件) - `parseEvents` 解析出 0 条日程,**但文件仍被落库成 kind='event'** - 结果:本地库出现"属于待办本的日程记录"(实测 id=748 title=Hvf) - 用户新建的「测试」待办进不来,反而被这条假日程占用 cal_key ### 后果 - 待办列表看不到(列表只查 kind='todo') - 点它编辑走日程通道 → 报「需要联网 + 日历本需可写」 - 用户反馈的「编辑待办失败」由此而来 ### 修法 event 通道前判断 `acc.calendarComps[i] === 'todo'` 就跳过, 日志明确输出「是纯待办本(COMP_SET=todo),跳过 event 通道」。 ### 验证 日志实测:`日历本[1]「Inbox」是纯待办本(COMP_SET=todo),跳过 event 通道` ✅ ## 编译 BUILD SUCCESSFUL ## 遗留 Inbox 的 VTODO REPORT 在群晖上仍返回空 multistatus(68 字符), 「测试」待办能否同步需用户重新建一条再验证。
This commit is contained in:
@@ -501,6 +501,8 @@ export class DavClient {
|
||||
}
|
||||
const xml: string = resp.result as string;
|
||||
LogUtil.write(`HTTP REPORT(${compName}) 响应体 ${xml.length} 字符`);
|
||||
LogUtil.write(`REPORT-诊断(${compName}) 前200字符: ${xml.substring(0, 200)}`);
|
||||
LogUtil.write(`REPORT-诊断(${compName}) 含VTODO=${xml.indexOf('BEGIN:VTODO') >= 0} 含VEVENT=${xml.indexOf('BEGIN:VEVENT') >= 0} 响应数=${(xml.match(/<[\w-]*:?response[\s>]/gi) || []).length}`);
|
||||
const originMatch = /https?:\/\/[^/]+/i.exec(href);
|
||||
const origin: string = originMatch !== null ? originMatch[0] : '';
|
||||
const items: RemoteItem[] = [];
|
||||
@@ -525,6 +527,13 @@ export class DavClient {
|
||||
item.ics = block.substring(start, end + 'END:VCALENDAR'.length);
|
||||
items.push(item);
|
||||
}
|
||||
LogUtil.write(`诊断 blocks=${blocks.length} items=${items.length} xml长=${xml.length}`);
|
||||
for (let bi = 0; bi < blocks.length; bi++) {
|
||||
const bb: string = blocks[bi];
|
||||
if (!/<[\w-]*:?response[\s>]/i.test(bb)) { continue; }
|
||||
const h: string = DavClient.extractTag(bb, "href");
|
||||
LogUtil.write(`诊断 block${bi} len=${bb.length} href=[${h.substring(0,50)}] VCAL=${bb.indexOf("BEGIN:VCALENDAR")>=0} VTODO=${bb.indexOf("BEGIN:VTODO")>=0}`);
|
||||
}
|
||||
return items;
|
||||
} finally {
|
||||
httpRequest.destroy();
|
||||
|
||||
Reference in New Issue
Block a user