dsh-smart-planner 0.0.0-stage → 1.3.5
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/LICENSE +21 -0
- package/README.md +63 -2
- package/assets/icon-180.png +0 -0
- package/client.js +2625 -0
- package/cordis.patch.yml +4 -0
- package/icon.svg +3 -0
- package/index.js +1329 -0
- package/locale/en.json +7 -0
- package/locale/zh.json +7 -0
- package/package.json +62 -3
package/client.js
ADDED
|
@@ -0,0 +1,2625 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 智能任务规划助手 — 浏览器端。五个视图 + 全局复盘弹窗 + 次晨清单。
|
|
3
|
+
* 只做渲染与交互;排期与数据存储在 Host(./index.js)。
|
|
4
|
+
*/
|
|
5
|
+
window.__ModuleLoader__.load({
|
|
6
|
+
id: 'dsh-smart-planner',
|
|
7
|
+
factory(require) {
|
|
8
|
+
const React = require('react')
|
|
9
|
+
const { useState, useEffect, useRef, useMemo } = React
|
|
10
|
+
const e = React.createElement
|
|
11
|
+
const useSyncExternalStore = React.useSyncExternalStore
|
|
12
|
+
|
|
13
|
+
const API = '/api/smart-planner'
|
|
14
|
+
const NS = 'smartPlanner'
|
|
15
|
+
const ICON_BIRD = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAGEElEQVR4nO1du3HdMBB87406caRQFSB0BWoAVShS4MhVsAFVoJAVOHSkWuThyPS8oUESn/ss7rCRLXtEEru3uDuA4PUykIXw9Pi5/nn+9ft6MYKb9g0M6GIIoDD6rWEIwDmGABxH/4IhAOcYAnCOIQDH9r9gCMA5hgCcYwig0P4tdQEXDAE4nftXDAE4xxCA4+hfMARQQL61+X/BEMDli/gU+dPP54t1mFM0l+3PBqN/gXsHCM7m/C3cC8A7XAsg7ER/au636hRuBVBCvmW4FMBZNMeXt4sXuBTAHiZn0e9SAGfWHx1FvzsBWE3kWuBGAEfkTxnRPxpBziM/GHWPh4tR5BI2FSR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Ney8aC1LQNfbqGX93GIp49MXxHiX34DXGSCifoStVqj4WvH3vi+EO0Sln4dBn96+JsP/WzywTvcsaePDUOySKtAM0kI6c0jCEAKAZRzXkEHAByUqN4wBQizKA/ingkY1nOvLzFgstblNkxgc9e0SQYPlFy1GvtGY1auNPE/GgO8G4Y8MxXUarXivttv/Lkm/bjW9OgLf585+t0ffGM4bbuo1NevEKsArAKIDQpRgb4wjoaU8p5Y9YDXilWvBqANNLreMIEKHQp2NlJWMu9EnXfdnHyluu4q+W5fTww3h5pcq08IrjDxL3sNcDEM+fS3T8sGp+avIvLcH16pH33yyc9tT/05U9o+5EywpuO8X4N14DTryGmNONhgFBbKIyBfeNKBFmzg0QXC0MLw5G3ofOjEI3COTcfHA+Q7hfJByzDQ51fxD25OjvYueq5A8T+6CHDRa4Opx+9Oar99OZv63lQ0AQAoKeC8wkifyjvQJKGKwwENUQqiVBhElKaZckFEfQAyAEFYSOiCC3j0KNa9bh7lOC2anlWZWRl2Z9psbh7nw0NNrtcnZPrI9JZr9PwkGeDCX0w9Bj0x8ZTMTPaI2MCoqlSuozPunFIcK8UtVUoGKc/6iaSj4sgSUIYxBcVxJABgikzipIdH3+ThAxkD1/BqZVFMMs5jjVmZmRmV2m9q/GHRNq8a4MP6jw0ZNgdXTdSXaKG6n8YaTVqttKmyei39P3h0IN0QeYk3Gzpr9do7N3tXsPAfNwNcPDqB3j2N/J2oALzDyn/vtVAdEqDXlDo5OSo19C6kLoT6q8J/zA3wfmbYiAw4go35xXjfNwk4sgHGvir6J9wA73OGcDko2lfK+g8VvEMYnEQ1CAAAAABJRU5ErkJggg=='
|
|
17
|
+
const DAYS = [1, 2, 3, 4, 5, 6, 0]
|
|
18
|
+
|
|
19
|
+
const zh = {
|
|
20
|
+
panel: '任务规划',
|
|
21
|
+
title: '智能任务规划助手',
|
|
22
|
+
subtitle: '每天 {review} 复盘 · 次日 {morning} 提醒 · 每周约 {weekly} 小时',
|
|
23
|
+
settings: '设置',
|
|
24
|
+
loading: '正在加载任务数据…',
|
|
25
|
+
loadError: '数据加载失败:{msg}',
|
|
26
|
+
retry: '重试',
|
|
27
|
+
tabTasks: '任务列表',
|
|
28
|
+
tabPlan: '每日计划',
|
|
29
|
+
tabCapacity: '容量看板',
|
|
30
|
+
tabBoard: '项目看板',
|
|
31
|
+
tabHonors: '功勋列表',
|
|
32
|
+
tabOrderHint: '拖动看板可调整顺序',
|
|
33
|
+
tabReorderHint: '拖动,或按住 Alt + ←/→ 调整看板顺序',
|
|
34
|
+
honorsTitle: '功勋列表',
|
|
35
|
+
honorsSub: '每完成一个大项目,就收获一枚果实。',
|
|
36
|
+
honorsEmpty: '还没有功勋。完成第一个项目后,这里会结出第一枚果实。',
|
|
37
|
+
honorMeta: '{date} 完成 · 约 {n} 小时',
|
|
38
|
+
honorBadge: '功勋果实',
|
|
39
|
+
honorsCount: '{n} 枚',
|
|
40
|
+
completedProject: '已完成',
|
|
41
|
+
autoDeleteNote: '完成 3 天后自动删除,功勋保留',
|
|
42
|
+
editTitle: '编辑标题',
|
|
43
|
+
editPlan: '调整计划',
|
|
44
|
+
editPlanTitle: '调整项目计划',
|
|
45
|
+
editPlanHint: '修改截止日期后,逾期判断和排期会按新日期重新计算。',
|
|
46
|
+
savePlan: '保存计划',
|
|
47
|
+
editTitleHint: '只修改标题,日期和时长不变。',
|
|
48
|
+
adjustTitle: '调整日期与时长',
|
|
49
|
+
dateLabel: '日期',
|
|
50
|
+
durationLabel: '时长(小时)',
|
|
51
|
+
autoScheduled: '自动排期',
|
|
52
|
+
fixedOn: '固定 {date}',
|
|
53
|
+
dateOn: '日期 {date}',
|
|
54
|
+
freeSlots: '近期空档',
|
|
55
|
+
freeSlot: '{date} · 剩 {n}h',
|
|
56
|
+
noFreeSlots: '近期没有明显空档',
|
|
57
|
+
sessionRange: '每次连续工作',
|
|
58
|
+
session1_2: '1–2 小时',
|
|
59
|
+
session2_3: '2–3 小时',
|
|
60
|
+
session3_4: '3–4 小时',
|
|
61
|
+
sessionCustom: '自定义',
|
|
62
|
+
sessionMaxHours: '单次上限(小时)',
|
|
63
|
+
sessionMaxRequired: '请填写自定义单次上限',
|
|
64
|
+
sessionCountRequired: '请填写希望分几次完成',
|
|
65
|
+
sessionCount: '希望分几次完成',
|
|
66
|
+
sameDayRepeat: '同一天可以重复出现',
|
|
67
|
+
sameDayRepeatHint: '允许时,同一任务一天内可拆成多段。',
|
|
68
|
+
sessionMeta: '单次 ≤ {max}h · 约 {count} 次',
|
|
69
|
+
sameDayRepeatMeta: '同日可重复',
|
|
70
|
+
noFixedDate: '未固定日期',
|
|
71
|
+
titleLabel: '标题',
|
|
72
|
+
saveTime: '保存时间',
|
|
73
|
+
reviewAdvice: '复盘建议',
|
|
74
|
+
reviewDone: '完成',
|
|
75
|
+
missedReviewTitle: '补昨晚的复盘',
|
|
76
|
+
missedReviewSub: '昨晚 {date} 没有复盘。先补上,再确认今天要做什么。',
|
|
77
|
+
confirmTodayStep: '先补昨晚复盘,再确认今天的内容',
|
|
78
|
+
confirmTodayTitle: '确认今天的工作内容',
|
|
79
|
+
confirmTodayHint: '这些是今天排入的任务。取消勾选只会从今天的确认清单移除,排期仍按截止日期计算。',
|
|
80
|
+
reviewAdviceEmpty: '今天先到这里。明天从一个最小动作开始。',
|
|
81
|
+
workStyle: '复盘模式(16 型人格)',
|
|
82
|
+
workStyleHint: '只影响复盘建议的措辞与侧重点,不影响排期。',
|
|
83
|
+
paperTheme: '纸色主题',
|
|
84
|
+
paperThemeHint: '只改变页面底色,不新增强调色。',
|
|
85
|
+
paperWarm: '暖纸',
|
|
86
|
+
paperWuxin: '无心绿',
|
|
87
|
+
paperYubai: '余白',
|
|
88
|
+
paperQuemei: '雀梅',
|
|
89
|
+
paperQinggu: '青古',
|
|
90
|
+
styleIstj: '稳慎执行(ISTJ)',
|
|
91
|
+
mbtiIntj: 'INTJ · 建筑师',
|
|
92
|
+
mbtiIntp: 'INTP · 逻辑学家',
|
|
93
|
+
mbtiEntj: 'ENTJ · 指挥官',
|
|
94
|
+
mbtiEntp: 'ENTP · 辩论家',
|
|
95
|
+
mbtiInfj: 'INFJ · 提倡者',
|
|
96
|
+
mbtiInfp: 'INFP · 调停者',
|
|
97
|
+
mbtiEnfj: 'ENFJ · 主人公',
|
|
98
|
+
mbtiEnfp: 'ENFP · 竞选者',
|
|
99
|
+
mbtiIstj: 'ISTJ · 物流师',
|
|
100
|
+
mbtiIsfj: 'ISFJ · 守卫者',
|
|
101
|
+
mbtiEstj: 'ESTJ · 总经理',
|
|
102
|
+
mbtiEsfj: 'ESFJ · 执政官',
|
|
103
|
+
mbtiIstp: 'ISTP · 鉴赏家',
|
|
104
|
+
mbtiIsfp: 'ISFP · 探险家',
|
|
105
|
+
mbtiEstp: 'ESTP · 企业家',
|
|
106
|
+
mbtiEsfp: 'ESFP · 表演者',
|
|
107
|
+
styleEntj: '目标推进(ENTJ)',
|
|
108
|
+
styleInfj: '意义驱动(INFJ)',
|
|
109
|
+
styleIntp: '逻辑探索(INTP)',
|
|
110
|
+
styleNeutral: '不指定',
|
|
111
|
+
sessionChooserTitle: '选择固定对话',
|
|
112
|
+
sessionChooserHint: '检测到多个名为「智能任务规划助手」的对话。请选择双击飞鸟后进入哪一个。',
|
|
113
|
+
sessionChoose: '进入这个对话',
|
|
114
|
+
sessionConfirm: '确认进入这个窗口',
|
|
115
|
+
sessionSelect: '选择',
|
|
116
|
+
sessionSelected: '已选择',
|
|
117
|
+
sessionCreated: '创建于 {time}',
|
|
118
|
+
sessionUpdated: '最近更新 {time}',
|
|
119
|
+
sessionNoTime: '创建时间未知',
|
|
120
|
+
sessionFinalHint: '确认后会作为固定入口;下次双击飞鸟仍可重新选择。',
|
|
121
|
+
sessionCancel: '取消',
|
|
122
|
+
sessionCurrent: '当前',
|
|
123
|
+
greetingBackTitle: '欢迎回来,我是智能任务规划助手',
|
|
124
|
+
greetingBackBody: '今天的任务和复盘都在这里。想调整计划,直接告诉我。',
|
|
125
|
+
capacityTitle: '容量看板',
|
|
126
|
+
capacitySub: '每一天一行,空白日也不省略;用来核对已排/上限和剩余容量。',
|
|
127
|
+
capacityToday: '今日 {date}:已排 {used}/{cap}h,剩余 {left}h',
|
|
128
|
+
capacityWeek: '本周:已排 {used}/{cap}h,剩余 {left}h',
|
|
129
|
+
capacityNext: '未来 {days} 天:已排 {used}/{cap}h,剩余 {left}h',
|
|
130
|
+
colDate: '日期',
|
|
131
|
+
colWeekday: '星期',
|
|
132
|
+
colLoad: '已排/上限',
|
|
133
|
+
colLeft: '剩余',
|
|
134
|
+
colContent: '内容',
|
|
135
|
+
noTasks: '—',
|
|
136
|
+
overBy: '超 {n}h',
|
|
137
|
+
level: '等级',
|
|
138
|
+
levelTitle: '任务等级',
|
|
139
|
+
levelA: 'A 重要且紧急',
|
|
140
|
+
levelB: 'B 重要不紧急',
|
|
141
|
+
levelC: 'C 紧急不重要',
|
|
142
|
+
levelD: 'D 不重要不紧急',
|
|
143
|
+
levelADesc: '重要且紧急 · 马上做。如项目方案明早要交、突发健康问题,这类事既影响大又等不得,需立刻集中精力搞定。',
|
|
144
|
+
levelBDesc: '重要但不紧急 · 计划做。如学习提升、健康管理、长远规划,这是最该花时间的一格,但常因不催人就被拖成第一象限的危机。',
|
|
145
|
+
levelCDesc: '紧急但不重要 · 授权或减少。如临时跑腿、别人催办的事,往往只是别人急,不是你急,能交给别人就交出去。',
|
|
146
|
+
levelDDesc: '不重要也不紧急 · 尽量不做。如无目的刷手机、发呆,这类事零碎耗时间,果断拒绝或留到空闲时再说。',
|
|
147
|
+
levelLegendA: '重要且紧急 · 马上做',
|
|
148
|
+
levelLegendB: '重要不紧急 · 计划做',
|
|
149
|
+
levelLegendC: '紧急不重要 · 授权或减少',
|
|
150
|
+
levelLegendD: '不重要不紧急 · 尽量不做',
|
|
151
|
+
totalHours: '目标总时长(小时)',
|
|
152
|
+
totalHoursPlaceholder: '如 10',
|
|
153
|
+
totalHoursRequired: '请填写目标任务总时长(小时)',
|
|
154
|
+
manualNotice: '手动编辑内容或时间会固定当前日期,自动重排不会改回;点「取消固定」可恢复自动。',
|
|
155
|
+
remainingText: '剩余 {n} 小时',
|
|
156
|
+
buffer: '缓冲',
|
|
157
|
+
bufferNone: '缓冲:不留',
|
|
158
|
+
bufferDay: '缓冲:留 1 天',
|
|
159
|
+
bufferChoose: '缓冲:请选择',
|
|
160
|
+
bufferRequired: '请选择是否预留缓冲',
|
|
161
|
+
deadlineLeft: '截止 {date} 前还有 {left}h 可用(总容量 {cap}h,已排 {used}h)',
|
|
162
|
+
capacityMonth: '未来一个月',
|
|
163
|
+
range7: '未来 7 天',
|
|
164
|
+
range30: '未来一个月',
|
|
165
|
+
rangeAll: '全部',
|
|
166
|
+
bufferTag: '缓冲',
|
|
167
|
+
noBuffer: '未预留缓冲',
|
|
168
|
+
bufferAt: '缓冲日 {date}',
|
|
169
|
+
reviewMove: '未完成怎么安排',
|
|
170
|
+
movePlaceholder: '选择安排…',
|
|
171
|
+
moveBuffer: '挪到缓冲日',
|
|
172
|
+
moveGap: '放到剩余空档',
|
|
173
|
+
moveKeep: '先不调整',
|
|
174
|
+
fishHint: '单击看今日任务,双击飞鸟打开固定对话',
|
|
175
|
+
fishToday: '今日任务',
|
|
176
|
+
fishEmpty: '今天没有排期任务。',
|
|
177
|
+
fishDoubleHint: '双击飞鸟,打开「智能任务规划助手」对话',
|
|
178
|
+
greetingTitle: '你好,我是智能任务规划助手',
|
|
179
|
+
greetingBody: '不用把所有 DDL 都装进脑子里。告诉我项目,我来拆阶段、排日期,晚上再陪你复盘。',
|
|
180
|
+
greetingFormat: '直接输入:项目名称 + 截止日期 + 特殊要求(等级、总时长、是否留缓冲)',
|
|
181
|
+
greetingExample: '例如:课程论文《…》,12 月 20 日截止,等级高,总时长 30 小时,留 1 天缓冲',
|
|
182
|
+
greetingOpen: '打开任务规划',
|
|
183
|
+
greetingDismiss: '知道了',
|
|
184
|
+
welcomeTitle: '你好,我是智能任务规划助手',
|
|
185
|
+
welcomeHelloMorning: '早上好',
|
|
186
|
+
welcomeHelloAfternoon: '下午好',
|
|
187
|
+
welcomeHelloEvening: '晚上好',
|
|
188
|
+
welcomeBody: '我会帮你把项目拆成阶段、排到每一天,晚上再陪你复盘。你不需要一次把所有事都想清楚,先把下一件小事放进来就好。',
|
|
189
|
+
welcomeFormat: '输入计划:项目名称 + 截止日期 + 特殊要求(等级、总时长、是否留缓冲)',
|
|
190
|
+
welcomeExample: '例如:课程论文《教师隐性知识流动》,12 月 20 日截止,论文类,等级高,总时长 30 小时,留 1 天缓冲',
|
|
191
|
+
welcomeStart: '开始输入计划',
|
|
192
|
+
welcomeLater: '先自己看看',
|
|
193
|
+
welcomeHint: '安装后首次打开会看到我;之后我就在右下角,随时可以叫我。',
|
|
194
|
+
floatTitle: '智能任务规划助手',
|
|
195
|
+
floatPrompt: '输入计划:项目名称 + 截止日期 + 特殊要求',
|
|
196
|
+
floatOpen: '打开任务规划',
|
|
197
|
+
floatCollapse: '收起',
|
|
198
|
+
floatExpand: '任务规划',
|
|
199
|
+
floatToday: '今天还有 {left}h 余量',
|
|
200
|
+
floatNoPlan: '今天没有排期,留一点空白也很好。',
|
|
201
|
+
floatReviewDone: '今晚复盘已经完成,辛苦了。',
|
|
202
|
+
floatReviewSoon: '今晚 {time} 我会来陪你复盘。',
|
|
203
|
+
floatReviewNow: '复盘时间到了,点开任务规划,我们一起过一遍。',
|
|
204
|
+
encourage1: '先做最要紧的一件,剩下的交给计划。',
|
|
205
|
+
encourage2: '你已经在推进了,不用一下子做到完美。',
|
|
206
|
+
encourage3: '计划不是用来责备自己的,是用来留出余地的。',
|
|
207
|
+
encourage4: '今天能往前走一点,就已经很好。',
|
|
208
|
+
|
|
209
|
+
tabReviews: '复盘记录',
|
|
210
|
+
newProject: '新建项目',
|
|
211
|
+
namePlaceholder: '项目名称,如「比较教育课程论文」',
|
|
212
|
+
type: '任务类型',
|
|
213
|
+
due: '截止日期',
|
|
214
|
+
importance: '重要程度',
|
|
215
|
+
imp3: '高(3)',
|
|
216
|
+
imp2: '中(2)',
|
|
217
|
+
imp1: '低(1)',
|
|
218
|
+
customStages: '自定义阶段(可选,用逗号或换行分隔;留空按类型模板拆解)',
|
|
219
|
+
create: '创建并排期',
|
|
220
|
+
creating: '创建中…',
|
|
221
|
+
created: '已创建「{name}」,共 {hours} 小时,拆成 {n} 个阶段',
|
|
222
|
+
nameRequired: '请填写项目名称',
|
|
223
|
+
noProjects: '还没有项目。填写项目名称、类型和截止日期即可自动拆解。',
|
|
224
|
+
projectMeta: '{type} · 截止 {due} · 等级 {imp} · 总时长 {hours}h · {done}/{total} 阶段',
|
|
225
|
+
deleteProject: '删除项目',
|
|
226
|
+
confirmDeleteProject: '确认删除项目?',
|
|
227
|
+
edit: '编辑内容',
|
|
228
|
+
adjust: '调整时间',
|
|
229
|
+
delete: '删除',
|
|
230
|
+
confirmDelete: '确认删除?',
|
|
231
|
+
save: '保存',
|
|
232
|
+
cancel: '取消',
|
|
233
|
+
clearPin: '取消固定',
|
|
234
|
+
hoursText: '约 {n} 小时',
|
|
235
|
+
high: '高优先',
|
|
236
|
+
pinned: '已固定',
|
|
237
|
+
part: '第 {n}/{m} 段',
|
|
238
|
+
progressText: '已完成 {done}/{total} 小时',
|
|
239
|
+
noTasksDay: '这天还没有任务,新增项目后会自动排入。',
|
|
240
|
+
capacity: '{used} / {cap} 小时',
|
|
241
|
+
highCount: '高优先级 {n}/{max}',
|
|
242
|
+
overCapacity: '这天超出预设容量(多为人工固定日期造成),可改期或调高每日时长。',
|
|
243
|
+
prevDay: '‹ 前一天',
|
|
244
|
+
nextDay: '后一天 ›',
|
|
245
|
+
backToday: '回到今天',
|
|
246
|
+
planRange: '排期范围 {from} — {to}',
|
|
247
|
+
unscheduled: '暂未排入',
|
|
248
|
+
unscheduledHint: '截止日前容量不足,可减少任务、调高每日时长或推迟截止日期。',
|
|
249
|
+
reasonWindow: '截止日超出排期窗口',
|
|
250
|
+
reasonCapacity: '截止前容量不足',
|
|
251
|
+
reasonDeadline: '截止前排不完',
|
|
252
|
+
boardEmpty: '还没有项目。',
|
|
253
|
+
daysLeft: '剩 {n} 天',
|
|
254
|
+
overdue: '逾期 {n} 天',
|
|
255
|
+
stageDone: '已完成',
|
|
256
|
+
weekSummary: '本周完成 {done} 小时 / 计划 {planned} 小时 · 完成 {stages} 个阶段',
|
|
257
|
+
monthSummary: '本月完成 {done} 小时 / 计划 {planned} 小时 · 完成 {stages} 个阶段',
|
|
258
|
+
weekReasons: '本周未完成原因:{text}',
|
|
259
|
+
noReviews: '还没有复盘记录。每晚 {time} 会自动弹出复盘窗口。',
|
|
260
|
+
reviewNow: '现在复盘',
|
|
261
|
+
weekReview: '本周回顾',
|
|
262
|
+
monthReview: '本月回顾',
|
|
263
|
+
dailyReview: '{date} 复盘',
|
|
264
|
+
doneCount: '完成 {done}/{total}',
|
|
265
|
+
reflectionLabel: '反思:{text}',
|
|
266
|
+
tomorrowCount: '次日已确认 {n} 项',
|
|
267
|
+
periodWeek: '周回顾',
|
|
268
|
+
periodMonth: '月回顾',
|
|
269
|
+
periodRangeLabel: '{from} — {to}',
|
|
270
|
+
periodReflection: '时间利用反思',
|
|
271
|
+
periodPlanWeek: '下周安排',
|
|
272
|
+
periodPlanMonth: '下月方向',
|
|
273
|
+
morningTitle: '今日清单',
|
|
274
|
+
morningSub: '{date} · 共 {n} 项',
|
|
275
|
+
morningEmpty: '今天没有排期任务。',
|
|
276
|
+
gotIt: '知道了',
|
|
277
|
+
reviewTitle: '今晚复盘',
|
|
278
|
+
reviewSub: '{date} · 先逐项核实今天,再确认明天',
|
|
279
|
+
verifyStep: '第 1 步 / 共 2 步 · 核实今天',
|
|
280
|
+
tomorrowStep: '第 2 步 / 共 2 步 · 确认明天',
|
|
281
|
+
noTasksToday: '今天没有排期任务,可直接确认明天安排。',
|
|
282
|
+
reasonPlaceholder: '未完成原因…',
|
|
283
|
+
notePlaceholder: '补充说明(可选)',
|
|
284
|
+
reasonRequired: '请为未完成的「{title}」选择原因',
|
|
285
|
+
tomorrowTitle: '确认明天任务',
|
|
286
|
+
tomorrowHint: '取消勾选只是不写进明天的确认清单;任务仍会按截止日期自动排期。',
|
|
287
|
+
reflectionPlaceholder: '今天时间花在哪?哪里被卡住了?',
|
|
288
|
+
next: '下一步',
|
|
289
|
+
back: '上一步',
|
|
290
|
+
submit: '核实无误,保存',
|
|
291
|
+
submitting: '保存中…',
|
|
292
|
+
later: '稍后再说',
|
|
293
|
+
close: '关闭',
|
|
294
|
+
periodWeekTitle: '本周回顾',
|
|
295
|
+
periodMonthTitle: '本月回顾',
|
|
296
|
+
periodSub: '{from} — {to} · 自动汇总,补充反思后保存',
|
|
297
|
+
periodReflectionPlaceholder: '这段时间时间利用得怎么样?',
|
|
298
|
+
periodPlanPlaceholder: '下周 / 下月的调整方向(会写进复盘记录)',
|
|
299
|
+
periodSave: '保存回顾',
|
|
300
|
+
statsDone: '完成 {n} 小时',
|
|
301
|
+
statsPlanned: '计划 {n} 小时',
|
|
302
|
+
statsStages: '完成 {n} 个阶段',
|
|
303
|
+
noReasons: '没有未完成原因记录',
|
|
304
|
+
settingsTitle: '排期设置',
|
|
305
|
+
reviewTime: '晚间复盘时间',
|
|
306
|
+
morningTime: '次晨提醒时间',
|
|
307
|
+
weekly: '每周可用小时',
|
|
308
|
+
maxHigh: '每天高优先级上限',
|
|
309
|
+
saveSettings: '保存设置',
|
|
310
|
+
saved: '已保存',
|
|
311
|
+
dow0: '周日',
|
|
312
|
+
dow1: '周一',
|
|
313
|
+
dow2: '周二',
|
|
314
|
+
dow3: '周三',
|
|
315
|
+
dow4: '周四',
|
|
316
|
+
dow5: '周五',
|
|
317
|
+
dow6: '周六',
|
|
318
|
+
typePaper: '论文类',
|
|
319
|
+
typeExam: '英语备考',
|
|
320
|
+
typeReport: '汇报类',
|
|
321
|
+
typeAdmin: '事务类',
|
|
322
|
+
typeOther: '其他',
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
const en = {
|
|
326
|
+
panel: 'Task planner',
|
|
327
|
+
title: 'Smart task planner',
|
|
328
|
+
subtitle: 'Review at {review} · next-day list at {morning} · about {weekly} h a week',
|
|
329
|
+
settings: 'Settings',
|
|
330
|
+
loading: 'Loading task data…',
|
|
331
|
+
loadError: 'Could not load data: {msg}',
|
|
332
|
+
retry: 'Retry',
|
|
333
|
+
tabTasks: 'Tasks',
|
|
334
|
+
tabPlan: 'Daily plan',
|
|
335
|
+
tabCapacity: 'Capacity board',
|
|
336
|
+
tabBoard: 'Project board',
|
|
337
|
+
tabHonors: 'Honors',
|
|
338
|
+
tabOrderHint: 'Drag to reorder',
|
|
339
|
+
tabReorderHint: 'Drag, or hold Alt + ←/→ to reorder tabs',
|
|
340
|
+
honorsTitle: 'Honors',
|
|
341
|
+
honorsSub: 'Every completed major project earns one fruit.',
|
|
342
|
+
honorsEmpty: 'No honors yet. Complete your first project and the first fruit will appear here.',
|
|
343
|
+
honorMeta: 'Completed {date} · about {n} h',
|
|
344
|
+
honorBadge: 'Honor fruit',
|
|
345
|
+
honorsCount: '{n}',
|
|
346
|
+
completedProject: 'Completed',
|
|
347
|
+
autoDeleteNote: 'Removed 3 days after completion; the honor stays',
|
|
348
|
+
editTitle: 'Edit title',
|
|
349
|
+
editPlan: 'Adjust plan',
|
|
350
|
+
editPlanTitle: 'Adjust project plan',
|
|
351
|
+
editPlanHint: 'Changing the due date re-evaluates overdue status and scheduling.',
|
|
352
|
+
savePlan: 'Save plan',
|
|
353
|
+
editTitleHint: 'Title only; date and duration stay unchanged.',
|
|
354
|
+
adjustTitle: 'Adjust date and duration',
|
|
355
|
+
dateLabel: 'Date',
|
|
356
|
+
durationLabel: 'Duration (hours)',
|
|
357
|
+
autoScheduled: 'Auto-scheduled',
|
|
358
|
+
fixedOn: 'Fixed {date}',
|
|
359
|
+
dateOn: 'Date {date}',
|
|
360
|
+
freeSlots: 'Open slots',
|
|
361
|
+
freeSlot: '{date} · {n}h left',
|
|
362
|
+
noFreeSlots: 'No clear open slot soon',
|
|
363
|
+
sessionRange: 'Work session length',
|
|
364
|
+
session1_2: '1–2 hours',
|
|
365
|
+
session2_3: '2–3 hours',
|
|
366
|
+
session3_4: '3–4 hours',
|
|
367
|
+
sessionCustom: 'Custom',
|
|
368
|
+
sessionMaxHours: 'Max hours per session',
|
|
369
|
+
sessionMaxRequired: 'Enter a custom session limit',
|
|
370
|
+
sessionCountRequired: 'Enter the number of sessions',
|
|
371
|
+
sessionCount: 'Sessions to finish',
|
|
372
|
+
sameDayRepeat: 'Allow repeats on the same day',
|
|
373
|
+
sameDayRepeatHint: 'When allowed, one task can be split into multiple chunks in a day.',
|
|
374
|
+
sessionMeta: '≤ {max}h per session · about {count} sessions',
|
|
375
|
+
sameDayRepeatMeta: 'Same-day repeats allowed',
|
|
376
|
+
noFixedDate: 'No fixed date',
|
|
377
|
+
titleLabel: 'Title',
|
|
378
|
+
saveTime: 'Save time',
|
|
379
|
+
reviewAdvice: 'Review suggestions',
|
|
380
|
+
reviewDone: 'Done',
|
|
381
|
+
missedReviewTitle: 'Catch up on last night',
|
|
382
|
+
missedReviewSub: 'There is no review for {date}. Do it first, then confirm what today looks like.',
|
|
383
|
+
confirmTodayStep: 'Catch up on last night, then confirm today',
|
|
384
|
+
confirmTodayTitle: 'Confirm today’s work',
|
|
385
|
+
confirmTodayHint: 'These tasks are scheduled for today. Unchecking only removes them from today’s confirmed list; scheduling still follows due dates.',
|
|
386
|
+
reviewAdviceEmpty: 'That is enough for today. Start with one smallest action tomorrow.',
|
|
387
|
+
workStyle: 'Review mode (16 types)',
|
|
388
|
+
workStyleHint: 'Only shapes the review suggestions; it does not change scheduling.',
|
|
389
|
+
paperTheme: 'Paper theme',
|
|
390
|
+
paperThemeHint: 'Changes only the page ground, never the accent palette.',
|
|
391
|
+
paperWarm: 'Warm paper',
|
|
392
|
+
paperWuxin: 'Wuxin green',
|
|
393
|
+
paperYubai: 'Yubai',
|
|
394
|
+
paperQuemei: 'Quemei',
|
|
395
|
+
paperQinggu: 'Qinggu',
|
|
396
|
+
styleIstj: 'Steady executor (ISTJ)',
|
|
397
|
+
mbtiIntj: 'INTJ · Architect',
|
|
398
|
+
mbtiIntp: 'INTP · Logician',
|
|
399
|
+
mbtiEntj: 'ENTJ · Commander',
|
|
400
|
+
mbtiEntp: 'ENTP · Debater',
|
|
401
|
+
mbtiInfj: 'INFJ · Advocate',
|
|
402
|
+
mbtiInfp: 'INFP · Mediator',
|
|
403
|
+
mbtiEnfj: 'ENFJ · Protagonist',
|
|
404
|
+
mbtiEnfp: 'ENFP · Campaigner',
|
|
405
|
+
mbtiIstj: 'ISTJ · Logistician',
|
|
406
|
+
mbtiIsfj: 'ISFJ · Defender',
|
|
407
|
+
mbtiEstj: 'ESTJ · Executive',
|
|
408
|
+
mbtiEsfj: 'ESFJ · Consul',
|
|
409
|
+
mbtiIstp: 'ISTP · Virtuoso',
|
|
410
|
+
mbtiIsfp: 'ISFP · Adventurer',
|
|
411
|
+
mbtiEstp: 'ESTP · Entrepreneur',
|
|
412
|
+
mbtiEsfp: 'ESFP · Entertainer',
|
|
413
|
+
styleEntj: 'Goal driver (ENTJ)',
|
|
414
|
+
styleInfj: 'Meaning-driven (INFJ)',
|
|
415
|
+
styleIntp: 'Logical explorer (INTP)',
|
|
416
|
+
styleNeutral: 'Not specified',
|
|
417
|
+
sessionChooserTitle: 'Choose fixed chat',
|
|
418
|
+
sessionChooserHint: 'Several chats are named “Smart Task Planner”. Choose the one the bird should open.',
|
|
419
|
+
sessionChoose: 'Open this chat',
|
|
420
|
+
sessionConfirm: 'Confirm this chat',
|
|
421
|
+
sessionSelect: 'Select',
|
|
422
|
+
sessionSelected: 'Selected',
|
|
423
|
+
sessionCreated: 'Created {time}',
|
|
424
|
+
sessionUpdated: 'Last active {time}',
|
|
425
|
+
sessionNoTime: 'Creation time unknown',
|
|
426
|
+
sessionFinalHint: 'After confirming, this becomes the fixed entry; double-click the bird again to change it.',
|
|
427
|
+
sessionCancel: 'Cancel',
|
|
428
|
+
sessionCurrent: 'Current',
|
|
429
|
+
greetingBackTitle: 'Welcome back — I am your Smart Task Planner',
|
|
430
|
+
greetingBackBody: 'Today’s tasks and review are here. Tell me directly if you want to adjust the plan.',
|
|
431
|
+
capacityTitle: 'Capacity board',
|
|
432
|
+
capacitySub: 'One row per day, including empty days, for checking load, limit, and remaining hours.',
|
|
433
|
+
capacityToday: 'Today {date}: {used}/{cap}h scheduled, {left}h left',
|
|
434
|
+
capacityWeek: 'This week: {used}/{cap}h scheduled, {left}h left',
|
|
435
|
+
capacityNext: 'Next {days} days: {used}/{cap}h scheduled, {left}h left',
|
|
436
|
+
colDate: 'Date',
|
|
437
|
+
colWeekday: 'Day',
|
|
438
|
+
colLoad: 'Scheduled / limit',
|
|
439
|
+
colLeft: 'Left',
|
|
440
|
+
colContent: 'Content',
|
|
441
|
+
noTasks: '—',
|
|
442
|
+
overBy: 'Over {n}h',
|
|
443
|
+
level: 'Level',
|
|
444
|
+
levelTitle: 'Task level',
|
|
445
|
+
levelA: 'A Important & urgent',
|
|
446
|
+
levelB: 'B Important, not urgent',
|
|
447
|
+
levelC: 'C Urgent, not important',
|
|
448
|
+
levelD: 'D Neither important nor urgent',
|
|
449
|
+
levelADesc: 'Important and urgent — do now. Something due tomorrow morning or a sudden health issue: high impact and no time to wait, so focus on it immediately.',
|
|
450
|
+
levelBDesc: 'Important, not urgent — plan it. Learning, health, long-term goals: the quadrant that deserves the most time, yet gets postponed because no one is chasing you.',
|
|
451
|
+
levelCDesc: 'Urgent, not important — delegate or reduce. Errands or other people’s chase-ups are often their urgency, not yours; hand them off if you can.',
|
|
452
|
+
levelDDesc: 'Not important, not urgent — avoid. Aimless scrolling or idle time quietly eats the day; decline it or leave it for real spare time.',
|
|
453
|
+
levelLegendA: 'Important & urgent · do now',
|
|
454
|
+
levelLegendB: 'Important, not urgent · plan',
|
|
455
|
+
levelLegendC: 'Urgent, not important · delegate/reduce',
|
|
456
|
+
levelLegendD: 'Neither · avoid',
|
|
457
|
+
totalHours: 'Total hours',
|
|
458
|
+
totalHoursPlaceholder: 'e.g. 10',
|
|
459
|
+
totalHoursRequired: 'Enter the total hours for this project',
|
|
460
|
+
manualNotice: 'Manual edits fix the current date; automatic scheduling will not move it back. Clear the fixed date to return to auto.',
|
|
461
|
+
remainingText: '{n}h left',
|
|
462
|
+
buffer: 'Buffer',
|
|
463
|
+
bufferNone: 'Buffer: none',
|
|
464
|
+
bufferDay: 'Buffer: 1 day',
|
|
465
|
+
bufferChoose: 'Buffer: choose',
|
|
466
|
+
bufferRequired: 'Choose whether to reserve a buffer',
|
|
467
|
+
deadlineLeft: 'By {date}, {left}h is still available ({cap}h total, {used}h scheduled)',
|
|
468
|
+
capacityMonth: 'Next 30 days',
|
|
469
|
+
range7: 'Next 7 days',
|
|
470
|
+
range30: 'Next 30 days',
|
|
471
|
+
rangeAll: 'All',
|
|
472
|
+
bufferTag: 'Buffer',
|
|
473
|
+
noBuffer: 'No buffer reserved',
|
|
474
|
+
bufferAt: 'Buffer day {date}',
|
|
475
|
+
reviewMove: 'Plan for unfinished',
|
|
476
|
+
movePlaceholder: 'Choose a plan…',
|
|
477
|
+
moveBuffer: 'Move to buffer day',
|
|
478
|
+
moveGap: 'Use the next free slot',
|
|
479
|
+
moveKeep: 'Leave it for now',
|
|
480
|
+
fishHint: 'Click for today’s tasks; double-click the bird for the fixed chat',
|
|
481
|
+
fishToday: 'Today’s tasks',
|
|
482
|
+
fishEmpty: 'No tasks scheduled today.',
|
|
483
|
+
fishDoubleHint: 'Double-click the bird to open the Smart Task Planner chat',
|
|
484
|
+
greetingTitle: 'Hi, I am your Smart Task Planner',
|
|
485
|
+
greetingBody: 'You do not need to hold every deadline in your head. Tell me a project and I will break it into stages, schedule it, and check in with you in the evening.',
|
|
486
|
+
greetingFormat: 'Type: project name + due date + special requirements (level, total hours, buffer)',
|
|
487
|
+
greetingExample: 'e.g. Course paper, due Dec 20, high level, 30 hours total, 1 buffer day',
|
|
488
|
+
greetingOpen: 'Open planner',
|
|
489
|
+
greetingDismiss: 'Got it',
|
|
490
|
+
welcomeTitle: 'Hi, I am your task planning assistant',
|
|
491
|
+
welcomeHelloMorning: 'Good morning',
|
|
492
|
+
welcomeHelloAfternoon: 'Good afternoon',
|
|
493
|
+
welcomeHelloEvening: 'Good evening',
|
|
494
|
+
welcomeBody: 'I will break your projects into stages, schedule them day by day, and check in with you in the evening. You do not need to figure everything out at once — just put the next small thing in.',
|
|
495
|
+
welcomeFormat: 'Enter a plan: project name + due date + special requirements (level, total hours, buffer)',
|
|
496
|
+
welcomeExample: 'e.g. Course paper, due Dec 20, paper type, high level, 30 hours total, 1 buffer day',
|
|
497
|
+
welcomeStart: 'Start a plan',
|
|
498
|
+
welcomeLater: 'Look around first',
|
|
499
|
+
welcomeHint: 'You will see me the first time after installation; afterwards I stay in the corner.',
|
|
500
|
+
floatTitle: 'Smart task planner',
|
|
501
|
+
floatPrompt: 'Enter a plan: name + due date + special requirements',
|
|
502
|
+
floatOpen: 'Open planner',
|
|
503
|
+
floatCollapse: 'Collapse',
|
|
504
|
+
floatExpand: 'Planner',
|
|
505
|
+
floatToday: '{left}h left today',
|
|
506
|
+
floatNoPlan: 'Nothing scheduled today; some blank space is good too.',
|
|
507
|
+
floatReviewDone: 'Tonight’s review is done. Take a rest.',
|
|
508
|
+
floatReviewSoon: 'I will check in at {time} tonight.',
|
|
509
|
+
floatReviewNow: 'It is review time. Open the planner and we will go through it together.',
|
|
510
|
+
encourage1: 'Do the most important thing first; let the plan hold the rest.',
|
|
511
|
+
encourage2: 'You are already moving. It does not have to be perfect.',
|
|
512
|
+
encourage3: 'A plan is not for blaming yourself; it is for leaving room.',
|
|
513
|
+
encourage4: 'Moving forward a little today is already enough.',
|
|
514
|
+
|
|
515
|
+
tabReviews: 'Review log',
|
|
516
|
+
newProject: 'New project',
|
|
517
|
+
namePlaceholder: 'Project name, e.g. comparative education paper',
|
|
518
|
+
type: 'Task type',
|
|
519
|
+
due: 'Due date',
|
|
520
|
+
importance: 'Importance',
|
|
521
|
+
imp3: 'High (3)',
|
|
522
|
+
imp2: 'Medium (2)',
|
|
523
|
+
imp1: 'Low (1)',
|
|
524
|
+
customStages: 'Custom stages (optional, comma or newline separated; blank uses the type template)',
|
|
525
|
+
create: 'Create and schedule',
|
|
526
|
+
creating: 'Creating…',
|
|
527
|
+
created: 'Created “{name}” with {hours} h across {n} stages',
|
|
528
|
+
nameRequired: 'Enter a project name',
|
|
529
|
+
noProjects: 'No projects yet. Enter a name, type, and due date to split it automatically.',
|
|
530
|
+
projectMeta: '{type} · due {due} · level {imp} · total {hours}h · {done}/{total} stages',
|
|
531
|
+
deleteProject: 'Delete project',
|
|
532
|
+
confirmDeleteProject: 'Delete this project?',
|
|
533
|
+
edit: 'Edit',
|
|
534
|
+
adjust: 'Reschedule',
|
|
535
|
+
delete: 'Delete',
|
|
536
|
+
confirmDelete: 'Confirm delete?',
|
|
537
|
+
save: 'Save',
|
|
538
|
+
cancel: 'Cancel',
|
|
539
|
+
clearPin: 'Clear fixed date',
|
|
540
|
+
hoursText: 'about {n} h',
|
|
541
|
+
high: 'High',
|
|
542
|
+
pinned: 'Fixed',
|
|
543
|
+
part: 'Part {n}/{m}',
|
|
544
|
+
progressText: '{done}/{total} h done',
|
|
545
|
+
noTasksDay: 'No tasks on this day. New projects are scheduled automatically.',
|
|
546
|
+
capacity: '{used} / {cap} h',
|
|
547
|
+
highCount: 'High priority {n}/{max}',
|
|
548
|
+
overCapacity: 'This day exceeds its capacity (usually from a fixed date). Move a task or raise the daily hours.',
|
|
549
|
+
prevDay: '‹ Previous',
|
|
550
|
+
nextDay: 'Next ›',
|
|
551
|
+
backToday: 'Today',
|
|
552
|
+
planRange: 'Plan range {from} — {to}',
|
|
553
|
+
unscheduled: 'Not scheduled',
|
|
554
|
+
unscheduledHint: 'Not enough capacity before the deadline. Reduce scope, raise daily hours, or move the due date.',
|
|
555
|
+
reasonWindow: 'Due date is beyond the planning window',
|
|
556
|
+
reasonCapacity: 'Not enough capacity before the due date',
|
|
557
|
+
reasonDeadline: 'Cannot finish before the due date',
|
|
558
|
+
boardEmpty: 'No projects yet.',
|
|
559
|
+
daysLeft: '{n} days left',
|
|
560
|
+
overdue: '{n} days overdue',
|
|
561
|
+
stageDone: 'Done',
|
|
562
|
+
weekSummary: 'This week: {done} h done / {planned} h planned · {stages} stages completed',
|
|
563
|
+
monthSummary: 'This month: {done} h done / {planned} h planned · {stages} stages completed',
|
|
564
|
+
weekReasons: 'Reasons this week: {text}',
|
|
565
|
+
noReviews: 'No reviews yet. The review window opens at {time} every evening.',
|
|
566
|
+
reviewNow: 'Review now',
|
|
567
|
+
weekReview: 'Week review',
|
|
568
|
+
monthReview: 'Month review',
|
|
569
|
+
dailyReview: 'Review for {date}',
|
|
570
|
+
doneCount: '{done}/{total} done',
|
|
571
|
+
reflectionLabel: 'Reflection: {text}',
|
|
572
|
+
tomorrowCount: '{n} tasks confirmed for tomorrow',
|
|
573
|
+
periodWeek: 'Week review',
|
|
574
|
+
periodMonth: 'Month review',
|
|
575
|
+
periodRangeLabel: '{from} — {to}',
|
|
576
|
+
periodReflection: 'Time-use reflection',
|
|
577
|
+
periodPlanWeek: 'Next week',
|
|
578
|
+
periodPlanMonth: 'Next month',
|
|
579
|
+
morningTitle: 'Today’s list',
|
|
580
|
+
morningSub: '{date} · {n} tasks',
|
|
581
|
+
morningEmpty: 'No tasks scheduled today.',
|
|
582
|
+
gotIt: 'Got it',
|
|
583
|
+
reviewTitle: 'Evening review',
|
|
584
|
+
reviewSub: '{date} · check today first, then confirm tomorrow',
|
|
585
|
+
verifyStep: 'Step 1 of 2 · check today',
|
|
586
|
+
tomorrowStep: 'Step 2 of 2 · confirm tomorrow',
|
|
587
|
+
noTasksToday: 'No tasks today. You can confirm tomorrow directly.',
|
|
588
|
+
reasonPlaceholder: 'Reason it slipped…',
|
|
589
|
+
notePlaceholder: 'Note (optional)',
|
|
590
|
+
reasonRequired: 'Choose a reason for “{title}”',
|
|
591
|
+
tomorrowTitle: 'Confirm tomorrow',
|
|
592
|
+
tomorrowHint: 'Unchecking only omits a task from the confirmed list; scheduling still follows due dates.',
|
|
593
|
+
reflectionPlaceholder: 'Where did today go? What got stuck?',
|
|
594
|
+
next: 'Next',
|
|
595
|
+
back: 'Back',
|
|
596
|
+
submit: 'Save review',
|
|
597
|
+
submitting: 'Saving…',
|
|
598
|
+
later: 'Later',
|
|
599
|
+
close: 'Close',
|
|
600
|
+
periodWeekTitle: 'Week review',
|
|
601
|
+
periodMonthTitle: 'Month review',
|
|
602
|
+
periodSub: '{from} — {to} · summarized automatically; add your reflection',
|
|
603
|
+
periodReflectionPlaceholder: 'How did you use your time?',
|
|
604
|
+
periodPlanPlaceholder: 'What to adjust next week / month (saved with the review)',
|
|
605
|
+
periodSave: 'Save review',
|
|
606
|
+
statsDone: '{n} h done',
|
|
607
|
+
statsPlanned: '{n} h planned',
|
|
608
|
+
statsStages: '{n} stages done',
|
|
609
|
+
noReasons: 'No slip reasons recorded',
|
|
610
|
+
settingsTitle: 'Scheduling settings',
|
|
611
|
+
reviewTime: 'Evening review time',
|
|
612
|
+
morningTime: 'Morning reminder time',
|
|
613
|
+
weekly: 'Hours available per week',
|
|
614
|
+
maxHigh: 'High-priority tasks per day',
|
|
615
|
+
saveSettings: 'Save settings',
|
|
616
|
+
saved: 'Saved',
|
|
617
|
+
dow0: 'Sun',
|
|
618
|
+
dow1: 'Mon',
|
|
619
|
+
dow2: 'Tue',
|
|
620
|
+
dow3: 'Wed',
|
|
621
|
+
dow4: 'Thu',
|
|
622
|
+
dow5: 'Fri',
|
|
623
|
+
dow6: 'Sat',
|
|
624
|
+
typePaper: 'Paper',
|
|
625
|
+
typeExam: 'English exam',
|
|
626
|
+
typeReport: 'Presentation',
|
|
627
|
+
typeAdmin: 'Errand',
|
|
628
|
+
typeOther: 'Other',
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
const CSS = `
|
|
632
|
+
.sp-root{height:100%;overflow:auto;background:var(--dsw-alias-bg-base);color:var(--dsw-alias-label-primary);font-size:13px;line-height:1.5;padding:calc(var(--dsh-frame-top-clearance,0px) + 16px) 28px 48px;box-sizing:border-box}
|
|
633
|
+
.sp-inner{max-width:1120px;margin:0 auto}
|
|
634
|
+
.sp-head{display:flex;align-items:flex-start;gap:12px;margin-bottom:16px}
|
|
635
|
+
.sp-title{font-size:20px;font-weight:600}
|
|
636
|
+
.sp-title-row{display:flex;align-items:center;gap:10px;min-width:0}
|
|
637
|
+
.sp-title-bird{width:32px;height:32px;flex:none;object-fit:contain;display:block}
|
|
638
|
+
.sp-sub{color:var(--dsw-alias-label-tertiary);font-size:12px;margin-top:2px}
|
|
639
|
+
.sp-tabs{display:flex;gap:2px;border-bottom:1px solid var(--dsw-alias-border-l2);margin-bottom:16px;flex-wrap:wrap}
|
|
640
|
+
.sp-tab{appearance:none;border:0;background:transparent;color:var(--dsw-alias-label-secondary);padding:8px 12px;border-radius:8px 8px 0 0;cursor:pointer;font-size:13px}
|
|
641
|
+
.sp-tab:hover{background:var(--dsw-alias-interactive-bg-hover)}
|
|
642
|
+
.sp-tab{cursor:grab}
|
|
643
|
+
.sp-tab:active{cursor:grabbing}
|
|
644
|
+
.sp-tab[data-dragging='1']{opacity:.4}
|
|
645
|
+
.sp-tab[data-on='1']{color:var(--dsw-alias-label-primary);font-weight:600;box-shadow:inset 0 -2px 0 var(--dsw-alias-brand-primary)}
|
|
646
|
+
.sp-tab-order-hint{margin-left:auto;align-self:center;font-size:11px;color:var(--dsw-alias-label-tertiary);cursor:default;white-space:nowrap}
|
|
647
|
+
.sp-card{background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);border-radius:12px;padding:14px;margin-bottom:12px}
|
|
648
|
+
.sp-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
|
|
649
|
+
.sp-grow{flex:1;min-width:0}
|
|
650
|
+
.sp-muted{color:var(--dsw-alias-label-tertiary);font-size:12px}
|
|
651
|
+
.sp-input,.sp-select{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-primary);border-radius:8px;padding:6px 8px;font-size:13px;min-width:0;box-sizing:border-box}
|
|
652
|
+
.sp-input:focus,.sp-select:focus{outline:2px solid var(--dsw-alias-brand-primary);outline-offset:-1px}
|
|
653
|
+
.sp-btn{appearance:none;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);border-radius:8px;padding:5px 10px;font-size:12px;cursor:pointer;white-space:nowrap}
|
|
654
|
+
.sp-btn:hover{background:var(--dsw-alias-interactive-bg-hover)}
|
|
655
|
+
.sp-btn:disabled{opacity:.55;cursor:default}
|
|
656
|
+
.sp-btn[data-kind='primary']{background:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-label-primary-foreground);border-color:transparent}
|
|
657
|
+
.sp-btn[data-kind='primary']:hover{background:var(--dsw-alias-button-primary-hover)}
|
|
658
|
+
.sp-btn[data-kind='danger']{color:var(--dsw-alias-state-error-primary)}
|
|
659
|
+
.sp-btn[data-kind='ghost']{border-color:transparent;background:transparent;color:var(--dsw-alias-label-secondary)}
|
|
660
|
+
.sp-btn[data-kind='ghost']:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
|
|
661
|
+
.sp-chip{display:inline-flex;align-items:center;gap:4px;border-radius:999px;padding:1px 8px;font-size:11px;background:var(--dsw-alias-bg-layer-3);color:var(--dsw-alias-label-secondary);white-space:nowrap}
|
|
662
|
+
.sp-chip[data-tone='high']{background:var(--dsw-alias-state-warn-primary);color:var(--dsw-alias-label-on-color)}
|
|
663
|
+
.sp-chip[data-tone='done']{background:var(--dsw-alias-state-success-tertiary);color:var(--dsw-alias-state-success-primary)}
|
|
664
|
+
.sp-chip[data-tone='danger']{background:var(--dsw-alias-interactive-bg-hover-danger);color:var(--dsw-alias-state-error-primary)}
|
|
665
|
+
.sp-item{display:flex;gap:10px;align-items:flex-start;padding:8px 2px;border-top:1px solid var(--dsw-alias-border-l1)}
|
|
666
|
+
.sp-item:first-child{border-top:0}
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
.sp-level-legend{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:6px;margin:-4px 0 12px}
|
|
670
|
+
.sp-level-item{display:flex;align-items:center;gap:7px;padding:6px 8px;border:1px solid var(--dsw-alias-border-l1);border-radius:8px;background:var(--dsw-alias-bg-layer-1);min-width:0}
|
|
671
|
+
.sp-level-key{width:20px;height:20px;border-radius:6px;display:grid;place-items:center;font-size:11px;font-weight:700;flex:none;color:#3F3129;background:#7F8B6C}
|
|
672
|
+
.sp-level-key[data-level='A']{background:#C99A5B}
|
|
673
|
+
.sp-level-key[data-level='B']{background:#7F8B6C}
|
|
674
|
+
.sp-level-key[data-level='C']{background:transparent;border:1px solid #C99A5B;box-sizing:border-box;color:#C99A5B}
|
|
675
|
+
.sp-level-key[data-level='D']{background:#3F3129}
|
|
676
|
+
.sp-level-text{font-size:11.5px;color:var(--dsw-alias-label-secondary);line-height:1.35;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
677
|
+
.sp-task-item{gap:9px}
|
|
678
|
+
.sp-task-body{min-width:0}
|
|
679
|
+
.sp-task-line{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-width:0}
|
|
680
|
+
.sp-task-title{font-size:13.5px;font-weight:500;line-height:1.45;overflow-wrap:anywhere}
|
|
681
|
+
.sp-task-meta{display:flex;flex-wrap:wrap;gap:4px 10px;margin-top:4px;color:var(--dsw-alias-label-tertiary);font-size:12px}
|
|
682
|
+
.sp-task-date{font-variant-numeric:tabular-nums;color:var(--dsw-alias-label-secondary)}
|
|
683
|
+
.sp-task-hours{font-variant-numeric:tabular-nums}
|
|
684
|
+
|
|
685
|
+
.sp-slot-row{display:flex;flex-wrap:wrap;align-items:center;gap:5px}
|
|
686
|
+
.sp-slot{appearance:none;border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-secondary);border-radius:6px;padding:3px 6px;font-size:11px;cursor:pointer;font-variant-numeric:tabular-nums}
|
|
687
|
+
.sp-slot:hover{border-color:var(--dsw-alias-brand-primary);color:var(--dsw-alias-label-primary)}
|
|
688
|
+
.sp-task-actions{display:flex;flex-wrap:wrap;gap:2px 4px;margin-top:4px}
|
|
689
|
+
.sp-task-actions .sp-btn{padding:3px 6px;font-size:11.5px}
|
|
690
|
+
.sp-task-editor{display:flex;flex-direction:column;gap:8px;padding:2px 0 4px}
|
|
691
|
+
.sp-task-edit-row{display:flex;flex-wrap:wrap;gap:8px;align-items:flex-end}
|
|
692
|
+
.sp-task-field{display:flex;flex-direction:column;gap:3px;min-width:0}
|
|
693
|
+
.sp-task-label{font-size:11px;color:var(--dsw-alias-label-tertiary)}
|
|
694
|
+
.sp-tab[data-honor='1'][data-on='1']{box-shadow:inset 0 -2px 0 #C99A5B;color:#C99A5B}
|
|
695
|
+
.sp-honors{border-left:3px solid #C99A5B}
|
|
696
|
+
.sp-honor-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px;margin-top:10px}
|
|
697
|
+
.sp-honor-card{display:flex;gap:11px;align-items:center;padding:11px 12px;border:1px solid var(--dsw-alias-border-l2);border-left:3px solid #C99A5B;border-radius:10px;background:var(--dsw-alias-bg-layer-1)}
|
|
698
|
+
.sp-honor-medal{width:42px;height:42px;flex:none;display:grid;place-items:center}
|
|
699
|
+
.sp-honor-medal svg,.sp-honor-img{display:block;width:42px;height:42px}
|
|
700
|
+
.sp-honor-img{object-fit:contain}
|
|
701
|
+
.sp-honor-name{font-weight:600;font-size:13px;line-height:1.35;overflow-wrap:anywhere}
|
|
702
|
+
.sp-honor-meta{color:var(--dsw-alias-label-tertiary);font-size:11.5px;margin-top:3px}
|
|
703
|
+
.sp-honor-badge{font-size:10.5px;color:#C99A5B;margin-top:3px}
|
|
704
|
+
.sp-review-advice{margin-top:10px;padding:10px 12px;border-radius:10px;border:1px solid var(--dsw-alias-border-l2);border-left:3px solid #C99A5B;background:var(--dsw-alias-bg-layer-2)}
|
|
705
|
+
.sp-review-advice-title{font-weight:600;font-size:12.5px;color:#C99A5B;margin-bottom:5px}
|
|
706
|
+
.sp-review-advice ul{margin:0;padding-left:18px;color:var(--dsw-alias-label-secondary);font-size:12.5px;line-height:1.65}
|
|
707
|
+
.sp-session-list{display:flex;flex-direction:column;gap:7px;margin-top:12px}
|
|
708
|
+
.sp-session-row{display:flex;align-items:center;gap:10px;padding:9px 10px;border:1px solid var(--dsw-alias-border-l2);border-radius:9px}
|
|
709
|
+
.sp-session-row .sp-grow{min-width:0}
|
|
710
|
+
.sp-session-row{background:var(--dsw-alias-bg-layer-1);color:var(--dsw-alias-label-primary);text-align:left;font:inherit;cursor:pointer}
|
|
711
|
+
.sp-session-row[data-selected='1']{border-color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-2)}
|
|
712
|
+
.sp-session-mark{font-size:11px;color:var(--dsw-alias-label-tertiary);white-space:nowrap}
|
|
713
|
+
.sp-session-row[data-selected='1'] .sp-session-mark{color:var(--dsw-alias-brand-primary);font-weight:600}
|
|
714
|
+
.sp-session-name{font-weight:500;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
715
|
+
.sp-session-sub{font-size:11.5px;color:var(--dsw-alias-label-tertiary);margin-top:2px}
|
|
716
|
+
.sp-check{width:16px;height:16px;margin-top:2px;accent-color:var(--dsw-alias-brand-primary);flex:none}
|
|
717
|
+
.sp-bar{height:6px;border-radius:999px;background:var(--dsw-alias-bg-skeleton);overflow:hidden}
|
|
718
|
+
.sp-bar>i{display:block;height:100%;background:var(--dsw-alias-state-success-primary)}
|
|
719
|
+
.sp-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:12px}
|
|
720
|
+
.sp-empty{color:var(--dsw-alias-label-tertiary);text-align:center;padding:28px 8px}
|
|
721
|
+
.sp-err{color:var(--dsw-alias-state-error-primary);font-size:12px}
|
|
722
|
+
.sp-mask{position:fixed;inset:0;background:rgba(0,0,0,.46);display:flex;align-items:center;justify-content:center;z-index:1200;padding:24px;pointer-events:auto}
|
|
723
|
+
.sp-modal{background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);border-radius:16px;width:min(660px,100%);max-height:86vh;overflow:auto;padding:20px;box-shadow:0 24px 64px rgba(0,0,0,.3);box-sizing:border-box}
|
|
724
|
+
.sp-modal:focus{outline:none}
|
|
725
|
+
.sp-modal-head{display:flex;align-items:flex-start;gap:10px;margin-bottom:10px}
|
|
726
|
+
.sp-modal h3{margin:0;font-size:16px}
|
|
727
|
+
.sp-x{appearance:none;border:0;background:transparent;color:var(--dsw-alias-label-tertiary);font-size:18px;cursor:pointer;line-height:1;padding:2px 4px;border-radius:6px}
|
|
728
|
+
.sp-x:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}
|
|
729
|
+
.sp-field{display:flex;flex-direction:column;gap:4px;margin-bottom:8px}
|
|
730
|
+
.sp-label{font-size:12px;color:var(--dsw-alias-label-secondary)}
|
|
731
|
+
.sp-cap-summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px;margin-top:12px}
|
|
732
|
+
.sp-cap-box{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);border-radius:10px;padding:10px}
|
|
733
|
+
.sp-cap-label{font-size:11px;color:var(--dsw-alias-label-tertiary)}
|
|
734
|
+
.sp-cap-value{font-size:18px;font-weight:600;margin:2px 0;font-family:'SFMono-Regular',Menlo,monospace}
|
|
735
|
+
.sp-cap-wrap{max-height:62vh;overflow:auto;border-radius:10px}
|
|
736
|
+
.sp-cap-table{width:100%;border-collapse:separate;border-spacing:0;font-size:12.5px}
|
|
737
|
+
.sp-cap-table th{position:sticky;top:0;z-index:1;background:var(--dsw-alias-bg-layer-2);text-align:left;font-weight:500;color:var(--dsw-alias-label-tertiary);font-size:11px;padding:8px 10px;border-bottom:1px solid var(--dsw-alias-border-l2);white-space:nowrap}
|
|
738
|
+
.sp-cap-table td{padding:7px 10px;border-bottom:1px solid var(--dsw-alias-border-l1);vertical-align:top}
|
|
739
|
+
.sp-cap-table tr[data-over='1'] td{background:var(--dsw-alias-interactive-bg-hover-danger)}
|
|
740
|
+
.sp-cap-date{font-family:'SFMono-Regular',Menlo,monospace;font-size:11.5px;color:var(--dsw-alias-label-secondary);white-space:nowrap}
|
|
741
|
+
.sp-cap-load,.sp-cap-left{font-family:'SFMono-Regular',Menlo,monospace;font-size:11.5px;white-space:nowrap}
|
|
742
|
+
.sp-cap-left[data-tone='ok']{color:var(--dsw-alias-state-success-primary)}
|
|
743
|
+
.sp-cap-left[data-tone='full']{color:var(--dsw-alias-state-warn-label)}
|
|
744
|
+
.sp-cap-left[data-tone='danger']{color:var(--dsw-alias-state-error-primary);font-weight:600}
|
|
745
|
+
.sp-cap-content{color:var(--dsw-alias-label-secondary);line-height:1.5}
|
|
746
|
+
.sp-cap-buffer{display:inline-block;margin-left:6px;padding:0 5px;border-radius:99px;font-size:10px;background:var(--dsw-alias-state-warn-primary);color:var(--dsw-alias-label-on-color);vertical-align:1px}
|
|
747
|
+
.sp-stage{display:flex;align-items:center;gap:8px;padding:5px 0;border-top:1px solid var(--dsw-alias-border-l1)}
|
|
748
|
+
.sp-stage:first-child{border-top:0}
|
|
749
|
+
.sp-dot{width:7px;height:7px;border-radius:50%;background:var(--dsw-alias-border-l4);flex:none}
|
|
750
|
+
.sp-dot[data-done='1']{background:var(--dsw-alias-state-success-primary)}
|
|
751
|
+
.sp-welcome-body{font-size:14px;line-height:1.75;color:var(--dsw-alias-label-secondary)}
|
|
752
|
+
.sp-welcome-format{margin-top:12px;border-left:3px solid var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-2);border-radius:0 10px 10px 0;padding:10px 12px}
|
|
753
|
+
.sp-welcome-label{font-size:13px;font-weight:600;color:var(--dsw-alias-label-primary)}
|
|
754
|
+
.sp-welcome-example{margin-top:5px;font-size:12.5px;line-height:1.6;color:var(--dsw-alias-label-secondary)}
|
|
755
|
+
.sp-float{position:fixed;right:18px;bottom:92px;z-index:900;pointer-events:auto;width:300px;background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);border-radius:14px;box-shadow:0 14px 36px rgba(0,0,0,.2);overflow:hidden;font-size:12px}
|
|
756
|
+
.sp-float[data-open='0']{width:auto}
|
|
757
|
+
.sp-float-head{display:flex;align-items:center;gap:8px;width:100%;border:0;background:transparent;color:var(--dsw-alias-label-primary);padding:8px 10px;cursor:pointer;font-size:12px;text-align:left}
|
|
758
|
+
.sp-float-dot{width:22px;height:22px;border-radius:7px;background:var(--dsw-alias-brand-primary);color:var(--dsw-alias-label-primary-foreground);display:grid;place-items:center;font-size:10px;font-weight:600;flex:none}
|
|
759
|
+
.sp-float-title{font-weight:600;flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
760
|
+
.sp-float-chevron{color:var(--dsw-alias-label-tertiary);font-size:14px}
|
|
761
|
+
.sp-float-body{padding:0 12px 12px;border-top:1px solid var(--dsw-alias-border-l1)}
|
|
762
|
+
.sp-float-hello{margin-top:10px;line-height:1.6;color:var(--dsw-alias-label-primary)}
|
|
763
|
+
.sp-float-prompt{margin-top:8px;padding:7px 8px;background:var(--dsw-alias-bg-layer-2);border-radius:8px;color:var(--dsw-alias-label-secondary);font-size:11.5px;line-height:1.5}
|
|
764
|
+
.sp-fish-btn{display:grid;place-items:center;width:32px;height:32px;padding:0;margin-right:4px;border:0;border-radius:8px;background:transparent;cursor:pointer;color:inherit;flex:none}
|
|
765
|
+
.sp-bird-img{display:block;width:30px;height:30px;border-radius:0;flex:none}
|
|
766
|
+
.sp-fish-btn:hover{background:var(--dsw-alias-interactive-bg-hover)}
|
|
767
|
+
.sp-fish-mask{position:fixed;left:0;right:0;bottom:0;top:calc(var(--dsh-frame-top-clearance,48px) + 48px);z-index:940;background:transparent;pointer-events:auto}
|
|
768
|
+
.sp-fish-pop{position:fixed;z-index:950;max-width:calc(100vw - 16px);max-height:min(340px,70vh);overflow:auto;pointer-events:auto;background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);border-radius:12px;box-shadow:0 16px 40px rgba(0,0,0,.22);padding:10px;box-sizing:border-box;font-size:12.5px;color:var(--dsw-alias-label-primary)}
|
|
769
|
+
.sp-fish-pop-head{display:flex;align-items:flex-start;gap:8px;padding-bottom:6px;border-bottom:1px solid var(--dsw-alias-border-l1);margin-bottom:4px}
|
|
770
|
+
.sp-fish-item{display:flex;align-items:center;gap:8px;padding:6px 2px;border-top:1px solid var(--dsw-alias-border-l1);cursor:pointer}
|
|
771
|
+
.sp-fish-item:first-of-type{border-top:0}
|
|
772
|
+
.sp-fish-empty{padding:12px 4px;color:var(--dsw-alias-label-tertiary);text-align:center}
|
|
773
|
+
.sp-fish-foot{margin-top:6px;padding-top:6px;border-top:1px dashed var(--dsw-alias-border-l1);font-size:10.5px;color:var(--dsw-alias-label-tertiary)}
|
|
774
|
+
.sp-greeting{margin:0 0 8px;padding:12px;border:1px solid var(--dsw-alias-border-l2);border-radius:12px;background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);font-size:12.5px;line-height:1.65}
|
|
775
|
+
.sp-greeting-title{font-weight:600;font-size:13.5px}
|
|
776
|
+
.sp-greeting-body{margin-top:3px;color:var(--dsw-alias-label-secondary)}
|
|
777
|
+
.sp-greeting-format{margin-top:8px;padding:7px 9px;border-left:3px solid var(--dsw-alias-brand-primary);background:var(--dsw-alias-bg-layer-1);border-radius:0 8px 8px 0;color:var(--dsw-alias-label-secondary)}
|
|
778
|
+
.sp-greeting-example{margin-top:5px;font-size:11.5px;color:var(--dsw-alias-label-tertiary)}
|
|
779
|
+
.sp-greeting-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:9px}
|
|
780
|
+
.sp-banner{position:fixed;top:calc(var(--dsh-frame-top-clearance,48px) + 12px);right:18px;width:min(380px,calc(100vw - 36px));z-index:1100;pointer-events:auto;background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);border-left:3px solid var(--dsw-alias-brand-primary);border-radius:14px;padding:12px;box-shadow:0 16px 40px rgba(0,0,0,.24);box-sizing:border-box}
|
|
781
|
+
.sp-reflect{white-space:pre-wrap}
|
|
782
|
+
@media (max-width:700px){.sp-cap-summary{grid-template-columns:1fr}.sp-cap-wrap{max-height:none}}
|
|
783
|
+
/* --- Three-color visual system: bird amber / leaf olive / pen dark brown --- */
|
|
784
|
+
.sp-tab[data-on='1']{box-shadow:inset 0 -2px 0 #C99A5B}
|
|
785
|
+
.sp-tab[data-honor='1'][data-on='1']{box-shadow:inset 0 -2px 0 #C99A5B;color:#C99A5B}
|
|
786
|
+
.sp-input:focus,.sp-select:focus{outline:2px solid #C99A5B}
|
|
787
|
+
.sp-btn[data-kind='primary']{background:#3F3129;color:#C99A5B;border-color:#C99A5B}
|
|
788
|
+
.sp-btn[data-kind='primary']:hover{background:#3F3129}
|
|
789
|
+
.sp-btn[data-kind='danger']{background:#3F3129;color:#C99A5B;border-color:#3F3129}
|
|
790
|
+
.sp-btn[data-kind='danger']:hover{background:#3F3129}
|
|
791
|
+
.sp-chip{background:rgba(201,154,91,.12);color:#C99A5B}
|
|
792
|
+
.sp-chip[data-tone='high']{background:#C99A5B;color:#3F3129}
|
|
793
|
+
.sp-chip[data-tone='done']{background:#7F8B6C;color:#3F3129}
|
|
794
|
+
.sp-chip[data-tone='danger']{background:#3F3129;color:#C99A5B;border:1px solid #C99A5B}
|
|
795
|
+
.sp-level-key{color:#3F3129;background:#7F8B6C}
|
|
796
|
+
.sp-level-key[data-level='A']{background:#C99A5B;color:#3F3129}
|
|
797
|
+
.sp-level-key[data-level='B']{background:#7F8B6C;color:#3F3129}
|
|
798
|
+
.sp-level-key[data-level='C']{background:transparent;color:#C99A5B;border:1px solid #C99A5B;box-sizing:border-box}
|
|
799
|
+
.sp-level-key[data-level='D']{background:#3F3129;color:#C99A5B}
|
|
800
|
+
.sp-honors{border-left:3px solid #C99A5B}
|
|
801
|
+
.sp-honor-card{border-left:3px solid #C99A5B}
|
|
802
|
+
.sp-honor-badge{color:#C99A5B}
|
|
803
|
+
.sp-review-advice{border-left:3px solid #C99A5B}
|
|
804
|
+
.sp-review-advice-title{color:#C99A5B}
|
|
805
|
+
.sp-session-row[data-selected='1']{border-color:#C99A5B;background:rgba(201,154,91,.08)}
|
|
806
|
+
.sp-session-row[data-selected='1'] .sp-session-mark{color:#C99A5B}
|
|
807
|
+
.sp-check{accent-color:#C99A5B}
|
|
808
|
+
.sp-slot:hover{border-color:#C99A5B}
|
|
809
|
+
.sp-bar{background:rgba(201,154,91,.16)}
|
|
810
|
+
.sp-bar>i{background:#7F8B6C}
|
|
811
|
+
.sp-err{color:#C99A5B}
|
|
812
|
+
.sp-cap-left[data-tone='ok']{color:#7F8B6C}
|
|
813
|
+
.sp-cap-left[data-tone='full']{color:#C99A5B}
|
|
814
|
+
.sp-cap-left[data-tone='danger']{color:#C99A5B;font-weight:600}
|
|
815
|
+
.sp-cap-table tr[data-over='1'] td{background:rgba(201,154,91,.12)}
|
|
816
|
+
.sp-cap-buffer{background:#C99A5B;color:#3F3129}
|
|
817
|
+
.sp-dot{background:rgba(201,154,91,.28)}
|
|
818
|
+
.sp-dot[data-done='1']{background:#7F8B6C}
|
|
819
|
+
.sp-welcome-format{border-left:3px solid #C99A5B}
|
|
820
|
+
.sp-float-dot{background:#3F3129;color:#C99A5B}
|
|
821
|
+
.sp-greeting-format{border-left:3px solid #C99A5B}
|
|
822
|
+
.sp-banner{border-left:3px solid #C99A5B}
|
|
823
|
+
|
|
824
|
+
/* --- Song-inspired quiet layer: paper, hairline, muted seal colors --- */
|
|
825
|
+
.sp-card{border-radius:6px;box-shadow:none}
|
|
826
|
+
.sp-level-legend{display:flex;flex-wrap:wrap;gap:4px 20px;margin:0 0 10px;padding:0 0 9px;border-bottom:1px solid var(--dsw-alias-border-l1);background:transparent}
|
|
827
|
+
.sp-level-item{background:transparent;border:0;border-radius:0;padding:1px 0;gap:6px}
|
|
828
|
+
.sp-level-key{width:18px;height:18px;border-radius:2px;background:transparent;border:1px solid currentColor;font-size:10px;font-weight:500}
|
|
829
|
+
.sp-level-key[data-level='A']{background:transparent;color:#C99A5B;border-color:#C99A5B}
|
|
830
|
+
.sp-level-key[data-level='B']{background:transparent;color:#7F8B6C;border-color:#7F8B6C}
|
|
831
|
+
.sp-level-key[data-level='C']{background:transparent;color:#C99A5B;border-color:#3F3129}
|
|
832
|
+
.sp-level-key[data-level='D']{background:#3F3129;color:#C99A5B;border-color:#3F3129}
|
|
833
|
+
.sp-level-text{font-size:11px;white-space:normal;line-height:1.4;color:var(--dsw-alias-label-secondary)}
|
|
834
|
+
.sp-tab[data-on='1']{box-shadow:inset 0 -1px 0 #C99A5B}
|
|
835
|
+
.sp-tab[data-honor='1'][data-on='1']{box-shadow:inset 0 -1px 0 #C99A5B;color:#C99A5B}
|
|
836
|
+
.sp-chip{background:transparent;color:var(--dsw-alias-label-secondary);padding-left:0;padding-right:0}
|
|
837
|
+
.sp-chip[data-tone='high']{background:transparent;color:#C99A5B}
|
|
838
|
+
.sp-chip[data-tone='done']{background:transparent;color:#7F8B6C}
|
|
839
|
+
.sp-chip[data-tone='danger']{background:transparent;color:#C99A5B;border:0;text-decoration:underline;text-decoration-color:#3F3129;text-underline-offset:3px}
|
|
840
|
+
.sp-btn{border-radius:3px}
|
|
841
|
+
.sp-btn[data-kind='primary']{background:transparent;color:var(--dsw-alias-label-primary);border-color:#C99A5B}
|
|
842
|
+
.sp-btn[data-kind='primary']:hover{background:rgba(201,154,91,.10)}
|
|
843
|
+
.sp-btn[data-kind='danger']{background:transparent;color:#C99A5B;border-color:transparent;text-decoration:underline;text-decoration-color:rgba(201,154,91,.55);text-underline-offset:3px}
|
|
844
|
+
.sp-btn[data-kind='danger']:hover{background:rgba(201,154,91,.08)}
|
|
845
|
+
.sp-input:focus,.sp-select:focus{outline:1px solid #C99A5B;outline-offset:-1px}
|
|
846
|
+
.sp-bar{height:3px;background:rgba(63,49,41,.12)}
|
|
847
|
+
.sp-bar>i{background:#7F8B6C}
|
|
848
|
+
.sp-slot:hover{border-color:#C99A5B}
|
|
849
|
+
.sp-check{accent-color:#C99A5B}
|
|
850
|
+
.sp-err{color:#C99A5B}
|
|
851
|
+
.sp-cap-table tr[data-over='1'] td{background:rgba(201,154,91,.07)}
|
|
852
|
+
.sp-cap-buffer{background:transparent;color:#C99A5B;border:1px solid rgba(201,154,91,.55)}
|
|
853
|
+
.sp-dot{background:rgba(63,49,41,.18)}
|
|
854
|
+
.sp-dot[data-done='1']{background:#7F8B6C}
|
|
855
|
+
.sp-honors{border-left:0}
|
|
856
|
+
.sp-honor-card{border:0;border-left:1px solid #C99A5B;border-radius:0;background:transparent;padding:4px 9px}
|
|
857
|
+
.sp-honor-badge{color:#C99A5B}
|
|
858
|
+
.sp-review-advice{border:0;border-left:1px solid #C99A5B;border-radius:0;background:transparent;padding:6px 0 0 10px}
|
|
859
|
+
.sp-review-advice-title{color:#C99A5B}
|
|
860
|
+
.sp-session-row[data-selected='1']{border-color:#C99A5B;background:rgba(201,154,91,.06)}
|
|
861
|
+
.sp-session-row[data-selected='1'] .sp-session-mark{color:#C99A5B}
|
|
862
|
+
.sp-float-dot{background:transparent;color:#C99A5B;border:1px solid #C99A5B}
|
|
863
|
+
.sp-welcome-format{border-left:1px solid #C99A5B}
|
|
864
|
+
.sp-greeting-format{border-left:1px solid #C99A5B}
|
|
865
|
+
.sp-banner{border-left:1px solid #C99A5B}
|
|
866
|
+
.sp-title{font-family:'Songti SC','Noto Serif CJK SC','Source Han Serif SC',serif;font-weight:600;letter-spacing:.01em}
|
|
867
|
+
.sp-modal{border-radius:10px}
|
|
868
|
+
|
|
869
|
+
/* --- Paper themes: warm paper is the default; other grounds are switches --- */
|
|
870
|
+
.sp-root{
|
|
871
|
+
--sp-page:#F4F0E8; --sp-card:#FAF7F1; --sp-text:#3F3129; --sp-muted:rgba(63,49,41,.62); --sp-line:rgba(63,49,41,.14);
|
|
872
|
+
background:var(--sp-page); color:var(--sp-text);
|
|
873
|
+
--dsw-alias-bg-base:var(--sp-page);
|
|
874
|
+
--dsw-alias-bg-layer-1:var(--sp-card);
|
|
875
|
+
--dsw-alias-bg-layer-2:var(--sp-page);
|
|
876
|
+
--dsw-alias-label-primary:var(--sp-text);
|
|
877
|
+
--dsw-alias-label-secondary:var(--sp-muted);
|
|
878
|
+
--dsw-alias-label-tertiary:var(--sp-muted);
|
|
879
|
+
--dsw-alias-border-l1:var(--sp-line);
|
|
880
|
+
--dsw-alias-border-l2:rgba(63,49,41,.2);
|
|
881
|
+
--dsw-alias-label-primary-foreground:#F4F0E8;
|
|
882
|
+
}
|
|
883
|
+
.sp-root[data-paper='warm']{--sp-page:#F4F0E8;--sp-card:#FAF7F1;--sp-text:#3F3129;--sp-muted:rgba(63,49,41,.62);--sp-line:rgba(63,49,41,.14)}
|
|
884
|
+
.sp-root[data-paper='wuxin']{--sp-page:#BFD1B1;--sp-card:#F4F0E8;--sp-text:#3F3129;--sp-muted:rgba(63,49,41,.66);--sp-line:rgba(63,49,41,.2)}
|
|
885
|
+
.sp-root[data-paper='yubai']{--sp-page:#C9CFC1;--sp-card:#F4F0E8;--sp-text:#3F3129;--sp-muted:rgba(63,49,41,.66);--sp-line:rgba(63,49,41,.2)}
|
|
886
|
+
.sp-root[data-paper='quemei']{--sp-page:#788A6F;--sp-card:#F4F0E8;--sp-text:#F4F0E8;--sp-muted:rgba(244,240,232,.72);--sp-line:rgba(244,240,232,.26)}
|
|
887
|
+
.sp-root[data-paper='qinggu']{--sp-page:#B3BDA9;--sp-card:#F4F0E8;--sp-text:#3F3129;--sp-muted:rgba(63,49,41,.66);--sp-line:rgba(63,49,41,.2)}
|
|
888
|
+
.sp-modal{
|
|
889
|
+
--dsw-alias-label-primary:#3F3129; --dsw-alias-label-secondary:rgba(63,49,41,.62); --dsw-alias-label-tertiary:rgba(63,49,41,.62);
|
|
890
|
+
--dsw-alias-bg-layer-1:#FAF7F1; --dsw-alias-bg-layer-2:#F4F0E8; --dsw-alias-border-l1:rgba(63,49,41,.12); --dsw-alias-border-l2:rgba(63,49,41,.18);
|
|
891
|
+
background:#FAF7F1; color:#3F3129;
|
|
892
|
+
}
|
|
893
|
+
.sp-root[data-paper='quemei'] .sp-card{
|
|
894
|
+
--dsw-alias-label-primary:#3F3129; --dsw-alias-label-secondary:rgba(63,49,41,.62); --dsw-alias-label-tertiary:rgba(63,49,41,.62);
|
|
895
|
+
--dsw-alias-bg-layer-1:#FAF7F1; --dsw-alias-bg-layer-2:#F4F0E8; --dsw-alias-border-l1:rgba(63,49,41,.12); --dsw-alias-border-l2:rgba(63,49,41,.18);
|
|
896
|
+
}
|
|
897
|
+
.sp-banner,.sp-greeting,.sp-float,.sp-fish-pop{
|
|
898
|
+
--dsw-alias-label-primary:#3F3129; --dsw-alias-label-secondary:rgba(63,49,41,.62); --dsw-alias-label-tertiary:rgba(63,49,41,.62);
|
|
899
|
+
--dsw-alias-bg-layer-1:#FAF7F1; --dsw-alias-bg-layer-2:#F4F0E8; --dsw-alias-border-l1:rgba(63,49,41,.12); --dsw-alias-border-l2:rgba(63,49,41,.18);
|
|
900
|
+
background:#FAF7F1; color:#3F3129;
|
|
901
|
+
}
|
|
902
|
+
.sp-paper-picker{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
|
|
903
|
+
.sp-paper-choice{display:inline-flex;align-items:center;gap:6px;padding:4px 8px;border:1px solid rgba(63,49,41,.18);border-radius:3px;background:transparent;color:#3F3129;font:inherit;font-size:11px;cursor:pointer}
|
|
904
|
+
.sp-paper-choice[data-on='1']{border-color:#C99A5B;box-shadow:inset 0 0 0 1px rgba(201,154,91,.35)}
|
|
905
|
+
.sp-paper-dot{width:13px;height:13px;border-radius:1px;display:inline-block;border:1px solid rgba(63,49,41,.22)}
|
|
906
|
+
|
|
907
|
+
.sp-level-item{position:relative;cursor:help;outline:none}
|
|
908
|
+
.sp-level-item::after{content:attr(data-tip);position:absolute;left:0;top:calc(100% + 9px);z-index:40;width:300px;max-width:calc(100vw - 56px);padding:10px 12px;border:1px solid rgba(63,49,41,.2);border-radius:4px;background:#FAF7F1;color:#3F3129;font-size:11.5px;line-height:1.65;text-align:left;box-shadow:0 8px 22px rgba(63,49,41,.12);opacity:0;visibility:hidden;transform:translateY(-3px);transition:opacity .16s ease,transform .16s ease,visibility .16s;pointer-events:none;white-space:normal}
|
|
909
|
+
.sp-level-item:hover::after,.sp-level-item:focus-visible::after{opacity:1;visibility:visible;transform:none}
|
|
910
|
+
.sp-level-item:last-child::after{left:auto;right:0}
|
|
911
|
+
@media (max-width:760px){.sp-level-item::after{display:none}}
|
|
912
|
+
|
|
913
|
+
.sp-stage.sp-review-item{align-items:flex-start}
|
|
914
|
+
.sp-review-item.sp-review-check-row{display:flex;align-items:flex-start;gap:8px;padding:6px 0;border-top:1px solid var(--sp-line)}
|
|
915
|
+
.sp-review-item.sp-review-check-row:first-of-type{border-top:0}
|
|
916
|
+
.sp-review-main{flex:1 1 220px;min-width:0}
|
|
917
|
+
.sp-review-title{font-size:13px;line-height:1.65;word-break:normal;overflow-wrap:anywhere;white-space:normal}
|
|
918
|
+
.sp-review-meta{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:4px;font-size:12px;color:var(--sp-muted)}
|
|
919
|
+
.sp-review-note{flex-basis:100%;font-size:12px;line-height:1.6;color:var(--sp-muted)}
|
|
920
|
+
.sp-morning-task{padding:5px 0;border-top:1px solid var(--sp-line)}
|
|
921
|
+
.sp-morning-task:first-of-type{border-top:0}
|
|
922
|
+
.sp-morning-title{font-size:12.5px;line-height:1.6;white-space:normal;overflow-wrap:anywhere}
|
|
923
|
+
.sp-morning-meta{margin-top:2px;font-size:11px;line-height:1.5;color:var(--sp-muted)}
|
|
924
|
+
.sp-inline-field{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-bottom:8px;min-width:0;cursor:pointer}
|
|
925
|
+
.sp-inline-field .sp-check{margin:0}
|
|
926
|
+
.sp-inline-field .sp-muted{font-size:11.5px}
|
|
927
|
+
|
|
928
|
+
`
|
|
929
|
+
|
|
930
|
+
const fallbackT = (key, params) => {
|
|
931
|
+
let text = zh[key] ?? key
|
|
932
|
+
if (params) text = text.replace(/\{(\w+)\}/g, (match, name) => (name in params ? String(params[name]) : match))
|
|
933
|
+
return text
|
|
934
|
+
}
|
|
935
|
+
const LocaleContext = React.createContext(fallbackT)
|
|
936
|
+
const useT = () => React.useContext(LocaleContext)
|
|
937
|
+
|
|
938
|
+
const pad2 = (n) => String(n).padStart(2, '0')
|
|
939
|
+
const keyOf = (d) => `${d.getFullYear()}-${pad2(d.getMonth() + 1)}-${pad2(d.getDate())}`
|
|
940
|
+
const parseKey = (key) => {
|
|
941
|
+
const [y, m, d] = String(key).split('-').map(Number)
|
|
942
|
+
return new Date(y, (m || 1) - 1, d || 1)
|
|
943
|
+
}
|
|
944
|
+
const addKey = (key, n) => {
|
|
945
|
+
const d = parseKey(key)
|
|
946
|
+
d.setDate(d.getDate() + n)
|
|
947
|
+
return keyOf(d)
|
|
948
|
+
}
|
|
949
|
+
const nowKey = () => keyOf(new Date())
|
|
950
|
+
const hhmm = () => `${pad2(new Date().getHours())}:${pad2(new Date().getMinutes())}`
|
|
951
|
+
const dowKey = (key) => `dow${parseKey(key).getDay()}`
|
|
952
|
+
const periodKeys = (now) => {
|
|
953
|
+
const offset = (now.getDay() + 6) % 7
|
|
954
|
+
const monday = new Date(now)
|
|
955
|
+
monday.setDate(now.getDate() - offset)
|
|
956
|
+
const month = `${now.getFullYear()}-${pad2(now.getMonth() + 1)}`
|
|
957
|
+
return { week: `W:${keyOf(monday)}`, month: `M:${month}`, monday: keyOf(monday) }
|
|
958
|
+
}
|
|
959
|
+
const isLastDayOfMonth = (now) => new Date(now.getFullYear(), now.getMonth() + 1, 0).getDate() === now.getDate()
|
|
960
|
+
const round1 = (n) => Math.round(n * 100) / 100
|
|
961
|
+
|
|
962
|
+
const PAPER_THEMES = [
|
|
963
|
+
{ id: 'warm', labelKey: 'paperWarm', color: '#F4F0E8' },
|
|
964
|
+
{ id: 'wuxin', labelKey: 'paperWuxin', color: '#BFD1B1' },
|
|
965
|
+
{ id: 'yubai', labelKey: 'paperYubai', color: '#C9CFC1' },
|
|
966
|
+
{ id: 'quemei', labelKey: 'paperQuemei', color: '#788A6F' },
|
|
967
|
+
{ id: 'qinggu', labelKey: 'paperQinggu', color: '#B3BDA9' },
|
|
968
|
+
]
|
|
969
|
+
const normalizePaper = (value) => PAPER_THEMES.some((item) => item.id === value) ? value : 'warm'
|
|
970
|
+
|
|
971
|
+
function createStore() {
|
|
972
|
+
let view = { snap: null, err: '', loading: true, requested: null, fixedSessionId: readFlag('smart-planner-fixed-session', ''), sessionChoices: [], fishOpen: false, fishAnchor: null, paper: normalizePaper(readFlag('smart-planner-paper', 'warm')) }
|
|
973
|
+
const subs = new Set()
|
|
974
|
+
let inflight = null
|
|
975
|
+
const emit = () => { for (const fn of subs) fn() }
|
|
976
|
+
const patch = (next) => { view = { ...view, ...next }; emit() }
|
|
977
|
+
const read = async (path, body) => {
|
|
978
|
+
if (location.protocol === 'file:') throw new Error('请通过 Harness 的 Web 页面打开本插件。')
|
|
979
|
+
const res = await fetch(API + path, body === undefined ? { cache: 'no-store' } : {
|
|
980
|
+
method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify(body),
|
|
981
|
+
})
|
|
982
|
+
const data = await res.json().catch(() => ({}))
|
|
983
|
+
if (!res.ok) throw new Error(data.error || `HTTP ${res.status}`)
|
|
984
|
+
return data
|
|
985
|
+
}
|
|
986
|
+
return {
|
|
987
|
+
subscribe(fn) { subs.add(fn); return () => subs.delete(fn) },
|
|
988
|
+
get() { return view },
|
|
989
|
+
hasSubscribers() { return subs.size > 0 },
|
|
990
|
+
async refresh() {
|
|
991
|
+
if (inflight) return inflight
|
|
992
|
+
inflight = (async () => {
|
|
993
|
+
try {
|
|
994
|
+
const snap = await read('/state')
|
|
995
|
+
patch({ snap, err: '', loading: false })
|
|
996
|
+
} catch (error) {
|
|
997
|
+
patch({ err: error.message, loading: false })
|
|
998
|
+
} finally {
|
|
999
|
+
inflight = null
|
|
1000
|
+
}
|
|
1001
|
+
})()
|
|
1002
|
+
return inflight
|
|
1003
|
+
},
|
|
1004
|
+
async act(body) {
|
|
1005
|
+
const data = await read('/action', body)
|
|
1006
|
+
if (data.snapshot) patch({ snap: data.snapshot, err: '' })
|
|
1007
|
+
return data
|
|
1008
|
+
},
|
|
1009
|
+
request(kind) { patch({ requested: kind }) },
|
|
1010
|
+
clearRequest() { if (view.requested) patch({ requested: null }) },
|
|
1011
|
+
setFixed(id) { patch({ fixedSessionId: id || '', sessionChoices: [] }); if (id) writeFlag('smart-planner-fixed-session', id) },
|
|
1012
|
+
setSessionChoices(list) { patch({ sessionChoices: Array.isArray(list) ? list : [] }) },
|
|
1013
|
+
setFish(open, anchor) { patch({ fishOpen: Boolean(open), fishAnchor: open ? anchor : null }) },
|
|
1014
|
+
setPaper(paper) { const next = normalizePaper(paper); patch({ paper: next }); writeFlag('smart-planner-paper', next) },
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
function useView(store) {
|
|
1019
|
+
return useSyncExternalStore(store.subscribe, store.get, store.get)
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
function Btn(props) {
|
|
1023
|
+
const { kind, ...rest } = props
|
|
1024
|
+
return e('button', { ...rest, className: 'sp-btn', 'data-kind': kind || 'default' }, props.children)
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
function Bar({ value }) {
|
|
1028
|
+
return e('div', { className: 'sp-bar' }, e('i', { style: { width: `${Math.max(0, Math.min(100, value))}%` } }))
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
function typeLabel(t, snap, kind) {
|
|
1032
|
+
const key = `type${kind ? kind[0].toUpperCase() + kind.slice(1) : 'Other'}`
|
|
1033
|
+
return t(key, {}) === key ? (snap.types[kind]?.label || kind) : t(key)
|
|
1034
|
+
}
|
|
1035
|
+
|
|
1036
|
+
function Modal({ title, subtitle, onClose, children, width }) {
|
|
1037
|
+
const t = useT()
|
|
1038
|
+
const ref = useRef(null)
|
|
1039
|
+
const closeRef = useRef(onClose)
|
|
1040
|
+
closeRef.current = onClose
|
|
1041
|
+
useEffect(() => {
|
|
1042
|
+
const el = ref.current
|
|
1043
|
+
if (el) el.focus()
|
|
1044
|
+
const onKey = (ev) => {
|
|
1045
|
+
if (ev.key === 'Escape') { ev.preventDefault(); ev.stopPropagation(); closeRef.current() }
|
|
1046
|
+
if (ev.key === 'Tab' && el) {
|
|
1047
|
+
const nodes = [...el.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')]
|
|
1048
|
+
.filter((n) => !n.disabled && n.offsetParent !== null)
|
|
1049
|
+
if (!nodes.length) return
|
|
1050
|
+
const first = nodes[0]
|
|
1051
|
+
const last = nodes[nodes.length - 1]
|
|
1052
|
+
if (ev.shiftKey && document.activeElement === first) { ev.preventDefault(); last.focus() }
|
|
1053
|
+
else if (!ev.shiftKey && document.activeElement === last) { ev.preventDefault(); first.focus() }
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
document.addEventListener('keydown', onKey)
|
|
1057
|
+
return () => document.removeEventListener('keydown', onKey)
|
|
1058
|
+
}, [])
|
|
1059
|
+
return e('div', { className: 'sp-mask', onMouseDown: (ev) => { if (ev.target === ev.currentTarget) onClose() } },
|
|
1060
|
+
e('div', {
|
|
1061
|
+
className: 'sp-modal', role: 'dialog', 'aria-modal': 'true', 'aria-label': title,
|
|
1062
|
+
tabIndex: -1, ref, style: width ? { width } : null,
|
|
1063
|
+
},
|
|
1064
|
+
e('div', { className: 'sp-modal-head' },
|
|
1065
|
+
e('div', { className: 'sp-grow' },
|
|
1066
|
+
e('h3', null, title),
|
|
1067
|
+
subtitle ? e('div', { className: 'sp-muted', style: { marginTop: 2 } }, subtitle) : null,
|
|
1068
|
+
),
|
|
1069
|
+
e('button', { className: 'sp-x', onClick: onClose, 'aria-label': t('close') }, '✕'),
|
|
1070
|
+
),
|
|
1071
|
+
children),
|
|
1072
|
+
)
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
function freeSlots(snap, days = 14) {
|
|
1076
|
+
return (snap.capacity || []).filter((row) => row.date >= snap.today && row.remaining >= 0.25).slice(0, days).map((row) => ({ date: row.date, remaining: row.remaining }))
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
function TaskLine({ task, t, onToggle, onEdit, onPin, onDelete, showProject, slots = [] }) {
|
|
1080
|
+
const [mode, setMode] = useState('')
|
|
1081
|
+
const [title, setTitle] = useState(task.title)
|
|
1082
|
+
const [hours, setHours] = useState(task.hours)
|
|
1083
|
+
const pinnedDate = typeof task.pinned === 'string' ? task.pinned : ''
|
|
1084
|
+
const scheduledDate = task.date || pinnedDate
|
|
1085
|
+
const [date, setDate] = useState(scheduledDate || '')
|
|
1086
|
+
const [confirming, setConfirming] = useState(false)
|
|
1087
|
+
const percent = task.totalHours ? Math.round((task.doneHours / task.totalHours) * 100) : 0
|
|
1088
|
+
|
|
1089
|
+
useEffect(() => {
|
|
1090
|
+
setTitle(task.title)
|
|
1091
|
+
setHours(task.hours)
|
|
1092
|
+
setDate(scheduledDate || '')
|
|
1093
|
+
}, [task.taskId, task.title, task.hours, scheduledDate])
|
|
1094
|
+
|
|
1095
|
+
const saveTitle = async () => {
|
|
1096
|
+
const next = String(title || '').trim() || task.title
|
|
1097
|
+
await onEdit({ title: next, manual: false })
|
|
1098
|
+
setMode('')
|
|
1099
|
+
}
|
|
1100
|
+
const saveTime = async () => {
|
|
1101
|
+
const nextHours = Number(hours)
|
|
1102
|
+
await onEdit({ hours: Number.isFinite(nextHours) && nextHours > 0 ? nextHours : task.hours, manual: true })
|
|
1103
|
+
await onPin(date)
|
|
1104
|
+
setMode('')
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
const chips = e(React.Fragment, null,
|
|
1108
|
+
task.high ? e('span', { className: 'sp-chip', 'data-tone': 'high' }, t('high')) : null,
|
|
1109
|
+
task.partTotal > 1 ? e('span', { className: 'sp-chip' }, t('part', { n: task.part, m: task.partTotal })) : null,
|
|
1110
|
+
pinnedDate ? e('span', { className: 'sp-chip' }, t('pinned')) : null,
|
|
1111
|
+
task.done ? e('span', { className: 'sp-chip', 'data-tone': 'done' }, t('stageDone')) : null,
|
|
1112
|
+
)
|
|
1113
|
+
|
|
1114
|
+
return e('div', { className: 'sp-item sp-task-item' },
|
|
1115
|
+
e('input', {
|
|
1116
|
+
className: 'sp-check', type: 'checkbox', checked: Boolean(task.done),
|
|
1117
|
+
title: task.done ? t('save') : t('stageDone'),
|
|
1118
|
+
onChange: () => onToggle(!task.done),
|
|
1119
|
+
}),
|
|
1120
|
+
e('div', { className: 'sp-grow sp-task-body' },
|
|
1121
|
+
mode === 'title'
|
|
1122
|
+
? e('div', { className: 'sp-task-editor' },
|
|
1123
|
+
e('div', { className: 'sp-muted' }, t('editTitleHint')),
|
|
1124
|
+
e('div', { className: 'sp-task-edit-row' },
|
|
1125
|
+
e('label', { className: 'sp-task-field sp-grow' },
|
|
1126
|
+
e('span', { className: 'sp-task-label' }, t('titleLabel')),
|
|
1127
|
+
e('input', {
|
|
1128
|
+
className: 'sp-input sp-grow', value: title, autoFocus: true,
|
|
1129
|
+
onChange: (ev) => setTitle(ev.target.value),
|
|
1130
|
+
onKeyDown: (ev) => { if (ev.key === 'Enter') saveTitle() },
|
|
1131
|
+
})),
|
|
1132
|
+
e(Btn, { kind: 'primary', onClick: saveTitle }, t('save')),
|
|
1133
|
+
e(Btn, { kind: 'ghost', onClick: () => { setTitle(task.title); setMode('') } }, t('cancel')),
|
|
1134
|
+
),
|
|
1135
|
+
e('div', { className: 'sp-task-meta' },
|
|
1136
|
+
e('span', { className: 'sp-task-date' }, scheduledDate ? t('dateOn', { date: scheduledDate }) : t('autoScheduled')),
|
|
1137
|
+
e('span', { className: 'sp-task-hours' }, t('hoursText', { n: task.hours })),
|
|
1138
|
+
),
|
|
1139
|
+
)
|
|
1140
|
+
: mode === 'time'
|
|
1141
|
+
? e('div', { className: 'sp-task-editor' },
|
|
1142
|
+
e('div', { className: 'sp-task-line' },
|
|
1143
|
+
e('span', { className: 'sp-task-title' }, task.title),
|
|
1144
|
+
chips,
|
|
1145
|
+
),
|
|
1146
|
+
e('div', { className: 'sp-task-edit-row' },
|
|
1147
|
+
e('label', { className: 'sp-task-field' },
|
|
1148
|
+
e('span', { className: 'sp-task-label' }, t('dateLabel')),
|
|
1149
|
+
e('input', { className: 'sp-input', type: 'date', value: date, onChange: (ev) => setDate(ev.target.value) })),
|
|
1150
|
+
e('label', { className: 'sp-task-field' },
|
|
1151
|
+
e('span', { className: 'sp-task-label' }, t('durationLabel')),
|
|
1152
|
+
e('input', {
|
|
1153
|
+
className: 'sp-input', type: 'number', min: '0.25', step: '0.25', style: { width: 88 },
|
|
1154
|
+
value: hours, onChange: (ev) => setHours(Number(ev.target.value)),
|
|
1155
|
+
})),
|
|
1156
|
+
),
|
|
1157
|
+
e('div', { className: 'sp-slot-row' },
|
|
1158
|
+
e('span', { className: 'sp-task-label' }, t('freeSlots')),
|
|
1159
|
+
slots.length
|
|
1160
|
+
? slots.slice(0, 7).map((slot) => e('button', {
|
|
1161
|
+
key: slot.date, type: 'button', className: 'sp-slot',
|
|
1162
|
+
onClick: () => setDate(slot.date), title: t('freeSlot', { date: slot.date, n: round1(slot.remaining) }),
|
|
1163
|
+
}, t('freeSlot', { date: slot.date.slice(5), n: round1(slot.remaining) })))
|
|
1164
|
+
: e('span', { className: 'sp-muted' }, t('noFreeSlots')),
|
|
1165
|
+
),
|
|
1166
|
+
e('div', { className: 'sp-task-actions' },
|
|
1167
|
+
e(Btn, { kind: 'primary', onClick: saveTime }, t('saveTime')),
|
|
1168
|
+
e(Btn, { kind: 'ghost', onClick: async () => { setDate(''); await onPin(''); setMode('') } }, t('clearPin')),
|
|
1169
|
+
e(Btn, { kind: 'ghost', onClick: () => { setDate(scheduledDate || ''); setHours(task.hours); setMode('') } }, t('cancel')),
|
|
1170
|
+
),
|
|
1171
|
+
)
|
|
1172
|
+
: e(React.Fragment, null,
|
|
1173
|
+
e('div', { className: 'sp-task-line' },
|
|
1174
|
+
e('span', {
|
|
1175
|
+
className: 'sp-task-title',
|
|
1176
|
+
style: task.done ? { textDecoration: 'line-through', color: 'var(--dsw-alias-label-tertiary)' } : null,
|
|
1177
|
+
}, task.title),
|
|
1178
|
+
chips,
|
|
1179
|
+
showProject && task.project ? e('span', { className: 'sp-muted' }, `· ${task.project}`) : null,
|
|
1180
|
+
),
|
|
1181
|
+
e('div', { className: 'sp-task-meta' },
|
|
1182
|
+
e('span', { className: 'sp-task-date' }, scheduledDate ? t('dateOn', { date: scheduledDate }) : t('autoScheduled')),
|
|
1183
|
+
e('span', { className: 'sp-task-hours' }, t('hoursText', { n: task.hours })),
|
|
1184
|
+
task.totalHours > task.hours ? e('span', null, `· ${t('progressText', { done: round1(task.doneHours || 0), total: round1(task.totalHours) })} (${percent}%)`) : null,
|
|
1185
|
+
),
|
|
1186
|
+
e('div', { className: 'sp-task-actions' },
|
|
1187
|
+
e(Btn, { kind: 'ghost', onClick: () => { setTitle(task.title); setMode('title') } }, t('editTitle')),
|
|
1188
|
+
e(Btn, { kind: 'ghost', onClick: () => { setDate(scheduledDate || ''); setHours(task.hours); setMode('time') } }, t('adjust')),
|
|
1189
|
+
confirming
|
|
1190
|
+
? e(React.Fragment, null,
|
|
1191
|
+
e(Btn, { kind: 'danger', onClick: async () => { await onDelete(); setConfirming(false) } }, t('confirmDelete')),
|
|
1192
|
+
e(Btn, { kind: 'ghost', onClick: () => setConfirming(false) }, t('cancel')),
|
|
1193
|
+
)
|
|
1194
|
+
: e(Btn, { kind: 'ghost', onClick: () => setConfirming(true) }, t('delete')),
|
|
1195
|
+
),
|
|
1196
|
+
),
|
|
1197
|
+
),
|
|
1198
|
+
)
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
function ProjectEditModal({ project, store, onClose }) {
|
|
1202
|
+
const t = useT()
|
|
1203
|
+
const [due, setDue] = useState(project.due)
|
|
1204
|
+
const [buffer, setBuffer] = useState(project.buffer === 'day' ? 'day' : 'none')
|
|
1205
|
+
const [level, setLevel] = useState(project.level || 'B')
|
|
1206
|
+
const [totalHours, setTotalHours] = useState(project.totalHours)
|
|
1207
|
+
const [busy, setBusy] = useState(false)
|
|
1208
|
+
const [error, setError] = useState('')
|
|
1209
|
+
const save = async () => {
|
|
1210
|
+
setBusy(true); setError('')
|
|
1211
|
+
try {
|
|
1212
|
+
await store.act({ type: 'updateProject', projectId: project.id, due, buffer, level, totalHours: Number(totalHours) })
|
|
1213
|
+
onClose()
|
|
1214
|
+
} catch (err) { setError(err.message) } finally { setBusy(false) }
|
|
1215
|
+
}
|
|
1216
|
+
return e(Modal, { title: t('editPlanTitle'), subtitle: t('editPlanHint'), onClose },
|
|
1217
|
+
e('div', { className: 'sp-row' },
|
|
1218
|
+
e('label', { className: 'sp-field sp-grow' }, e('span', { className: 'sp-label' }, t('due')),
|
|
1219
|
+
e('input', { className: 'sp-input', type: 'date', value: due, onChange: (ev) => setDue(ev.target.value) })),
|
|
1220
|
+
e('label', { className: 'sp-field' }, e('span', { className: 'sp-label' }, t('buffer')),
|
|
1221
|
+
e('select', { className: 'sp-select', value: buffer, onChange: (ev) => setBuffer(ev.target.value) },
|
|
1222
|
+
e('option', { value: 'none' }, t('bufferNone')),
|
|
1223
|
+
e('option', { value: 'day' }, t('bufferDay')),
|
|
1224
|
+
)),
|
|
1225
|
+
),
|
|
1226
|
+
e('div', { className: 'sp-row' },
|
|
1227
|
+
e('label', { className: 'sp-field sp-grow' }, e('span', { className: 'sp-label' }, t('totalHours')),
|
|
1228
|
+
e('input', { className: 'sp-input', type: 'number', min: '0.5', step: '0.5', value: totalHours, onChange: (ev) => setTotalHours(ev.target.value) })),
|
|
1229
|
+
e('label', { className: 'sp-field sp-grow' }, e('span', { className: 'sp-label' }, t('levelTitle')),
|
|
1230
|
+
e('select', { className: 'sp-select', value: level, onChange: (ev) => setLevel(ev.target.value) },
|
|
1231
|
+
e('option', { value: 'A' }, 'A'), e('option', { value: 'B' }, 'B'), e('option', { value: 'C' }, 'C'), e('option', { value: 'D' }, 'D'))),
|
|
1232
|
+
),
|
|
1233
|
+
error ? e('div', { className: 'sp-err', style: { marginTop: 6 } }, error) : null,
|
|
1234
|
+
e('div', { className: 'sp-row', style: { justifyContent: 'flex-end', marginTop: 12 } },
|
|
1235
|
+
e(Btn, { kind: 'ghost', onClick: onClose }, t('cancel')),
|
|
1236
|
+
e(Btn, { kind: 'primary', disabled: busy, onClick: save }, t('savePlan')),
|
|
1237
|
+
),
|
|
1238
|
+
)
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
const stageDate = (stage, plannedDate) => (
|
|
1242
|
+
stage.pinned
|
|
1243
|
+
|| plannedDate[stage.id]
|
|
1244
|
+
|| (stage.doneAt ? String(stage.doneAt).slice(0, 10) : '')
|
|
1245
|
+
|| ''
|
|
1246
|
+
)
|
|
1247
|
+
|
|
1248
|
+
const sortStagesByDate = (stages, plannedDate) => stages
|
|
1249
|
+
.map((stage, index) => ({ stage, index, date: stageDate(stage, plannedDate) }))
|
|
1250
|
+
.sort((a, b) => {
|
|
1251
|
+
if (a.date && b.date) return a.date.localeCompare(b.date) || a.index - b.index
|
|
1252
|
+
if (a.date) return -1
|
|
1253
|
+
if (b.date) return 1
|
|
1254
|
+
return a.index - b.index
|
|
1255
|
+
})
|
|
1256
|
+
.map((item) => item.stage)
|
|
1257
|
+
|
|
1258
|
+
const sortProjectsByDate = (projects, plannedDate) => projects
|
|
1259
|
+
.map((project, index) => {
|
|
1260
|
+
const stages = sortStagesByDate(project.stages, plannedDate)
|
|
1261
|
+
const openDates = stages
|
|
1262
|
+
.filter((stage) => stage.doneHours < stage.hours - 0.001)
|
|
1263
|
+
.map((stage) => stageDate(stage, plannedDate))
|
|
1264
|
+
.filter(Boolean)
|
|
1265
|
+
.sort()
|
|
1266
|
+
const first = openDates[0] || stages.map((stage) => stageDate(stage, plannedDate)).filter(Boolean).sort()[0] || ''
|
|
1267
|
+
return { project, stages, index, first, completed: Boolean(project.completedAt) }
|
|
1268
|
+
})
|
|
1269
|
+
.sort((a, b) => {
|
|
1270
|
+
if (a.completed !== b.completed) return a.completed ? 1 : -1
|
|
1271
|
+
if (a.completed) return String(b.project.completedAt || '').localeCompare(String(a.project.completedAt || '')) || a.index - b.index
|
|
1272
|
+
const aKey = a.first || '9999-12-31'
|
|
1273
|
+
const bKey = b.first || '9999-12-31'
|
|
1274
|
+
return aKey.localeCompare(bKey) || a.index - b.index
|
|
1275
|
+
})
|
|
1276
|
+
|
|
1277
|
+
function TasksView({ store, snap }) {
|
|
1278
|
+
const t = useT()
|
|
1279
|
+
const [name, setName] = useState('')
|
|
1280
|
+
const [kind, setKind] = useState('paper')
|
|
1281
|
+
const [due, setDue] = useState(addKey(snap.today, 14))
|
|
1282
|
+
const [level, setLevel] = useState('B')
|
|
1283
|
+
const [totalHours, setTotalHours] = useState('')
|
|
1284
|
+
const [buffer, setBuffer] = useState('')
|
|
1285
|
+
const [sessionRange, setSessionRange] = useState('2-3')
|
|
1286
|
+
const [sessionMaxHours, setSessionMaxHours] = useState('')
|
|
1287
|
+
const [sessionCount, setSessionCount] = useState(3)
|
|
1288
|
+
const [sameDayRepeat, setSameDayRepeat] = useState(false)
|
|
1289
|
+
const [custom, setCustom] = useState('')
|
|
1290
|
+
const [busy, setBusy] = useState(false)
|
|
1291
|
+
const [message, setMessage] = useState('')
|
|
1292
|
+
const [editProject, setEditProject] = useState(null)
|
|
1293
|
+
const slots = useMemo(() => freeSlots(snap), [snap])
|
|
1294
|
+
const plannedDate = useMemo(() => {
|
|
1295
|
+
const map = {}
|
|
1296
|
+
for (const day of (snap.plan.days || [])) {
|
|
1297
|
+
for (const item of (day.tasks || [])) if (item.taskId && !map[item.taskId]) map[item.taskId] = day.date
|
|
1298
|
+
}
|
|
1299
|
+
return map
|
|
1300
|
+
}, [snap.plan])
|
|
1301
|
+
const orderedProjects = useMemo(
|
|
1302
|
+
() => sortProjectsByDate(snap.state.projects, plannedDate),
|
|
1303
|
+
[snap.state.projects, plannedDate],
|
|
1304
|
+
)
|
|
1305
|
+
|
|
1306
|
+
const create = async () => {
|
|
1307
|
+
if (!name.trim()) { setMessage(t('nameRequired')); return }
|
|
1308
|
+
if (!(Number(totalHours) > 0)) { setMessage(t('totalHoursRequired')); return }
|
|
1309
|
+
if (!buffer) { setMessage(t('bufferRequired')); return }
|
|
1310
|
+
if (sessionRange === 'custom' && !(Number(sessionMaxHours) > 0)) { setMessage(t('sessionMaxRequired')); return }
|
|
1311
|
+
if (!(Number(sessionCount) > 0)) { setMessage(t('sessionCountRequired')); return }
|
|
1312
|
+
setBusy(true)
|
|
1313
|
+
try {
|
|
1314
|
+
const stages = custom.trim()
|
|
1315
|
+
? custom.split(/[\n,,;;]/).map((s) => s.trim()).filter(Boolean).map((s) => ({ title: s, hours: 2 }))
|
|
1316
|
+
: undefined
|
|
1317
|
+
const data = await store.act({
|
|
1318
|
+
type: 'create', name, kind, due, level, totalHours: Number(totalHours), buffer, stages,
|
|
1319
|
+
sessionRange, sessionMaxHours: Number(sessionMaxHours) || undefined,
|
|
1320
|
+
sessionCount: Number(sessionCount), sameDayRepeat,
|
|
1321
|
+
})
|
|
1322
|
+
setMessage(`${t('created', { name: data.project.name, hours: round1(data.project.totalHours), n: data.project.stages.length })}${data.snapshot?.capacitySummary ? ';' + data.snapshot.capacitySummary : ''}`)
|
|
1323
|
+
setName('')
|
|
1324
|
+
setCustom('')
|
|
1325
|
+
} catch (error) {
|
|
1326
|
+
setMessage(error.message)
|
|
1327
|
+
} finally {
|
|
1328
|
+
setBusy(false)
|
|
1329
|
+
}
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
const deadlineRows = (snap.capacity || []).filter((row) => row.date <= due)
|
|
1333
|
+
const deadlineCapacity = deadlineRows.reduce((a, row) => a + row.capacity, 0)
|
|
1334
|
+
const deadlineUsed = deadlineRows.reduce((a, row) => a + row.used, 0)
|
|
1335
|
+
const deadlineLeft = Math.max(0, deadlineCapacity - deadlineUsed)
|
|
1336
|
+
|
|
1337
|
+
return e('div', null,
|
|
1338
|
+
e('div', { className: 'sp-card' },
|
|
1339
|
+
e('div', { style: { fontWeight: 600, marginBottom: 8 } }, t('newProject')),
|
|
1340
|
+
e('div', { className: 'sp-muted', style: { marginBottom: 8 } }, t('deadlineLeft', {
|
|
1341
|
+
date: due, left: round1(deadlineLeft), cap: round1(deadlineCapacity), used: round1(deadlineUsed),
|
|
1342
|
+
})),
|
|
1343
|
+
e('div', { className: 'sp-row' },
|
|
1344
|
+
e('input', {
|
|
1345
|
+
className: 'sp-input sp-grow', placeholder: t('namePlaceholder'), value: name,
|
|
1346
|
+
onChange: (ev) => setName(ev.target.value),
|
|
1347
|
+
}),
|
|
1348
|
+
e('select', { className: 'sp-select', value: kind, onChange: (ev) => setKind(ev.target.value), 'aria-label': t('type') },
|
|
1349
|
+
['paper', 'exam', 'report', 'admin', 'other'].map((k) => e('option', { key: k, value: k }, typeLabel(t, snap, k)))),
|
|
1350
|
+
e('input', {
|
|
1351
|
+
className: 'sp-input', type: 'date', value: due, 'aria-label': t('due'),
|
|
1352
|
+
onChange: (ev) => setDue(ev.target.value),
|
|
1353
|
+
}),
|
|
1354
|
+
e('select', { className: 'sp-select', value: level, onChange: (ev) => setLevel(ev.target.value), 'aria-label': t('levelTitle') },
|
|
1355
|
+
e('option', { value: 'A' }, 'A'), e('option', { value: 'B' }, 'B'), e('option', { value: 'C' }, 'C'), e('option', { value: 'D' }, 'D')),
|
|
1356
|
+
e('input', {
|
|
1357
|
+
className: 'sp-input', type: 'number', min: '0.5', step: '0.5', style: { width: 118 },
|
|
1358
|
+
placeholder: t('totalHoursPlaceholder'), value: totalHours,
|
|
1359
|
+
'aria-label': t('totalHours'), onChange: (ev) => setTotalHours(ev.target.value),
|
|
1360
|
+
}),
|
|
1361
|
+
e('select', { className: 'sp-select', value: buffer, onChange: (ev) => setBuffer(ev.target.value), 'aria-label': t('buffer') },
|
|
1362
|
+
e('option', { value: '' }, t('bufferChoose')), e('option', { value: 'none' }, t('bufferNone')), e('option', { value: 'day' }, t('bufferDay'))),
|
|
1363
|
+
e(Btn, { kind: 'primary', disabled: busy, onClick: create }, busy ? t('creating') : t('create')),
|
|
1364
|
+
),
|
|
1365
|
+
e('div', { className: 'sp-row', style: { marginTop: 6 } },
|
|
1366
|
+
e('label', { className: 'sp-field sp-grow' }, e('span', { className: 'sp-label' }, t('sessionRange')),
|
|
1367
|
+
e('select', { className: 'sp-select', value: sessionRange, onChange: (ev) => setSessionRange(ev.target.value) },
|
|
1368
|
+
e('option', { value: '1-2' }, t('session1_2')),
|
|
1369
|
+
e('option', { value: '2-3' }, t('session2_3')),
|
|
1370
|
+
e('option', { value: '3-4' }, t('session3_4')),
|
|
1371
|
+
e('option', { value: 'custom' }, t('sessionCustom')),
|
|
1372
|
+
)),
|
|
1373
|
+
sessionRange === 'custom' ? e('label', { className: 'sp-field' }, e('span', { className: 'sp-label' }, t('sessionMaxHours')),
|
|
1374
|
+
e('input', { className: 'sp-input', type: 'number', min: '0.25', max: '12', step: '0.25', value: sessionMaxHours, onChange: (ev) => setSessionMaxHours(ev.target.value) })) : null,
|
|
1375
|
+
e('label', { className: 'sp-field' }, e('span', { className: 'sp-label' }, t('sessionCount')),
|
|
1376
|
+
e('input', { className: 'sp-input', type: 'number', min: '1', max: '60', step: '1', value: sessionCount, onChange: (ev) => setSessionCount(Number(ev.target.value)) })),
|
|
1377
|
+
e('label', { className: 'sp-inline-field sp-grow', style: { marginBottom: 0 } },
|
|
1378
|
+
e('input', { type: 'checkbox', className: 'sp-check', checked: sameDayRepeat, onChange: (ev) => setSameDayRepeat(ev.target.checked) }),
|
|
1379
|
+
e('span', { className: 'sp-label', style: { margin: 0 } }, t('sameDayRepeat')),
|
|
1380
|
+
e('span', { className: 'sp-muted' }, t('sameDayRepeatHint')),
|
|
1381
|
+
),
|
|
1382
|
+
),
|
|
1383
|
+
e('div', { className: 'sp-muted', style: { marginTop: 6 } }, t('manualNotice')),
|
|
1384
|
+
e('input', {
|
|
1385
|
+
className: 'sp-input', style: { width: '100%', marginTop: 8 },
|
|
1386
|
+
placeholder: t('customStages'), value: custom, onChange: (ev) => setCustom(ev.target.value),
|
|
1387
|
+
}),
|
|
1388
|
+
message ? e('div', { className: 'sp-muted', style: { marginTop: 6 } }, message) : null,
|
|
1389
|
+
),
|
|
1390
|
+
orderedProjects.length === 0
|
|
1391
|
+
? e('div', { className: 'sp-card sp-empty' }, t('noProjects'))
|
|
1392
|
+
: orderedProjects.map(({ project: p, stages }) => {
|
|
1393
|
+
const done = p.stages.filter((s) => s.doneHours >= s.hours - 0.001).length
|
|
1394
|
+
const totalHours = p.stages.reduce((a, s) => a + s.hours, 0)
|
|
1395
|
+
const doneHours = p.stages.reduce((a, s) => a + Math.min(s.doneHours, s.hours), 0)
|
|
1396
|
+
return e('div', { key: p.id, className: 'sp-card' },
|
|
1397
|
+
e('div', { className: 'sp-row' },
|
|
1398
|
+
e('div', { className: 'sp-grow' },
|
|
1399
|
+
e('div', { className: 'sp-task-line' },
|
|
1400
|
+
e('div', { style: { fontWeight: 600 } }, p.name),
|
|
1401
|
+
p.completedAt ? e('span', { className: 'sp-chip', 'data-tone': 'done' }, t('completedProject')) : null,
|
|
1402
|
+
),
|
|
1403
|
+
e('div', { className: 'sp-muted' }, t('projectMeta', {
|
|
1404
|
+
type: typeLabel(t, snap, p.type), due: p.due, imp: p.level || 'B',
|
|
1405
|
+
hours: round1(p.totalHours || p.stages.reduce((a, st) => a + st.hours, 0)), done, total: p.stages.length,
|
|
1406
|
+
})),
|
|
1407
|
+
p.buffer === 'day' && p.bufferDate
|
|
1408
|
+
? e('div', { className: 'sp-muted' }, t('bufferAt', { date: p.bufferDate }))
|
|
1409
|
+
: null,
|
|
1410
|
+
p.sessionConfigured && p.sessionCount
|
|
1411
|
+
? e('div', { className: 'sp-muted' }, t('sessionMeta', { max: round1(p.sessionMaxHours), count: p.sessionCount }) + (p.sameDayRepeat ? ` · ${t('sameDayRepeatMeta')}` : ''))
|
|
1412
|
+
: null,
|
|
1413
|
+
p.completedAt ? e('div', { className: 'sp-muted' }, t('autoDeleteNote')) : null,
|
|
1414
|
+
e('div', { className: 'sp-bar', style: { marginTop: 8 } },
|
|
1415
|
+
e('i', { style: { width: `${totalHours ? Math.round((doneHours / totalHours) * 100) : 0}%` } })),
|
|
1416
|
+
),
|
|
1417
|
+
e('div', { className: 'sp-row' },
|
|
1418
|
+
e(Btn, { kind: 'ghost', onClick: () => setEditProject(p) }, t('editPlan')),
|
|
1419
|
+
e(Btn, {
|
|
1420
|
+
kind: 'danger',
|
|
1421
|
+
onClick: async () => {
|
|
1422
|
+
if (window.confirm(t('confirmDeleteProject'))) await store.act({ type: 'deleteProject', projectId: p.id })
|
|
1423
|
+
},
|
|
1424
|
+
}, t('deleteProject')),
|
|
1425
|
+
),
|
|
1426
|
+
),
|
|
1427
|
+
e('div', { style: { marginTop: 8 } }, stages.map((s) => e(TaskLine, {
|
|
1428
|
+
key: s.id, t,
|
|
1429
|
+
task: {
|
|
1430
|
+
taskId: s.id, title: s.title, hours: s.hours, high: false, pinned: s.pinned,
|
|
1431
|
+
date: s.pinned || (s.doneAt ? String(s.doneAt).slice(0, 10) : plannedDate[s.id] || ''),
|
|
1432
|
+
part: 1, partTotal: 1, project: '', done: s.doneHours >= s.hours - 0.001,
|
|
1433
|
+
doneHours: s.doneHours, totalHours: s.hours,
|
|
1434
|
+
},
|
|
1435
|
+
showProject: false,
|
|
1436
|
+
slots,
|
|
1437
|
+
onToggle: (done) => store.act({ type: 'setStatus', taskId: s.id, status: done ? 'done' : 'todo' }),
|
|
1438
|
+
onEdit: (patch) => store.act({ type: 'updateStage', taskId: s.id, ...patch, manual: patch.manual === true }),
|
|
1439
|
+
onPin: (date) => store.act({ type: 'pin', taskId: s.id, date }),
|
|
1440
|
+
onDelete: () => store.act({ type: 'deleteStage', taskId: s.id }),
|
|
1441
|
+
}))),
|
|
1442
|
+
)
|
|
1443
|
+
}),
|
|
1444
|
+
editProject ? e(ProjectEditModal, { project: editProject, store, onClose: () => setEditProject(null) }) : null,
|
|
1445
|
+
)
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
function PlanView({ store, snap }) {
|
|
1449
|
+
const t = useT()
|
|
1450
|
+
const [date, setDate] = useState(snap.today)
|
|
1451
|
+
const day = snap.plan.days.find((d) => d.date === date)
|
|
1452
|
+
const first = snap.plan.days[0]?.date || snap.today
|
|
1453
|
+
const last = snap.plan.days[snap.plan.days.length - 1]?.date || snap.today
|
|
1454
|
+
|
|
1455
|
+
return e('div', null,
|
|
1456
|
+
e('div', { className: 'sp-card' },
|
|
1457
|
+
e('div', { className: 'sp-row' },
|
|
1458
|
+
e(Btn, { onClick: () => setDate(addKey(date, -1)) }, t('prevDay')),
|
|
1459
|
+
e('input', {
|
|
1460
|
+
className: 'sp-input', type: 'date', value: date, min: first, max: last,
|
|
1461
|
+
onChange: (ev) => setDate(ev.target.value),
|
|
1462
|
+
}),
|
|
1463
|
+
e(Btn, { onClick: () => setDate(addKey(date, 1)) }, t('nextDay')),
|
|
1464
|
+
e(Btn, { kind: 'ghost', onClick: () => setDate(snap.today) }, t('backToday')),
|
|
1465
|
+
e('div', { className: 'sp-grow' }),
|
|
1466
|
+
e('span', { className: 'sp-muted' }, `${date} · ${t(dowKey(date))}`),
|
|
1467
|
+
),
|
|
1468
|
+
day ? e(React.Fragment, null,
|
|
1469
|
+
e('div', { className: 'sp-row', style: { marginTop: 10 } },
|
|
1470
|
+
e('div', { className: 'sp-grow' },
|
|
1471
|
+
e('div', { className: 'sp-bar' },
|
|
1472
|
+
e('i', { style: { width: `${Math.min(100, (day.used / (day.capacity || 1)) * 100)}%` } })),
|
|
1473
|
+
),
|
|
1474
|
+
e('span', { className: 'sp-muted' }, `${t('capacity', { used: round1(day.used), cap: round1(day.capacity) })} · ${t('remainingText', { n: round1(day.remaining == null ? Math.max(0, day.capacity - day.used) : day.remaining) })}`),
|
|
1475
|
+
),
|
|
1476
|
+
e('div', { className: 'sp-row', style: { marginTop: 6 } },
|
|
1477
|
+
e('span', { className: 'sp-muted' }, t('highCount', { n: day.high, max: snap.state.settings.maxHighPerDay })),
|
|
1478
|
+
e('div', { className: 'sp-grow' }),
|
|
1479
|
+
e('span', { className: 'sp-muted' }, t('planRange', { from: snap.plan.from, to: snap.plan.to })),
|
|
1480
|
+
),
|
|
1481
|
+
day.over ? e('div', { className: 'sp-muted', style: { marginTop: 6, color: '#C99A5B' } }, t('overCapacity')) : null,
|
|
1482
|
+
) : null,
|
|
1483
|
+
),
|
|
1484
|
+
e('div', { className: 'sp-card' },
|
|
1485
|
+
e('div', { style: { fontWeight: 600, marginBottom: 6 } }, `${date} ${t(dowKey(date))}`),
|
|
1486
|
+
day && day.tasks.length
|
|
1487
|
+
? day.tasks.map((task) => e(TaskLine, {
|
|
1488
|
+
key: `${task.taskId}-${task.date}`, t, task, showProject: true, slots: freeSlots(snap),
|
|
1489
|
+
onToggle: (done) => store.act({ type: 'completeChunk', taskId: task.taskId, date: task.date, done, hours: task.hours }),
|
|
1490
|
+
onEdit: (patch) => store.act({ type: 'updateStage', taskId: task.taskId, ...patch, manual: patch.manual === true }),
|
|
1491
|
+
onPin: (value) => store.act({ type: 'pin', taskId: task.taskId, date: value }),
|
|
1492
|
+
onDelete: () => store.act({ type: 'deleteStage', taskId: task.taskId }),
|
|
1493
|
+
}))
|
|
1494
|
+
: e('div', { className: 'sp-empty' }, t('noTasksDay')),
|
|
1495
|
+
),
|
|
1496
|
+
snap.plan.unscheduled.length
|
|
1497
|
+
? e('div', { className: 'sp-card' },
|
|
1498
|
+
e('div', { style: { fontWeight: 600, marginBottom: 4 } }, t('unscheduled')),
|
|
1499
|
+
e('div', { className: 'sp-muted', style: { marginBottom: 6 } }, t('unscheduledHint')),
|
|
1500
|
+
snap.plan.unscheduled.map((item, index) => e('div', { key: `${item.taskId}-${index}`, className: 'sp-muted' },
|
|
1501
|
+
`${item.title} · ${item.project} · ${round1(item.hours)}h · `,
|
|
1502
|
+
item.reason === 'window' ? t('reasonWindow') : item.reason === 'capacity' ? t('reasonCapacity') : t('reasonDeadline'))),
|
|
1503
|
+
) : null,
|
|
1504
|
+
)
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1507
|
+
function CapacityView({ snap }) {
|
|
1508
|
+
const t = useT()
|
|
1509
|
+
const [range, setRange] = useState('all')
|
|
1510
|
+
const rows = snap.capacity || (snap.plan.days || []).map((d) => ({
|
|
1511
|
+
date: d.date, weekday: d.weekday, capacity: d.capacity, used: d.used,
|
|
1512
|
+
remaining: Math.max(0, d.capacity - d.used), over: d.over,
|
|
1513
|
+
overBy: Math.max(0, d.used - d.capacity), buffer: Boolean(d.buffer), bufferFor: d.bufferFor || [],
|
|
1514
|
+
tasks: (d.tasks || []).map((x) => ({ title: x.title, project: x.project, hours: x.hours })),
|
|
1515
|
+
}))
|
|
1516
|
+
const today = snap.today
|
|
1517
|
+
const now = parseKey(today)
|
|
1518
|
+
const weekStart = addKey(today, -((now.getDay() + 6) % 7))
|
|
1519
|
+
const weekEnd = addKey(weekStart, 6)
|
|
1520
|
+
const weekRows = rows.filter((r) => r.date >= weekStart && r.date <= weekEnd)
|
|
1521
|
+
const nextRows = rows.slice(0, 7)
|
|
1522
|
+
const monthRows = rows.slice(0, 30)
|
|
1523
|
+
const visibleRows = range === '7' ? nextRows : range === '30' ? monthRows : rows
|
|
1524
|
+
const agg = (list) => list.reduce((a, r) => ({ cap: a.cap + r.capacity, used: a.used + r.used }), { cap: 0, used: 0 })
|
|
1525
|
+
const left = (a) => Math.max(0, a.cap - a.used)
|
|
1526
|
+
const box = (label, data) => e('div', { className: 'sp-cap-box', key: label },
|
|
1527
|
+
e('div', { className: 'sp-cap-label' }, label),
|
|
1528
|
+
e('div', { className: 'sp-cap-value' }, `${round1(data.used)} / ${round1(data.cap)}h`),
|
|
1529
|
+
e('div', { className: 'sp-muted' }, t('remainingText', { n: round1(left(data)) })),
|
|
1530
|
+
)
|
|
1531
|
+
const todayData = agg(rows.filter((r) => r.date === today))
|
|
1532
|
+
const weekData = agg(weekRows)
|
|
1533
|
+
const monthData = agg(monthRows)
|
|
1534
|
+
const nextData = agg(nextRows)
|
|
1535
|
+
const buffers = snap.buffers || []
|
|
1536
|
+
const bufferLabel = buffers.length
|
|
1537
|
+
? buffers.map((b) => `${b.date.slice(5)}(${(b.projects || []).join('、')})`).join('、')
|
|
1538
|
+
: t('noBuffer')
|
|
1539
|
+
|
|
1540
|
+
return e('div', null,
|
|
1541
|
+
e('div', { className: 'sp-card' },
|
|
1542
|
+
e('div', { className: 'sp-row' },
|
|
1543
|
+
e('div', { className: 'sp-grow' },
|
|
1544
|
+
e('div', { style: { fontWeight: 600 } }, t('capacityTitle')),
|
|
1545
|
+
e('div', { className: 'sp-muted' }, t('capacitySub')),
|
|
1546
|
+
),
|
|
1547
|
+
e('span', { className: 'sp-muted' }, `${snap.plan.from} — ${snap.plan.to}`),
|
|
1548
|
+
),
|
|
1549
|
+
e('div', { className: 'sp-cap-summary' },
|
|
1550
|
+
box(t('capacityToday', { date: today.slice(5) }), todayData),
|
|
1551
|
+
box(t('capacityWeek'), weekData),
|
|
1552
|
+
box(t('capacityMonth'), monthData),
|
|
1553
|
+
box(t('capacityNext', { days: nextRows.length }), nextData),
|
|
1554
|
+
),
|
|
1555
|
+
e('div', { className: 'sp-row', style: { marginTop: 10 } },
|
|
1556
|
+
e('span', { className: 'sp-muted sp-grow' }, `${t('buffer')}:${bufferLabel}`),
|
|
1557
|
+
e('div', { className: 'sp-row' },
|
|
1558
|
+
e(Btn, { kind: range === '7' ? 'primary' : 'ghost', onClick: () => setRange('7') }, t('range7')),
|
|
1559
|
+
e(Btn, { kind: range === '30' ? 'primary' : 'ghost', onClick: () => setRange('30') }, t('range30')),
|
|
1560
|
+
e(Btn, { kind: range === 'all' ? 'primary' : 'ghost', onClick: () => setRange('all') }, t('rangeAll')),
|
|
1561
|
+
),
|
|
1562
|
+
),
|
|
1563
|
+
),
|
|
1564
|
+
e('div', { className: 'sp-card', style: { padding: 0 } },
|
|
1565
|
+
e('div', { className: 'sp-cap-wrap' },
|
|
1566
|
+
e('table', { className: 'sp-cap-table' },
|
|
1567
|
+
e('thead', null, e('tr', null, ['colDate', 'colWeekday', 'colLoad', 'colLeft', 'colContent'].map((k) => e('th', { key: k }, t(k))))),
|
|
1568
|
+
e('tbody', null, visibleRows.map((row) => {
|
|
1569
|
+
const tasks = row.tasks || []
|
|
1570
|
+
const content = tasks.length ? tasks.map((task) => `${task.title} ${round1(task.hours)}h`).join(' + ') : t('noTasks')
|
|
1571
|
+
return e('tr', { key: row.date, 'data-over': row.over ? '1' : '0' },
|
|
1572
|
+
e('td', { className: 'sp-cap-date', title: row.date },
|
|
1573
|
+
row.date.slice(5),
|
|
1574
|
+
row.buffer ? e('span', { className: 'sp-cap-buffer' }, t('bufferTag')) : null,
|
|
1575
|
+
),
|
|
1576
|
+
e('td', null, t(`dow${row.weekday}`)),
|
|
1577
|
+
e('td', { className: 'sp-cap-load' }, `${round1(row.used)} / ${round1(row.capacity)}`),
|
|
1578
|
+
e('td', { className: 'sp-cap-left', 'data-tone': row.over ? 'danger' : (row.remaining <= 0.001 ? 'full' : 'ok') },
|
|
1579
|
+
row.over ? t('overBy', { n: round1(row.overBy) }) : `${round1(row.remaining)}h`),
|
|
1580
|
+
e('td', { className: 'sp-cap-content', title: tasks.map((x) => x.project).filter(Boolean).join(' · ') }, content),
|
|
1581
|
+
)
|
|
1582
|
+
})),
|
|
1583
|
+
),
|
|
1584
|
+
),
|
|
1585
|
+
),
|
|
1586
|
+
)
|
|
1587
|
+
}
|
|
1588
|
+
|
|
1589
|
+
function FruitMedal({ size = 42 }) {
|
|
1590
|
+
return e('img', {
|
|
1591
|
+
src: HONOR_FRUIT, width: size, height: size, alt: '', 'aria-hidden': true,
|
|
1592
|
+
draggable: false, className: 'sp-honor-img',
|
|
1593
|
+
})
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
function HonorsView({ snap }) {
|
|
1597
|
+
const t = useT()
|
|
1598
|
+
const honors = snap.honors || []
|
|
1599
|
+
return e('div', { className: 'sp-card sp-honors' },
|
|
1600
|
+
e('div', { className: 'sp-row' },
|
|
1601
|
+
e('div', { className: 'sp-grow' },
|
|
1602
|
+
e('div', { style: { fontWeight: 600 } }, t('honorsTitle')),
|
|
1603
|
+
e('div', { className: 'sp-muted', style: { marginTop: 3 } }, t('honorsSub')),
|
|
1604
|
+
),
|
|
1605
|
+
e('span', { className: 'sp-muted' }, t('honorsCount', { n: honors.length })),
|
|
1606
|
+
),
|
|
1607
|
+
honors.length === 0
|
|
1608
|
+
? e('div', { className: 'sp-empty', style: { marginTop: 12 } }, t('honorsEmpty'))
|
|
1609
|
+
: e('div', { className: 'sp-honor-grid' }, honors.map((h) => {
|
|
1610
|
+
const date = String(h.completedAt || '').slice(0, 10)
|
|
1611
|
+
return e('div', { key: h.id, className: 'sp-honor-card' },
|
|
1612
|
+
e('div', { className: 'sp-honor-medal', title: t('honorBadge') }, e(FruitMedal)),
|
|
1613
|
+
e('div', { className: 'sp-grow' },
|
|
1614
|
+
e('div', { className: 'sp-honor-name' }, h.projectName),
|
|
1615
|
+
e('div', { className: 'sp-honor-meta' }, t('honorMeta', { date, n: round1(h.hours || 0) })),
|
|
1616
|
+
),
|
|
1617
|
+
)
|
|
1618
|
+
})),
|
|
1619
|
+
)
|
|
1620
|
+
}
|
|
1621
|
+
|
|
1622
|
+
function BoardView({ snap, store }) {
|
|
1623
|
+
const t = useT()
|
|
1624
|
+
if (!snap.board.length) return e('div', { className: 'sp-card sp-empty' }, t('boardEmpty'))
|
|
1625
|
+
return e('div', { className: 'sp-grid' }, snap.board.map((p) => e('div', { key: p.id, className: 'sp-card', style: { marginBottom: 0 } },
|
|
1626
|
+
e('div', { className: 'sp-row' },
|
|
1627
|
+
e('div', { className: 'sp-grow', style: { fontWeight: 600 } }, p.name),
|
|
1628
|
+
p.complete
|
|
1629
|
+
? e('span', { className: 'sp-chip', 'data-tone': 'done' }, t('completedProject'))
|
|
1630
|
+
: e('span', {
|
|
1631
|
+
className: 'sp-chip', 'data-tone': p.daysLeft < 3 ? 'danger' : undefined,
|
|
1632
|
+
}, p.daysLeft >= 0 ? t('daysLeft', { n: p.daysLeft }) : t('overdue', { n: -p.daysLeft })),
|
|
1633
|
+
e(Btn, {
|
|
1634
|
+
kind: 'ghost',
|
|
1635
|
+
title: t('deleteProject'),
|
|
1636
|
+
onClick: async () => {
|
|
1637
|
+
if (window.confirm(t('confirmDeleteProject'))) await store.act({ type: 'deleteProject', projectId: p.id })
|
|
1638
|
+
},
|
|
1639
|
+
}, t('delete')),
|
|
1640
|
+
),
|
|
1641
|
+
e('div', { className: 'sp-muted', style: { margin: '4px 0 8px' } },
|
|
1642
|
+
`${p.level ? p.level + ' · ' : ''}${p.typeLabel} · ${p.doneStages}/${p.totalStages} · ${p.rate}% · ${round1(p.doneHours)}/${round1(p.totalHours)}h`),
|
|
1643
|
+
p.complete ? e('div', { className: 'sp-muted', style: { marginBottom: 6 } }, t('autoDeleteNote')) : null,
|
|
1644
|
+
e(Bar, { value: p.rate }),
|
|
1645
|
+
e('div', { style: { marginTop: 10 } }, p.stages.map((s) => e('div', { key: s.id, className: 'sp-stage' },
|
|
1646
|
+
e('span', { className: 'sp-dot', 'data-done': s.done ? '1' : '0' }),
|
|
1647
|
+
e('span', { className: 'sp-grow', style: s.done ? { color: 'var(--dsw-alias-label-tertiary)' } : null }, s.title),
|
|
1648
|
+
e('span', { className: 'sp-muted' }, s.done ? t('stageDone') : `${round1(s.doneHours)}/${round1(s.hours)}h`),
|
|
1649
|
+
))),
|
|
1650
|
+
)))
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
function ReviewsView({ store, snap }) {
|
|
1654
|
+
const t = useT()
|
|
1655
|
+
const week = snap.summaries.week
|
|
1656
|
+
const month = snap.summaries.month
|
|
1657
|
+
const weekReasons = Object.entries(week.reasons).map(([k, v]) => `${k}×${v}`).join('、')
|
|
1658
|
+
const reviews = [...snap.state.reviews].reverse()
|
|
1659
|
+
const periods = [...snap.state.periods].sort((a, b) => (a.createdAt < b.createdAt ? 1 : -1))
|
|
1660
|
+
|
|
1661
|
+
return e('div', null,
|
|
1662
|
+
e('div', { className: 'sp-card' },
|
|
1663
|
+
e('div', { className: 'sp-row' },
|
|
1664
|
+
e('div', { className: 'sp-grow' },
|
|
1665
|
+
e('div', { style: { fontWeight: 600 } }, t('weekReview')),
|
|
1666
|
+
e('div', { className: 'sp-muted', style: { marginTop: 4 } }, t('weekSummary', {
|
|
1667
|
+
done: round1(week.doneHours), planned: round1(week.plannedHours), stages: week.completedStages,
|
|
1668
|
+
})),
|
|
1669
|
+
e('div', { className: 'sp-muted' }, t('monthSummary', {
|
|
1670
|
+
done: round1(month.doneHours), planned: round1(month.plannedHours), stages: month.completedStages,
|
|
1671
|
+
})),
|
|
1672
|
+
weekReasons ? e('div', { className: 'sp-muted' }, t('weekReasons', { text: weekReasons })) : null,
|
|
1673
|
+
),
|
|
1674
|
+
e(Btn, { kind: 'primary', onClick: () => store.request('daily') }, t('reviewNow')),
|
|
1675
|
+
e(Btn, { onClick: () => store.request('week') }, t('weekReview')),
|
|
1676
|
+
e(Btn, { onClick: () => store.request('month') }, t('monthReview')),
|
|
1677
|
+
),
|
|
1678
|
+
),
|
|
1679
|
+
periods.length ? e('div', null, periods.map((p) => e('div', { key: p.id, className: 'sp-card' },
|
|
1680
|
+
e('div', { className: 'sp-row' },
|
|
1681
|
+
e('div', { style: { fontWeight: 600 } }, `${p.kind === 'week' ? t('periodWeek') : t('periodMonth')} · ${t('periodRangeLabel', { from: p.from, to: p.to })}`),
|
|
1682
|
+
e('div', { className: 'sp-grow' }),
|
|
1683
|
+
e('span', { className: 'sp-muted' }, `${round1(p.stats.doneHours)}h / ${round1(p.stats.plannedHours)}h`),
|
|
1684
|
+
),
|
|
1685
|
+
p.reflection ? e('div', { className: 'sp-muted sp-reflect', style: { marginTop: 6 } }, p.reflection) : null,
|
|
1686
|
+
p.planNote ? e('div', { className: 'sp-muted', style: { marginTop: 4 } }, `→ ${p.planNote}`) : null,
|
|
1687
|
+
))) : null,
|
|
1688
|
+
reviews.length === 0
|
|
1689
|
+
? e('div', { className: 'sp-card sp-empty' }, t('noReviews', { time: snap.state.settings.reviewTime }))
|
|
1690
|
+
: reviews.map((r) => e('div', { key: r.id, className: 'sp-card' },
|
|
1691
|
+
e('div', { className: 'sp-row' },
|
|
1692
|
+
e('div', { style: { fontWeight: 600 } }, t('dailyReview', { date: r.date })),
|
|
1693
|
+
e('div', { className: 'sp-grow' }),
|
|
1694
|
+
e('span', { className: 'sp-muted' }, t('doneCount', {
|
|
1695
|
+
done: r.items.filter((i) => i.done).length, total: r.items.length,
|
|
1696
|
+
})),
|
|
1697
|
+
),
|
|
1698
|
+
r.items.map((item, index) => e('div', { key: `${item.taskId}-${index}`, className: 'sp-stage sp-review-item' },
|
|
1699
|
+
e('span', { className: 'sp-dot', 'data-done': item.done ? '1' : '0' }),
|
|
1700
|
+
e('div', { className: 'sp-review-main' },
|
|
1701
|
+
e('div', { className: 'sp-review-title' }, item.title),
|
|
1702
|
+
e('div', { className: 'sp-review-meta' },
|
|
1703
|
+
item.done ? e('span', { className: 'sp-chip', 'data-tone': 'done' }, t('stageDone'))
|
|
1704
|
+
: e('span', { className: 'sp-chip', 'data-tone': 'high' }, item.reason || t('reasonPlaceholder')),
|
|
1705
|
+
item.movedTo ? e('span', { className: 'sp-chip' }, `→ ${item.movedTo.slice(5)}`) : null,
|
|
1706
|
+
item.note ? e('span', { className: 'sp-review-note' }, item.note) : null,
|
|
1707
|
+
),
|
|
1708
|
+
),
|
|
1709
|
+
)),
|
|
1710
|
+
r.reflection ? e('div', { className: 'sp-muted sp-reflect', style: { marginTop: 8 } }, t('reflectionLabel', { text: r.reflection })) : null,
|
|
1711
|
+
r.tomorrow && r.tomorrow.length ? e('div', { className: 'sp-muted', style: { marginTop: 4 } }, t('tomorrowCount', { n: r.tomorrow.length })) : null,
|
|
1712
|
+
Array.isArray(r.advice) && r.advice.length
|
|
1713
|
+
? e('div', { className: 'sp-review-advice' },
|
|
1714
|
+
e('div', { className: 'sp-review-advice-title' }, t('reviewAdvice')),
|
|
1715
|
+
e('ul', null, r.advice.map((tip, i) => e('li', { key: i }, tip))),
|
|
1716
|
+
)
|
|
1717
|
+
: null,
|
|
1718
|
+
)),
|
|
1719
|
+
)
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1722
|
+
function SettingsModal({ store, snap, onClose }) {
|
|
1723
|
+
const t = useT()
|
|
1724
|
+
const s = snap.state.settings
|
|
1725
|
+
const [reviewTime, setReviewTime] = useState(s.reviewTime)
|
|
1726
|
+
const [morningTime, setMorningTime] = useState(s.morningTime)
|
|
1727
|
+
const [weekly, setWeekly] = useState(s.weeklyHours)
|
|
1728
|
+
const [maxHigh, setMaxHigh] = useState(s.maxHighPerDay)
|
|
1729
|
+
const [workStyle, setWorkStyle] = useState(s.workStyle || 'neutral')
|
|
1730
|
+
const [paper, setPaper] = useState(() => store.get().paper || 'warm')
|
|
1731
|
+
const [capacity, setCapacity] = useState({ ...s.dayCapacity })
|
|
1732
|
+
const [busy, setBusy] = useState(false)
|
|
1733
|
+
const [message, setMessage] = useState('')
|
|
1734
|
+
const [editProject, setEditProject] = useState(null)
|
|
1735
|
+
const slots = useMemo(() => freeSlots(snap), [snap])
|
|
1736
|
+
const plannedDate = useMemo(() => {
|
|
1737
|
+
const map = {}
|
|
1738
|
+
for (const day of (snap.plan.days || [])) {
|
|
1739
|
+
for (const item of (day.tasks || [])) if (item.taskId && !map[item.taskId]) map[item.taskId] = day.date
|
|
1740
|
+
}
|
|
1741
|
+
return map
|
|
1742
|
+
}, [snap.plan])
|
|
1743
|
+
const sum = DAYS.reduce((a, d) => a + Number(capacity[d] || 0), 0)
|
|
1744
|
+
|
|
1745
|
+
const save = async () => {
|
|
1746
|
+
setBusy(true)
|
|
1747
|
+
try {
|
|
1748
|
+
await store.act({ type: 'settings', settings: { reviewTime, morningTime, weeklyHours: weekly, maxHighPerDay: maxHigh, workStyle, dayCapacity: capacity } })
|
|
1749
|
+
store.setPaper(paper)
|
|
1750
|
+
setMessage(t('saved'))
|
|
1751
|
+
onClose()
|
|
1752
|
+
} catch (error) {
|
|
1753
|
+
setMessage(error.message)
|
|
1754
|
+
} finally {
|
|
1755
|
+
setBusy(false)
|
|
1756
|
+
}
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1759
|
+
return e(Modal, { title: t('settingsTitle'), onClose },
|
|
1760
|
+
e('div', { className: 'sp-row' },
|
|
1761
|
+
e('label', { className: 'sp-field sp-grow' }, e('span', { className: 'sp-label' }, t('reviewTime')),
|
|
1762
|
+
e('input', { className: 'sp-input', type: 'time', value: reviewTime, onChange: (ev) => setReviewTime(ev.target.value) })),
|
|
1763
|
+
e('label', { className: 'sp-field sp-grow' }, e('span', { className: 'sp-label' }, t('morningTime')),
|
|
1764
|
+
e('input', { className: 'sp-input', type: 'time', value: morningTime, onChange: (ev) => setMorningTime(ev.target.value) })),
|
|
1765
|
+
),
|
|
1766
|
+
e('div', { className: 'sp-row' },
|
|
1767
|
+
e('label', { className: 'sp-field sp-grow' }, e('span', { className: 'sp-label' }, t('weekly')),
|
|
1768
|
+
e('input', { className: 'sp-input', type: 'number', min: 1, max: 120, value: weekly, onChange: (ev) => setWeekly(Number(ev.target.value)) })),
|
|
1769
|
+
e('label', { className: 'sp-field sp-grow' }, e('span', { className: 'sp-label' }, t('maxHigh')),
|
|
1770
|
+
e('input', { className: 'sp-input', type: 'number', min: 1, max: 5, value: maxHigh, onChange: (ev) => setMaxHigh(Number(ev.target.value)) })),
|
|
1771
|
+
),
|
|
1772
|
+
e('label', { className: 'sp-field', style: { marginTop: 4 } },
|
|
1773
|
+
e('span', { className: 'sp-label' }, t('workStyle')),
|
|
1774
|
+
e('select', { className: 'sp-select', value: workStyle, onChange: (ev) => setWorkStyle(ev.target.value) },
|
|
1775
|
+
e('option', { value: 'neutral' }, t('styleNeutral')),
|
|
1776
|
+
['intj', 'intp', 'entj', 'entp', 'infj', 'infp', 'enfj', 'enfp', 'istj', 'isfj', 'estj', 'esfj', 'istp', 'isfp', 'estp', 'esfp'].map((type) => e('option', { key: type, value: type }, t(`mbti${type.charAt(0).toUpperCase() + type.slice(1)}`))),
|
|
1777
|
+
),
|
|
1778
|
+
e('span', { className: 'sp-muted' }, t('workStyleHint')),
|
|
1779
|
+
),
|
|
1780
|
+
e('div', { className: 'sp-field', style: { marginTop: 4 } },
|
|
1781
|
+
e('span', { className: 'sp-label' }, t('paperTheme')),
|
|
1782
|
+
e('div', { className: 'sp-paper-picker' }, PAPER_THEMES.map((theme) => e('button', {
|
|
1783
|
+
key: theme.id, type: 'button', className: 'sp-paper-choice', 'data-on': paper === theme.id ? '1' : '0',
|
|
1784
|
+
onClick: () => setPaper(theme.id), 'aria-pressed': paper === theme.id,
|
|
1785
|
+
},
|
|
1786
|
+
e('span', { className: 'sp-paper-dot', style: { background: theme.color } }),
|
|
1787
|
+
e('span', null, t(theme.labelKey)),
|
|
1788
|
+
))),
|
|
1789
|
+
e('span', { className: 'sp-muted' }, t('paperThemeHint')),
|
|
1790
|
+
),
|
|
1791
|
+
e('div', { className: 'sp-label', style: { marginTop: 4 } }, `${t('weekly')} · ${sum}h`),
|
|
1792
|
+
e('div', { className: 'sp-row', style: { marginTop: 4 } }, DAYS.map((d) => e('label', { key: d, className: 'sp-field', style: { width: 84 } },
|
|
1793
|
+
e('span', { className: 'sp-label' }, t(`dow${d}`)),
|
|
1794
|
+
e('input', {
|
|
1795
|
+
className: 'sp-input', type: 'number', min: 0, max: 16, step: '0.5',
|
|
1796
|
+
value: capacity[d] ?? 0, onChange: (ev) => setCapacity({ ...capacity, [d]: Number(ev.target.value) }),
|
|
1797
|
+
}),
|
|
1798
|
+
))),
|
|
1799
|
+
message ? e('div', { className: 'sp-muted', style: { marginTop: 6 } }, message) : null,
|
|
1800
|
+
e('div', { className: 'sp-row', style: { justifyContent: 'flex-end', marginTop: 12 } },
|
|
1801
|
+
e(Btn, { kind: 'ghost', onClick: onClose }, t('cancel')),
|
|
1802
|
+
e(Btn, { kind: 'primary', disabled: busy, onClick: save }, busy ? t('submitting') : t('saveSettings')),
|
|
1803
|
+
),
|
|
1804
|
+
)
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1807
|
+
const TASK_LEVELS = ['A', 'B', 'C', 'D']
|
|
1808
|
+
const DEFAULT_TAB_ORDER = ['tasks', 'plan', 'capacity', 'board', 'honors', 'reviews']
|
|
1809
|
+
function normalizeTabOrder(value) {
|
|
1810
|
+
let raw = value
|
|
1811
|
+
if (typeof value === 'string') {
|
|
1812
|
+
try { raw = JSON.parse(value) } catch { raw = [] }
|
|
1813
|
+
}
|
|
1814
|
+
const seen = new Set()
|
|
1815
|
+
const out = []
|
|
1816
|
+
for (const id of (Array.isArray(raw) ? raw : [])) {
|
|
1817
|
+
if (DEFAULT_TAB_ORDER.includes(id) && !seen.has(id)) { seen.add(id); out.push(id) }
|
|
1818
|
+
}
|
|
1819
|
+
for (const id of DEFAULT_TAB_ORDER) if (!seen.has(id)) out.push(id)
|
|
1820
|
+
return out
|
|
1821
|
+
}
|
|
1822
|
+
|
|
1823
|
+
function MainPage(props) {
|
|
1824
|
+
const { store } = props
|
|
1825
|
+
const t = props.t || fallbackT
|
|
1826
|
+
const view = useView(store)
|
|
1827
|
+
const [tab, setTab] = useState('tasks')
|
|
1828
|
+
const [settingsOpen, setSettingsOpen] = useState(false)
|
|
1829
|
+
const [tabOrder, setTabOrder] = useState(() => normalizeTabOrder(readFlag('smart-planner-tab-order', '')))
|
|
1830
|
+
const [draggingTab, setDraggingTab] = useState('')
|
|
1831
|
+
|
|
1832
|
+
useEffect(() => { writeFlag('smart-planner-tab-order', JSON.stringify(tabOrder)) }, [tabOrder])
|
|
1833
|
+
|
|
1834
|
+
const started = useRef(false)
|
|
1835
|
+
useEffect(() => {
|
|
1836
|
+
if (started.current) return
|
|
1837
|
+
started.current = true
|
|
1838
|
+
store.refresh()
|
|
1839
|
+
}, [store])
|
|
1840
|
+
|
|
1841
|
+
if (!view.snap) {
|
|
1842
|
+
return e('div', { className: 'sp-root', 'data-paper': view.paper || 'warm' }, e('div', { className: 'sp-inner' },
|
|
1843
|
+
e('div', { className: 'sp-card' },
|
|
1844
|
+
view.err
|
|
1845
|
+
? e(React.Fragment, null,
|
|
1846
|
+
e('div', { className: 'sp-err' }, t('loadError', { msg: view.err })),
|
|
1847
|
+
e(Btn, { onClick: () => store.refresh() }, t('retry')),
|
|
1848
|
+
)
|
|
1849
|
+
: e('div', { className: 'sp-empty' }, t('loading')),
|
|
1850
|
+
),
|
|
1851
|
+
))
|
|
1852
|
+
}
|
|
1853
|
+
|
|
1854
|
+
const snap = view.snap
|
|
1855
|
+
const tabLabels = {
|
|
1856
|
+
tasks: t('tabTasks'), plan: t('tabPlan'), capacity: t('tabCapacity'),
|
|
1857
|
+
board: t('tabBoard'), honors: t('tabHonors'), reviews: t('tabReviews'),
|
|
1858
|
+
}
|
|
1859
|
+
const tabs = normalizeTabOrder(tabOrder).map((id) => [id, tabLabels[id]])
|
|
1860
|
+
const moveTab = (from, to) => {
|
|
1861
|
+
if (!from || !to || from === to) return
|
|
1862
|
+
setTabOrder((current) => {
|
|
1863
|
+
const order = normalizeTabOrder(current)
|
|
1864
|
+
const fromIndex = order.indexOf(from)
|
|
1865
|
+
const toIndex = order.indexOf(to)
|
|
1866
|
+
const next = order.filter((id) => id !== from)
|
|
1867
|
+
const index = next.indexOf(to)
|
|
1868
|
+
next.splice(index < 0 ? next.length : (fromIndex < toIndex ? index + 1 : index), 0, from)
|
|
1869
|
+
return next
|
|
1870
|
+
})
|
|
1871
|
+
}
|
|
1872
|
+
|
|
1873
|
+
return e(LocaleContext.Provider, { value: t },
|
|
1874
|
+
e('div', { className: 'sp-root', 'data-paper': view.paper || 'warm' }, e('div', { className: 'sp-inner' },
|
|
1875
|
+
e('div', { className: 'sp-head' },
|
|
1876
|
+
e('div', { className: 'sp-grow' },
|
|
1877
|
+
e('div', { className: 'sp-title-row' },
|
|
1878
|
+
e('img', { src: ICON_BIRD, width: 32, height: 32, alt: '', 'aria-hidden': true, draggable: false, className: 'sp-title-bird' }),
|
|
1879
|
+
e('div', { className: 'sp-title' }, t('title')),
|
|
1880
|
+
),
|
|
1881
|
+
e('div', { className: 'sp-sub' }, t('subtitle', {
|
|
1882
|
+
review: snap.state.settings.reviewTime,
|
|
1883
|
+
morning: snap.state.settings.morningTime,
|
|
1884
|
+
weekly: snap.state.settings.weeklyHours,
|
|
1885
|
+
})),
|
|
1886
|
+
),
|
|
1887
|
+
e(Btn, { kind: 'ghost', onClick: () => setSettingsOpen(true) }, t('settings')),
|
|
1888
|
+
),
|
|
1889
|
+
e('div', { className: 'sp-level-legend' }, TASK_LEVELS.map((key) => e('div', {
|
|
1890
|
+
key, className: 'sp-level-item', tabIndex: 0,
|
|
1891
|
+
'data-tip': t(`level${key}Desc`),
|
|
1892
|
+
'aria-label': t(`level${key}Desc`),
|
|
1893
|
+
},
|
|
1894
|
+
e('span', { className: 'sp-level-key', 'data-level': key }, key),
|
|
1895
|
+
e('span', { className: 'sp-level-text' }, t(`levelLegend${key}`)),
|
|
1896
|
+
))),
|
|
1897
|
+
e('div', { className: 'sp-tabs', role: 'tablist' }, tabs.map(([id, label]) => e('button', {
|
|
1898
|
+
key: id, className: 'sp-tab', role: 'tab', 'aria-selected': tab === id ? 'true' : 'false',
|
|
1899
|
+
'data-on': tab === id ? '1' : '0', 'data-honor': id === 'honors' ? '1' : undefined,
|
|
1900
|
+
'data-dragging': draggingTab === id ? '1' : undefined,
|
|
1901
|
+
draggable: true,
|
|
1902
|
+
title: t('tabReorderHint'),
|
|
1903
|
+
onClick: () => setTab(id),
|
|
1904
|
+
onDragStart: (ev) => {
|
|
1905
|
+
setDraggingTab(id)
|
|
1906
|
+
if (ev.dataTransfer) {
|
|
1907
|
+
ev.dataTransfer.effectAllowed = 'move'
|
|
1908
|
+
ev.dataTransfer.setData('text/plain', id)
|
|
1909
|
+
}
|
|
1910
|
+
},
|
|
1911
|
+
onDragOver: (ev) => {
|
|
1912
|
+
ev.preventDefault()
|
|
1913
|
+
if (ev.dataTransfer) ev.dataTransfer.dropEffect = 'move'
|
|
1914
|
+
},
|
|
1915
|
+
onDrop: (ev) => {
|
|
1916
|
+
ev.preventDefault()
|
|
1917
|
+
const from = ev.dataTransfer ? ev.dataTransfer.getData('text/plain') : ''
|
|
1918
|
+
setDraggingTab('')
|
|
1919
|
+
moveTab(from, id)
|
|
1920
|
+
},
|
|
1921
|
+
onDragEnd: () => setDraggingTab(''),
|
|
1922
|
+
onKeyDown: (ev) => {
|
|
1923
|
+
if (!ev.altKey || (ev.key !== 'ArrowLeft' && ev.key !== 'ArrowRight')) return
|
|
1924
|
+
ev.preventDefault()
|
|
1925
|
+
const index = tabs.findIndex(([x]) => x === id)
|
|
1926
|
+
const nextIndex = ev.key === 'ArrowLeft' ? index - 1 : index + 1
|
|
1927
|
+
if (nextIndex < 0 || nextIndex >= tabs.length) return
|
|
1928
|
+
moveTab(id, tabs[nextIndex][0])
|
|
1929
|
+
},
|
|
1930
|
+
}, label)), e('span', { className: 'sp-tab-order-hint', title: t('tabReorderHint') }, t('tabOrderHint'))),
|
|
1931
|
+
view.err ? e('div', { className: 'sp-card sp-err' }, t('loadError', { msg: view.err })) : null,
|
|
1932
|
+
tab === 'tasks' ? e(TasksView, { store, snap }) : null,
|
|
1933
|
+
tab === 'plan' ? e(PlanView, { store, snap }) : null,
|
|
1934
|
+
tab === 'capacity' ? e(CapacityView, { snap }) : null,
|
|
1935
|
+
tab === 'board' ? e(BoardView, { snap, store }) : null,
|
|
1936
|
+
tab === 'honors' ? e(HonorsView, { snap }) : null,
|
|
1937
|
+
tab === 'reviews' ? e(ReviewsView, { store, snap }) : null,
|
|
1938
|
+
settingsOpen ? e(SettingsModal, { store, snap, onClose: () => setSettingsOpen(false) }) : null,
|
|
1939
|
+
)),
|
|
1940
|
+
)
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
function missedReviewDay(snap) {
|
|
1944
|
+
const yesterday = addKey(snap.today, -1)
|
|
1945
|
+
const plan = snap.dayPlans && snap.dayPlans[yesterday]
|
|
1946
|
+
if (!plan || !Array.isArray(plan.tasks) || !plan.tasks.length) return ''
|
|
1947
|
+
if ((snap.state.reviews || []).some((r) => r.date === yesterday)) return ''
|
|
1948
|
+
return yesterday
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
function dueReviews(snap, now, snoozed, dismissed) {
|
|
1952
|
+
const today = snap.today
|
|
1953
|
+
const time = hhmm()
|
|
1954
|
+
const settings = snap.state.settings
|
|
1955
|
+
const out = []
|
|
1956
|
+
const missed = missedReviewDay(snap)
|
|
1957
|
+
if (missed && dismissed !== `missed:${today}`) out.push('missed')
|
|
1958
|
+
const todayReview = snap.state.reviews.some((r) => r.date === today)
|
|
1959
|
+
if (time >= settings.reviewTime && !todayReview && snoozed !== today) out.push('daily')
|
|
1960
|
+
const keys = periodKeys(now)
|
|
1961
|
+
const hasWeek = snap.state.periods.some((p) => p.kind === 'week' && p.key === keys.week)
|
|
1962
|
+
const hasMonth = snap.state.periods.some((p) => p.kind === 'month' && p.key === keys.month)
|
|
1963
|
+
if (now.getDay() === 0 && time >= settings.reviewTime && !hasWeek && dismissed !== `week:${today}`) out.push('week')
|
|
1964
|
+
if (isLastDayOfMonth(now) && time >= settings.reviewTime && !hasMonth && dismissed !== `month:${today}`) out.push('month')
|
|
1965
|
+
return out
|
|
1966
|
+
}
|
|
1967
|
+
|
|
1968
|
+
const WELCOME_KEY = 'smart-planner-welcomed'
|
|
1969
|
+
const FLOAT_KEY = 'smart-planner-float-collapsed'
|
|
1970
|
+
|
|
1971
|
+
function readFlag(key, fallback) {
|
|
1972
|
+
try { const value = localStorage.getItem(key); return value == null ? fallback : value } catch { return fallback }
|
|
1973
|
+
}
|
|
1974
|
+
function writeFlag(key, value) {
|
|
1975
|
+
try { localStorage.setItem(key, value) } catch { /* localStorage may be unavailable */ }
|
|
1976
|
+
}
|
|
1977
|
+
function helloKey(hour) {
|
|
1978
|
+
if (hour < 6) return 'welcomeHelloEvening'
|
|
1979
|
+
if (hour < 12) return 'welcomeHelloMorning'
|
|
1980
|
+
if (hour < 18) return 'welcomeHelloAfternoon'
|
|
1981
|
+
return 'welcomeHelloEvening'
|
|
1982
|
+
}
|
|
1983
|
+
function encouragementKey() {
|
|
1984
|
+
const now = new Date()
|
|
1985
|
+
return `encourage${((now.getDate() + now.getMonth()) % 4) + 1}`
|
|
1986
|
+
}
|
|
1987
|
+
|
|
1988
|
+
function WelcomeModal({ t, snap, onStart, onLater }) {
|
|
1989
|
+
const hour = new Date().getHours()
|
|
1990
|
+
const todayRow = (snap.capacity || []).find((row) => row.date === snap.today)
|
|
1991
|
+
const left = todayRow ? round1(todayRow.remaining) : 0
|
|
1992
|
+
return e(Modal, { title: t('welcomeTitle'), subtitle: `${t(helloKey(hour))},很高兴见到你。`, onClose: onLater, width: 620 },
|
|
1993
|
+
e('div', { className: 'sp-welcome-body' }, t('welcomeBody')),
|
|
1994
|
+
e('div', { className: 'sp-welcome-format' },
|
|
1995
|
+
e('div', { className: 'sp-welcome-label' }, t('welcomeFormat')),
|
|
1996
|
+
e('div', { className: 'sp-welcome-example' }, t('welcomeExample')),
|
|
1997
|
+
),
|
|
1998
|
+
e('div', { className: 'sp-muted', style: { marginTop: 10 } },
|
|
1999
|
+
todayRow ? t('floatToday', { left }) : t('floatNoPlan')),
|
|
2000
|
+
e('div', { className: 'sp-muted', style: { marginTop: 4 } }, t('welcomeHint')),
|
|
2001
|
+
e('div', { className: 'sp-row', style: { justifyContent: 'flex-end', marginTop: 14 } },
|
|
2002
|
+
e(Btn, { kind: 'ghost', onClick: onLater }, t('welcomeLater')),
|
|
2003
|
+
e(Btn, { kind: 'primary', onClick: onStart }, t('welcomeStart')),
|
|
2004
|
+
),
|
|
2005
|
+
)
|
|
2006
|
+
}
|
|
2007
|
+
|
|
2008
|
+
function FloatingAssistant({ t, snap, open, onToggle, onOpen }) {
|
|
2009
|
+
const hour = new Date().getHours()
|
|
2010
|
+
const todayRow = (snap.capacity || []).find((row) => row.date === snap.today)
|
|
2011
|
+
const left = todayRow ? round1(todayRow.remaining) : 0
|
|
2012
|
+
const reviewDone = snap.state.reviews.some((review) => review.date === snap.today)
|
|
2013
|
+
const reviewDue = hhmm() >= snap.state.settings.reviewTime
|
|
2014
|
+
const status = reviewDone
|
|
2015
|
+
? t('floatReviewDone')
|
|
2016
|
+
: reviewDue
|
|
2017
|
+
? t('floatReviewNow')
|
|
2018
|
+
: t('floatReviewSoon', { time: snap.state.settings.reviewTime })
|
|
2019
|
+
return e('div', { className: 'sp-float', 'data-open': open ? '1' : '0' },
|
|
2020
|
+
e('button', {
|
|
2021
|
+
type: 'button', className: 'sp-float-head', onClick: onToggle,
|
|
2022
|
+
'aria-expanded': open ? 'true' : 'false', 'aria-label': open ? t('floatCollapse') : t('floatExpand'),
|
|
2023
|
+
},
|
|
2024
|
+
e('span', { className: 'sp-float-dot' }, '任'),
|
|
2025
|
+
e('span', { className: 'sp-float-title' }, open ? t('floatTitle') : t('floatExpand')),
|
|
2026
|
+
e('span', { className: 'sp-float-chevron' }, open ? '−' : '+'),
|
|
2027
|
+
),
|
|
2028
|
+
open ? e('div', { className: 'sp-float-body' },
|
|
2029
|
+
e('div', { className: 'sp-float-hello' }, `${t(helloKey(hour))},${t(encouragementKey())}`),
|
|
2030
|
+
e('div', { className: 'sp-muted', style: { marginTop: 6 } }, status),
|
|
2031
|
+
e('div', { className: 'sp-muted', style: { marginTop: 2 } },
|
|
2032
|
+
todayRow ? t('floatToday', { left }) : t('floatNoPlan')),
|
|
2033
|
+
e('div', { className: 'sp-float-prompt' }, t('floatPrompt')),
|
|
2034
|
+
e('div', { className: 'sp-row', style: { marginTop: 10 } },
|
|
2035
|
+
e(Btn, { kind: 'primary', onClick: onOpen }, t('floatOpen')),
|
|
2036
|
+
e(Btn, { kind: 'ghost', onClick: onToggle }, t('floatCollapse')),
|
|
2037
|
+
),
|
|
2038
|
+
) : null,
|
|
2039
|
+
)
|
|
2040
|
+
}
|
|
2041
|
+
|
|
2042
|
+
function FishHeader({ store, openFixed, t }) {
|
|
2043
|
+
const tt = t || fallbackT
|
|
2044
|
+
const view = useView(store)
|
|
2045
|
+
const timer = useRef(0)
|
|
2046
|
+
const last = useRef(0)
|
|
2047
|
+
const onClick = (ev) => {
|
|
2048
|
+
ev.preventDefault()
|
|
2049
|
+
ev.stopPropagation()
|
|
2050
|
+
const rect = ev.currentTarget.getBoundingClientRect()
|
|
2051
|
+
const now = Date.now()
|
|
2052
|
+
if (now - last.current < 280) {
|
|
2053
|
+
if (timer.current) clearTimeout(timer.current)
|
|
2054
|
+
timer.current = 0
|
|
2055
|
+
last.current = 0
|
|
2056
|
+
store.setFish(false)
|
|
2057
|
+
openFixed()
|
|
2058
|
+
return
|
|
2059
|
+
}
|
|
2060
|
+
last.current = now
|
|
2061
|
+
const nextOpen = !store.get().fishOpen
|
|
2062
|
+
timer.current = setTimeout(() => {
|
|
2063
|
+
last.current = 0
|
|
2064
|
+
store.setFish(nextOpen, { left: rect.left, top: rect.bottom + 8 })
|
|
2065
|
+
}, 240)
|
|
2066
|
+
}
|
|
2067
|
+
return e('button', {
|
|
2068
|
+
type: 'button', className: 'sp-fish-btn', onClick,
|
|
2069
|
+
title: tt('fishHint'), 'aria-label': tt('fishHint'),
|
|
2070
|
+
},
|
|
2071
|
+
e('img', {
|
|
2072
|
+
src: ICON_BIRD, width: 30, height: 30, alt: '', 'aria-hidden': true,
|
|
2073
|
+
draggable: false, className: 'sp-bird-img',
|
|
2074
|
+
}),
|
|
2075
|
+
)
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
function GreetingBanner({ store, openPanel, session, t }) {
|
|
2079
|
+
const tt = t || fallbackT
|
|
2080
|
+
const view = useView(store)
|
|
2081
|
+
const fixed = view.fixedSessionId
|
|
2082
|
+
const key = fixed ? `smart-planner-greet-${fixed}` : ''
|
|
2083
|
+
const [hidden, setHidden] = useState(() => Boolean(key && readFlag(key, '0') === '1'))
|
|
2084
|
+
useEffect(() => { setHidden(Boolean(key && readFlag(key, '0') === '1')) }, [key])
|
|
2085
|
+
if (!fixed || !session || session.sessionId !== fixed || hidden) return null
|
|
2086
|
+
const close = () => { if (key) writeFlag(key, '1'); setHidden(true) }
|
|
2087
|
+
const first = Boolean(session.blank)
|
|
2088
|
+
return e('div', { className: 'sp-greeting' },
|
|
2089
|
+
e('div', { className: 'sp-greeting-title' }, tt(first ? 'greetingTitle' : 'greetingBackTitle')),
|
|
2090
|
+
e('div', { className: 'sp-greeting-body' }, tt(first ? 'greetingBody' : 'greetingBackBody')),
|
|
2091
|
+
first ? e('div', { className: 'sp-greeting-format' }, tt('greetingFormat')) : null,
|
|
2092
|
+
first ? e('div', { className: 'sp-greeting-example' }, tt('greetingExample')) : null,
|
|
2093
|
+
e('div', { className: 'sp-greeting-actions' },
|
|
2094
|
+
e(Btn, { kind: 'primary', onClick: openPanel }, tt('greetingOpen')),
|
|
2095
|
+
e(Btn, { kind: 'ghost', onClick: close }, tt('greetingDismiss')),
|
|
2096
|
+
),
|
|
2097
|
+
)
|
|
2098
|
+
}
|
|
2099
|
+
|
|
2100
|
+
function FishPopover({ store, snap, anchor, t }) {
|
|
2101
|
+
if (!snap) return null
|
|
2102
|
+
const day = (snap.plan.days || []).find((row) => row.date === snap.today)
|
|
2103
|
+
const tasks = day ? day.tasks : []
|
|
2104
|
+
const width = 310
|
|
2105
|
+
const left = Math.max(8, Math.min(anchor ? anchor.left : 18, (window.innerWidth || 1200) - width - 8))
|
|
2106
|
+
const top = Math.max(56, Math.min(anchor ? anchor.top : 80, (window.innerHeight || 800) - 340))
|
|
2107
|
+
const close = () => store.setFish(false)
|
|
2108
|
+
return e(React.Fragment, null,
|
|
2109
|
+
e('div', { className: 'sp-fish-mask', onClick: close }),
|
|
2110
|
+
e('div', {
|
|
2111
|
+
className: 'sp-fish-pop', style: { left, top, width }, onClick: (ev) => ev.stopPropagation(),
|
|
2112
|
+
},
|
|
2113
|
+
e('div', { className: 'sp-fish-pop-head' },
|
|
2114
|
+
e('div', { className: 'sp-grow' },
|
|
2115
|
+
e('div', { style: { fontWeight: 600 } }, t('fishToday')),
|
|
2116
|
+
e('div', { className: 'sp-muted' }, snap.today),
|
|
2117
|
+
),
|
|
2118
|
+
e('button', { type: 'button', className: 'sp-x', onClick: close, 'aria-label': t('close') }, '✕'),
|
|
2119
|
+
),
|
|
2120
|
+
tasks.length
|
|
2121
|
+
? tasks.map((task) => e('label', { key: `${task.taskId}-${task.date}`, className: 'sp-fish-item' },
|
|
2122
|
+
e('input', {
|
|
2123
|
+
type: 'checkbox', className: 'sp-check', checked: Boolean(task.done),
|
|
2124
|
+
onChange: () => store.act({
|
|
2125
|
+
type: 'completeChunk', taskId: task.taskId, date: task.date || snap.today,
|
|
2126
|
+
done: !task.done, hours: task.hours,
|
|
2127
|
+
}),
|
|
2128
|
+
}),
|
|
2129
|
+
e('span', { className: 'sp-grow', style: task.done ? { textDecoration: 'line-through', color: 'var(--dsw-alias-label-tertiary)' } : null }, task.title),
|
|
2130
|
+
e('span', { className: 'sp-muted' }, `${task.hours}h`),
|
|
2131
|
+
))
|
|
2132
|
+
: e('div', { className: 'sp-fish-empty' }, t('fishEmpty')),
|
|
2133
|
+
e('div', { className: 'sp-fish-foot' }, t('fishDoubleHint')),
|
|
2134
|
+
),
|
|
2135
|
+
)
|
|
2136
|
+
}
|
|
2137
|
+
|
|
2138
|
+
function sessionTime(value) {
|
|
2139
|
+
if (value == null || value === '') return ''
|
|
2140
|
+
const numeric = typeof value === 'number' || /^\d{10,}$/.test(String(value))
|
|
2141
|
+
let ms = numeric ? Number(value) : NaN
|
|
2142
|
+
if (numeric && String(value).length === 10) ms *= 1000
|
|
2143
|
+
const date = numeric ? new Date(ms) : new Date(String(value))
|
|
2144
|
+
if (Number.isNaN(date.getTime())) return ''
|
|
2145
|
+
const pad = (n) => String(n).padStart(2, '0')
|
|
2146
|
+
return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())} ${pad(date.getHours())}:${pad(date.getMinutes())}`
|
|
2147
|
+
}
|
|
2148
|
+
|
|
2149
|
+
function SessionChooser({ choices, currentId, onChoose, onClose, t }) {
|
|
2150
|
+
const [selected, setSelected] = useState(currentId || '')
|
|
2151
|
+
const current = (choices || []).find((row) => row.id === selected)
|
|
2152
|
+
return e(Modal, {
|
|
2153
|
+
title: t('sessionChooserTitle'), subtitle: t('sessionChooserHint'), onClose, width: 620,
|
|
2154
|
+
},
|
|
2155
|
+
e('div', { className: 'sp-session-list' }, (choices || []).map((row) => {
|
|
2156
|
+
const createdRaw = row.createdAt || row.created
|
|
2157
|
+
const created = sessionTime(createdRaw || row.updatedAt)
|
|
2158
|
+
const updated = sessionTime(row.updatedAt)
|
|
2159
|
+
const createdLabel = createdRaw ? t('sessionCreated', { time: created }) : t('sessionUpdated', { time: updated || created })
|
|
2160
|
+
const isSelected = selected === row.id
|
|
2161
|
+
return e('button', {
|
|
2162
|
+
key: row.id, type: 'button',
|
|
2163
|
+
className: 'sp-session-row',
|
|
2164
|
+
'data-selected': isSelected ? '1' : '0',
|
|
2165
|
+
onClick: () => setSelected(row.id),
|
|
2166
|
+
},
|
|
2167
|
+
e('div', { className: 'sp-grow' },
|
|
2168
|
+
e('div', { className: 'sp-session-name' }, row.title || row.displayTitle || t('panel')),
|
|
2169
|
+
e('div', { className: 'sp-session-sub' },
|
|
2170
|
+
created ? createdLabel : t('sessionNoTime'),
|
|
2171
|
+
createdRaw && updated && updated !== created ? ` · ${t('sessionUpdated', { time: updated })}` : '',
|
|
2172
|
+
),
|
|
2173
|
+
),
|
|
2174
|
+
e('span', { className: 'sp-session-mark' }, isSelected ? t('sessionSelected') : t('sessionSelect')),
|
|
2175
|
+
)
|
|
2176
|
+
})),
|
|
2177
|
+
e('div', { className: 'sp-muted', style: { marginTop: 10 } }, t('sessionFinalHint')),
|
|
2178
|
+
e('div', { className: 'sp-row', style: { justifyContent: 'flex-end', marginTop: 12 } },
|
|
2179
|
+
e(Btn, { kind: 'ghost', onClick: onClose }, t('cancel')),
|
|
2180
|
+
e(Btn, { kind: 'primary', disabled: !current, onClick: () => current && onChoose(current.id) }, t('sessionConfirm')),
|
|
2181
|
+
),
|
|
2182
|
+
)
|
|
2183
|
+
}
|
|
2184
|
+
|
|
2185
|
+
function ReminderLayer(props) {
|
|
2186
|
+
const { store, chooseFixed } = props
|
|
2187
|
+
const t = props.t || fallbackT
|
|
2188
|
+
const view = useView(store)
|
|
2189
|
+
const [now, setNow] = useState(new Date())
|
|
2190
|
+
const [snoozed, setSnoozed] = useState('')
|
|
2191
|
+
const [dismissed, setDismissed] = useState('')
|
|
2192
|
+
const [active, setActive] = useState(null)
|
|
2193
|
+
const started = useRef(false)
|
|
2194
|
+
|
|
2195
|
+
useEffect(() => {
|
|
2196
|
+
if (started.current) return
|
|
2197
|
+
started.current = true
|
|
2198
|
+
store.refresh()
|
|
2199
|
+
}, [store])
|
|
2200
|
+
|
|
2201
|
+
useEffect(() => {
|
|
2202
|
+
const id = setInterval(() => setNow(new Date()), 20000)
|
|
2203
|
+
return () => clearInterval(id)
|
|
2204
|
+
}, [])
|
|
2205
|
+
|
|
2206
|
+
useEffect(() => {
|
|
2207
|
+
if (!view.snap || active) return
|
|
2208
|
+
if (view.requested) {
|
|
2209
|
+
const kind = view.requested
|
|
2210
|
+
store.clearRequest()
|
|
2211
|
+
setActive(kind)
|
|
2212
|
+
return
|
|
2213
|
+
}
|
|
2214
|
+
const due = dueReviews(view.snap, now, snoozed, dismissed)
|
|
2215
|
+
if (due.length) setActive(due[0])
|
|
2216
|
+
}, [view, now, snoozed, dismissed, active, store])
|
|
2217
|
+
|
|
2218
|
+
if (!view.snap) return null
|
|
2219
|
+
const snap = view.snap
|
|
2220
|
+
const today = snap.today
|
|
2221
|
+
const settings = snap.state.settings
|
|
2222
|
+
const time = hhmm()
|
|
2223
|
+
const morningDue = time >= settings.morningTime && !(snap.state.acks[today] || {}).morning
|
|
2224
|
+
const todayPlan = snap.plan.days.find((d) => d.date === today)
|
|
2225
|
+
|
|
2226
|
+
return e(LocaleContext.Provider, { value: t },
|
|
2227
|
+
morningDue && !active
|
|
2228
|
+
? e('div', { className: 'sp-banner', role: 'status' },
|
|
2229
|
+
e('div', { className: 'sp-row' },
|
|
2230
|
+
e('div', { className: 'sp-grow' },
|
|
2231
|
+
e('div', { style: { fontWeight: 600 } }, t('morningTitle')),
|
|
2232
|
+
e('div', { className: 'sp-muted' }, t('morningSub', { date: today, n: todayPlan ? todayPlan.tasks.length : 0 })),
|
|
2233
|
+
),
|
|
2234
|
+
e(Btn, {
|
|
2235
|
+
kind: 'ghost',
|
|
2236
|
+
onClick: async () => { await store.act({ type: 'ack', date: today, channel: 'morning' }) },
|
|
2237
|
+
}, t('gotIt')),
|
|
2238
|
+
),
|
|
2239
|
+
e('div', { style: { marginTop: 8 } },
|
|
2240
|
+
todayPlan && todayPlan.tasks.length
|
|
2241
|
+
? todayPlan.tasks.map((task) => e('div', { key: `${task.taskId}-${task.date}`, className: 'sp-morning-task' },
|
|
2242
|
+
e('div', { className: 'sp-morning-title' }, task.title),
|
|
2243
|
+
e('div', { className: 'sp-morning-meta' }, `${task.hours}h · ${task.project}`),
|
|
2244
|
+
))
|
|
2245
|
+
: e('div', { className: 'sp-muted' }, t('morningEmpty')),
|
|
2246
|
+
),
|
|
2247
|
+
)
|
|
2248
|
+
: null,
|
|
2249
|
+
view.sessionChoices && view.sessionChoices.length
|
|
2250
|
+
? e(SessionChooser, { choices: view.sessionChoices, currentId: view.fixedSessionId, onChoose: chooseFixed, onClose: () => store.setSessionChoices([]), t })
|
|
2251
|
+
: null,
|
|
2252
|
+
view.fishOpen ? e(FishPopover, { store, snap, anchor: view.fishAnchor, t }) : null,
|
|
2253
|
+
active === 'missed' ? e(DailyReviewModal, {
|
|
2254
|
+
store, snap, missed: true,
|
|
2255
|
+
date: missedReviewDay(snap),
|
|
2256
|
+
dayPlan: snap.dayPlans && snap.dayPlans[missedReviewDay(snap)],
|
|
2257
|
+
onClose: () => { setDismissed(`missed:${today}`); setActive(null) },
|
|
2258
|
+
onDone: () => setActive(null),
|
|
2259
|
+
}) : null,
|
|
2260
|
+
active === 'daily' ? e(DailyReviewModal, {
|
|
2261
|
+
store, snap,
|
|
2262
|
+
onClose: () => { setSnoozed(today); setActive(null) },
|
|
2263
|
+
onDone: () => setActive(null),
|
|
2264
|
+
}) : null,
|
|
2265
|
+
active === 'week' || active === 'month' ? e(PeriodReviewModal, {
|
|
2266
|
+
store, snap, kind: active,
|
|
2267
|
+
onClose: () => { setDismissed(`${active}:${today}`); setActive(null) },
|
|
2268
|
+
onDone: () => setActive(null),
|
|
2269
|
+
}) : null,
|
|
2270
|
+
)
|
|
2271
|
+
}
|
|
2272
|
+
|
|
2273
|
+
function DailyReviewModal({ store, snap, onClose, onDone, date, dayPlan, missed }) {
|
|
2274
|
+
const t = useT()
|
|
2275
|
+
const today = date || snap.today
|
|
2276
|
+
const todayPlan = dayPlan || snap.plan.days.find((d) => d.date === today) || { tasks: [] }
|
|
2277
|
+
const tomorrow = addKey(today, 1)
|
|
2278
|
+
const tomorrowPlan = snap.plan.days.find((d) => d.date === tomorrow) || { tasks: [] }
|
|
2279
|
+
const [step, setStep] = useState(0)
|
|
2280
|
+
const [items, setItems] = useState(() => todayPlan.tasks.map((task) => ({
|
|
2281
|
+
taskId: task.taskId, projectId: task.projectId, title: task.title, project: task.project, hours: task.hours,
|
|
2282
|
+
done: Boolean(task.done), reason: '', note: '', move: '',
|
|
2283
|
+
})))
|
|
2284
|
+
const [tomorrowSel, setTomorrowSel] = useState(() => new Set(tomorrowPlan.tasks.map((task) => task.taskId)))
|
|
2285
|
+
const [reflection, setReflection] = useState('')
|
|
2286
|
+
const [advice, setAdvice] = useState([])
|
|
2287
|
+
const [error, setError] = useState('')
|
|
2288
|
+
const [busy, setBusy] = useState(false)
|
|
2289
|
+
|
|
2290
|
+
const update = (index, patch) => setItems(items.map((item, i) => (i === index ? { ...item, ...patch } : item)))
|
|
2291
|
+
|
|
2292
|
+
const next = () => {
|
|
2293
|
+
const missing = items.find((item) => !item.done && !item.reason)
|
|
2294
|
+
if (missing) { setError(t('reasonRequired', { title: missing.title })); return }
|
|
2295
|
+
setError('')
|
|
2296
|
+
setStep(1)
|
|
2297
|
+
}
|
|
2298
|
+
|
|
2299
|
+
const submit = async () => {
|
|
2300
|
+
setBusy(true)
|
|
2301
|
+
try {
|
|
2302
|
+
const data = await store.act({
|
|
2303
|
+
type: 'review',
|
|
2304
|
+
date: today,
|
|
2305
|
+
items: items.map((item) => ({
|
|
2306
|
+
taskId: item.taskId, done: item.done, hours: item.hours,
|
|
2307
|
+
reason: item.reason, note: item.note, move: item.move,
|
|
2308
|
+
})),
|
|
2309
|
+
tomorrow: [...tomorrowSel],
|
|
2310
|
+
reflection,
|
|
2311
|
+
})
|
|
2312
|
+
setAdvice(Array.isArray(data.review?.advice) ? data.review.advice : [])
|
|
2313
|
+
setStep(2)
|
|
2314
|
+
} catch (err) {
|
|
2315
|
+
setError(err.message)
|
|
2316
|
+
} finally {
|
|
2317
|
+
setBusy(false)
|
|
2318
|
+
}
|
|
2319
|
+
}
|
|
2320
|
+
|
|
2321
|
+
return e(Modal, {
|
|
2322
|
+
title: missed ? t('missedReviewTitle') : t('reviewTitle'),
|
|
2323
|
+
subtitle: missed ? t('missedReviewSub', { date: today }) : t('reviewSub', { date: today }),
|
|
2324
|
+
onClose,
|
|
2325
|
+
},
|
|
2326
|
+
e('div', { className: 'sp-muted', style: { marginBottom: 8 } }, step === 0 ? t('verifyStep') : step === 2 ? t('reviewAdvice') : missed ? t('confirmTodayStep') : t('tomorrowStep')),
|
|
2327
|
+
step === 2
|
|
2328
|
+
? e('div', { className: 'sp-review-advice' },
|
|
2329
|
+
e('div', { className: 'sp-review-advice-title' }, t('reviewAdvice')),
|
|
2330
|
+
advice.length ? e('ul', null, advice.map((tip, i) => e('li', { key: i }, tip))) : e('div', { className: 'sp-muted' }, t('reviewAdviceEmpty')),
|
|
2331
|
+
)
|
|
2332
|
+
: step === 0
|
|
2333
|
+
? e('div', null,
|
|
2334
|
+
todayPlan.tasks.length === 0
|
|
2335
|
+
? e('div', { className: 'sp-empty' }, t('noTasksToday'))
|
|
2336
|
+
: items.map((item, index) => e('div', { key: `${item.taskId}-${index}`, style: { padding: '8px 0', borderTop: '1px solid var(--dsw-alias-border-l1)' } },
|
|
2337
|
+
e('label', { className: 'sp-review-item sp-review-check-row' },
|
|
2338
|
+
e('input', {
|
|
2339
|
+
type: 'checkbox', className: 'sp-check', checked: item.done,
|
|
2340
|
+
onChange: () => update(index, { done: !item.done, reason: item.done ? item.reason : '' }),
|
|
2341
|
+
}),
|
|
2342
|
+
e('div', { className: 'sp-review-main' },
|
|
2343
|
+
e('div', { className: 'sp-review-title' }, item.title),
|
|
2344
|
+
e('div', { className: 'sp-review-meta' }, `${item.project} · ${item.hours}h`),
|
|
2345
|
+
),
|
|
2346
|
+
),
|
|
2347
|
+
!item.done ? e('div', { style: { marginLeft: 24, marginTop: 4 } },
|
|
2348
|
+
e('div', { className: 'sp-row' },
|
|
2349
|
+
e('select', {
|
|
2350
|
+
className: 'sp-select', value: item.reason,
|
|
2351
|
+
onChange: (ev) => update(index, { reason: ev.target.value }),
|
|
2352
|
+
},
|
|
2353
|
+
e('option', { value: '' }, t('reasonPlaceholder')),
|
|
2354
|
+
snap.reasons.map((reason) => e('option', { key: reason, value: reason }, reason)),
|
|
2355
|
+
),
|
|
2356
|
+
e('input', {
|
|
2357
|
+
className: 'sp-input sp-grow', placeholder: t('notePlaceholder'), value: item.note,
|
|
2358
|
+
onChange: (ev) => update(index, { note: ev.target.value }),
|
|
2359
|
+
}),
|
|
2360
|
+
),
|
|
2361
|
+
e('div', { className: 'sp-row', style: { marginTop: 4 } },
|
|
2362
|
+
e('select', {
|
|
2363
|
+
className: 'sp-select', value: item.move,
|
|
2364
|
+
onChange: (ev) => update(index, { move: ev.target.value }),
|
|
2365
|
+
'aria-label': t('reviewMove'),
|
|
2366
|
+
},
|
|
2367
|
+
e('option', { value: '' }, t('movePlaceholder')),
|
|
2368
|
+
e('option', {
|
|
2369
|
+
value: 'buffer',
|
|
2370
|
+
disabled: !(snap.state.projects.find((p) => p.id === item.projectId)?.buffer === 'day'),
|
|
2371
|
+
}, t('moveBuffer')),
|
|
2372
|
+
e('option', { value: 'gap' }, t('moveGap')),
|
|
2373
|
+
e('option', { value: 'keep' }, t('moveKeep')),
|
|
2374
|
+
),
|
|
2375
|
+
),
|
|
2376
|
+
) : null,
|
|
2377
|
+
)),
|
|
2378
|
+
)
|
|
2379
|
+
: e('div', null,
|
|
2380
|
+
e('div', { style: { fontWeight: 600, marginBottom: 4 } }, missed ? t('confirmTodayTitle') : t('tomorrowTitle')),
|
|
2381
|
+
e('div', { className: 'sp-muted', style: { marginBottom: 6 } }, missed ? t('confirmTodayHint') : t('tomorrowHint')),
|
|
2382
|
+
tomorrowPlan.tasks.length
|
|
2383
|
+
? tomorrowPlan.tasks.map((task) => e('label', { key: `${task.taskId}-${task.date}`, className: 'sp-review-item sp-review-check-row' },
|
|
2384
|
+
e('input', {
|
|
2385
|
+
type: 'checkbox', className: 'sp-check', checked: tomorrowSel.has(task.taskId),
|
|
2386
|
+
onChange: () => {
|
|
2387
|
+
const nextSet = new Set(tomorrowSel)
|
|
2388
|
+
if (nextSet.has(task.taskId)) nextSet.delete(task.taskId)
|
|
2389
|
+
else nextSet.add(task.taskId)
|
|
2390
|
+
setTomorrowSel(nextSet)
|
|
2391
|
+
},
|
|
2392
|
+
}),
|
|
2393
|
+
e('div', { className: 'sp-review-main' },
|
|
2394
|
+
e('div', { className: 'sp-review-title' }, task.title),
|
|
2395
|
+
e('div', { className: 'sp-review-meta' }, `${task.project} · ${task.hours}h`),
|
|
2396
|
+
),
|
|
2397
|
+
))
|
|
2398
|
+
: e('div', { className: 'sp-muted' }, t('noTasksToday')),
|
|
2399
|
+
e('label', { className: 'sp-field', style: { marginTop: 12 } },
|
|
2400
|
+
e('span', { className: 'sp-label' }, t('periodReflection')),
|
|
2401
|
+
e('textarea', {
|
|
2402
|
+
className: 'sp-input', rows: 3, style: { width: '100%', resize: 'vertical' },
|
|
2403
|
+
placeholder: t('reflectionPlaceholder'), value: reflection,
|
|
2404
|
+
onChange: (ev) => setReflection(ev.target.value),
|
|
2405
|
+
}),
|
|
2406
|
+
),
|
|
2407
|
+
),
|
|
2408
|
+
error ? e('div', { className: 'sp-err', style: { marginTop: 8 } }, error) : null,
|
|
2409
|
+
e('div', { className: 'sp-row', style: { justifyContent: 'flex-end', marginTop: 14 } },
|
|
2410
|
+
e(Btn, { kind: 'ghost', onClick: onClose }, t('later')),
|
|
2411
|
+
step === 1 ? e(Btn, { kind: 'ghost', onClick: () => { setError(''); setStep(0) } }, t('back')) : null,
|
|
2412
|
+
step === 2
|
|
2413
|
+
? e(Btn, { kind: 'primary', onClick: onDone }, t('reviewDone'))
|
|
2414
|
+
: step === 0
|
|
2415
|
+
? e(Btn, { kind: 'primary', onClick: next }, t('next'))
|
|
2416
|
+
: e(Btn, { kind: 'primary', disabled: busy, onClick: submit }, busy ? t('submitting') : t('submit')),
|
|
2417
|
+
),
|
|
2418
|
+
)
|
|
2419
|
+
}
|
|
2420
|
+
|
|
2421
|
+
function PeriodReviewModal({ store, snap, kind, onClose, onDone }) {
|
|
2422
|
+
const t = useT()
|
|
2423
|
+
const stats = kind === 'month' ? snap.summaries.month : snap.summaries.week
|
|
2424
|
+
const [reflection, setReflection] = useState('')
|
|
2425
|
+
const [planNote, setPlanNote] = useState('')
|
|
2426
|
+
const [error, setError] = useState('')
|
|
2427
|
+
const [busy, setBusy] = useState(false)
|
|
2428
|
+
const reasons = Object.entries(stats.reasons).map(([k, v]) => `${k}×${v}`).join('、')
|
|
2429
|
+
|
|
2430
|
+
const submit = async () => {
|
|
2431
|
+
setBusy(true)
|
|
2432
|
+
try {
|
|
2433
|
+
await store.act({ type: 'period', kind, reflection, planNote })
|
|
2434
|
+
onDone()
|
|
2435
|
+
} catch (err) {
|
|
2436
|
+
setError(err.message)
|
|
2437
|
+
} finally {
|
|
2438
|
+
setBusy(false)
|
|
2439
|
+
}
|
|
2440
|
+
}
|
|
2441
|
+
|
|
2442
|
+
return e(Modal, {
|
|
2443
|
+
title: kind === 'month' ? t('periodMonthTitle') : t('periodWeekTitle'),
|
|
2444
|
+
subtitle: t('periodSub', { from: stats.from, to: stats.to }),
|
|
2445
|
+
onClose,
|
|
2446
|
+
},
|
|
2447
|
+
e('div', { className: 'sp-row', style: { marginBottom: 8 } },
|
|
2448
|
+
e('span', { className: 'sp-chip' }, t('statsDone', { n: round1(stats.doneHours) })),
|
|
2449
|
+
e('span', { className: 'sp-chip' }, t('statsPlanned', { n: round1(stats.plannedHours) })),
|
|
2450
|
+
e('span', { className: 'sp-chip' }, t('statsStages', { n: stats.completedStages })),
|
|
2451
|
+
),
|
|
2452
|
+
e('div', { className: 'sp-muted', style: { marginBottom: 8 } }, reasons ? t('weekReasons', { text: reasons }) : t('noReasons')),
|
|
2453
|
+
e('label', { className: 'sp-field' },
|
|
2454
|
+
e('span', { className: 'sp-label' }, t('periodReflection')),
|
|
2455
|
+
e('textarea', {
|
|
2456
|
+
className: 'sp-input', rows: 3, style: { width: '100%', resize: 'vertical' },
|
|
2457
|
+
placeholder: t('periodReflectionPlaceholder'), value: reflection,
|
|
2458
|
+
onChange: (ev) => setReflection(ev.target.value),
|
|
2459
|
+
}),
|
|
2460
|
+
),
|
|
2461
|
+
e('label', { className: 'sp-field' },
|
|
2462
|
+
e('span', { className: 'sp-label' }, kind === 'month' ? t('periodPlanMonth') : t('periodPlanWeek')),
|
|
2463
|
+
e('textarea', {
|
|
2464
|
+
className: 'sp-input', rows: 2, style: { width: '100%', resize: 'vertical' },
|
|
2465
|
+
placeholder: t('periodPlanPlaceholder'), value: planNote,
|
|
2466
|
+
onChange: (ev) => setPlanNote(ev.target.value),
|
|
2467
|
+
}),
|
|
2468
|
+
),
|
|
2469
|
+
error ? e('div', { className: 'sp-err' }, error) : null,
|
|
2470
|
+
e('div', { className: 'sp-row', style: { justifyContent: 'flex-end', marginTop: 12 } },
|
|
2471
|
+
e(Btn, { kind: 'ghost', onClick: onClose }, t('later')),
|
|
2472
|
+
e(Btn, { kind: 'primary', disabled: busy, onClick: submit }, busy ? t('submitting') : t('periodSave')),
|
|
2473
|
+
),
|
|
2474
|
+
)
|
|
2475
|
+
}
|
|
2476
|
+
|
|
2477
|
+
function PanelIcon({ size }) {
|
|
2478
|
+
return e('svg', { width: size || 20, height: size || 20, viewBox: '0 0 36 36', 'aria-hidden': true },
|
|
2479
|
+
e('rect', { x: 5, y: 6, width: 26, height: 25, rx: 5, fill: 'none', stroke: 'currentColor', strokeWidth: 2 }),
|
|
2480
|
+
e('path', { d: 'M5 13h26', stroke: 'currentColor', strokeWidth: 2 }),
|
|
2481
|
+
e('path', { d: 'M11 4v5M25 4v5', stroke: 'currentColor', strokeWidth: 2, strokeLinecap: 'round' }),
|
|
2482
|
+
e('path', { d: 'M12 20.5l3.2 3.2L24 17', stroke: 'currentColor', strokeWidth: 2.2, fill: 'none', strokeLinecap: 'round', strokeLinejoin: 'round' }),
|
|
2483
|
+
)
|
|
2484
|
+
}
|
|
2485
|
+
|
|
2486
|
+
return {
|
|
2487
|
+
inject: ['slots', 'locale', 'layout', 'sessions', 'uiWorkspace'],
|
|
2488
|
+
apply(ctx) {
|
|
2489
|
+
const store = createStore()
|
|
2490
|
+
const openPanel = () => { try { ctx.layout.selectPanel('smartPlanner') } catch { /* ignore */ } }
|
|
2491
|
+
const FIXED_TITLE = '智能任务规划助手'
|
|
2492
|
+
const FIXED_CHOSEN_KEY = 'smart-planner-fixed-chosen'
|
|
2493
|
+
const GREETING_PROMPT = '你好,我是刚安装这个插件的用户。请用两三句温暖、简洁的话欢迎我,并提醒我:直接输入「项目名称 + 截止日期 + 特殊要求(等级、总时长、是否留缓冲)」就可以开始。不要调用任何工具。'
|
|
2494
|
+
let fixedPromise = null
|
|
2495
|
+
const findFixedCandidates = () => {
|
|
2496
|
+
const list = ctx.sessions.list.getSnapshot()
|
|
2497
|
+
return (list.ids || [])
|
|
2498
|
+
.map((sessionId) => list.byId[sessionId])
|
|
2499
|
+
.filter((row) => row && row.origin !== 'subagent' && (row.title === FIXED_TITLE || row.displayTitle === FIXED_TITLE))
|
|
2500
|
+
.sort((a, b) => String(b.updatedAt || '').localeCompare(String(a.updatedAt || '')))
|
|
2501
|
+
}
|
|
2502
|
+
const useExistingFixed = async (id, open) => {
|
|
2503
|
+
const list = ctx.sessions.list.getSnapshot()
|
|
2504
|
+
const row = list.byId && list.byId[id]
|
|
2505
|
+
if (!row) return ''
|
|
2506
|
+
store.setFixed(id)
|
|
2507
|
+
try { await ctx.uiWorkspace.pinSession(id) } catch { /* pin is best effort */ }
|
|
2508
|
+
if (row.blank) {
|
|
2509
|
+
try {
|
|
2510
|
+
await ctx.sessions.using(id, { source: 'workspaceOperation' }, (reference) =>
|
|
2511
|
+
reference.binding.session.prompt([{ type: 'text', text: GREETING_PROMPT }], 'queue'))
|
|
2512
|
+
} catch { /* banner remains as fallback */ }
|
|
2513
|
+
}
|
|
2514
|
+
if (open) { try { ctx.uiWorkspace.openSession(id) } catch { /* ignore */ } }
|
|
2515
|
+
return id
|
|
2516
|
+
}
|
|
2517
|
+
const ensureFixedSession = (open) => {
|
|
2518
|
+
if (fixedPromise) return fixedPromise
|
|
2519
|
+
fixedPromise = (async () => {
|
|
2520
|
+
const stored = store.get().fixedSessionId
|
|
2521
|
+
let list = ctx.sessions.list.getSnapshot()
|
|
2522
|
+
if (list.phase === 'pending') {
|
|
2523
|
+
await new Promise((resolve) => setTimeout(resolve, 800))
|
|
2524
|
+
list = ctx.sessions.list.getSnapshot()
|
|
2525
|
+
}
|
|
2526
|
+
const candidates = findFixedCandidates()
|
|
2527
|
+
if (candidates.length > 1) {
|
|
2528
|
+
const explicit = readFlag(FIXED_CHOSEN_KEY, '0') === '1'
|
|
2529
|
+
if (!(stored && explicit && list.byId && list.byId[stored])) {
|
|
2530
|
+
if (open) store.setSessionChoices(candidates)
|
|
2531
|
+
return ''
|
|
2532
|
+
}
|
|
2533
|
+
}
|
|
2534
|
+
if (stored && list.byId && list.byId[stored]) return useExistingFixed(stored, open)
|
|
2535
|
+
if (candidates.length === 1) return useExistingFixed(candidates[0].id, open)
|
|
2536
|
+
const id = await ctx.sessions.create()
|
|
2537
|
+
try {
|
|
2538
|
+
await ctx.sessions.using(id, { source: 'workspaceOperation' }, async (reference) => {
|
|
2539
|
+
await reference.binding.session.rename(FIXED_TITLE)
|
|
2540
|
+
await reference.binding.session.prompt([{ type: 'text', text: GREETING_PROMPT }], 'queue')
|
|
2541
|
+
})
|
|
2542
|
+
} catch { /* title/greeting may fail; the greeting banner remains as fallback */ }
|
|
2543
|
+
try { await ctx.uiWorkspace.pinSession(id) } catch { /* pin is best effort */ }
|
|
2544
|
+
store.setFixed(id)
|
|
2545
|
+
if (open) { try { ctx.uiWorkspace.openSession(id) } catch { /* ignore */ } }
|
|
2546
|
+
return id
|
|
2547
|
+
})().finally(() => { fixedPromise = null })
|
|
2548
|
+
return fixedPromise
|
|
2549
|
+
}
|
|
2550
|
+
const openFixed = () => {
|
|
2551
|
+
const id = store.get().fixedSessionId
|
|
2552
|
+
const list = ctx.sessions.list.getSnapshot()
|
|
2553
|
+
const candidates = findFixedCandidates()
|
|
2554
|
+
if (candidates.length > 1) {
|
|
2555
|
+
store.setSessionChoices(candidates)
|
|
2556
|
+
return
|
|
2557
|
+
}
|
|
2558
|
+
if (id && list.byId && list.byId[id]) {
|
|
2559
|
+
ensureFixedSession(true).catch(() => { /* ignore */ })
|
|
2560
|
+
return
|
|
2561
|
+
}
|
|
2562
|
+
ensureFixedSession(true).catch(() => { /* session creation may be unavailable */ })
|
|
2563
|
+
}
|
|
2564
|
+
const chooseFixed = (id) => {
|
|
2565
|
+
writeFlag(FIXED_CHOSEN_KEY, '1')
|
|
2566
|
+
store.setFixed(id)
|
|
2567
|
+
ensureFixedSession(true).catch(() => { /* ignore */ })
|
|
2568
|
+
}
|
|
2569
|
+
ctx.effect(() => {
|
|
2570
|
+
const timer = setTimeout(() => {
|
|
2571
|
+
const stored = store.get().fixedSessionId
|
|
2572
|
+
if (stored) { ensureFixedSession(false).catch(() => { /* ignore */ }); return }
|
|
2573
|
+
const candidates = findFixedCandidates()
|
|
2574
|
+
ensureFixedSession(candidates.length !== 1 ? candidates.length === 0 : true).catch(() => { /* ignore */ })
|
|
2575
|
+
}, 1500)
|
|
2576
|
+
return () => clearTimeout(timer)
|
|
2577
|
+
}, 'smart-planner: fixed session')
|
|
2578
|
+
ctx.effect(() => ctx.locale.register(NS, { zh, en }), 'smart-planner: dictionaries')
|
|
2579
|
+
const t = ctx.locale.bind(NS)
|
|
2580
|
+
|
|
2581
|
+
ctx.effect(() => {
|
|
2582
|
+
const el = document.createElement('style')
|
|
2583
|
+
el.id = 'smart-planner-style'
|
|
2584
|
+
el.textContent = CSS
|
|
2585
|
+
document.head.appendChild(el)
|
|
2586
|
+
return () => { el.remove() }
|
|
2587
|
+
}, 'smart-planner: styles')
|
|
2588
|
+
|
|
2589
|
+
ctx.effect(() => {
|
|
2590
|
+
const timer = setInterval(() => { if (store.hasSubscribers()) store.refresh() }, 60000)
|
|
2591
|
+
const onFocus = () => { if (store.hasSubscribers()) store.refresh() }
|
|
2592
|
+
window.addEventListener('focus', onFocus)
|
|
2593
|
+
return () => {
|
|
2594
|
+
clearInterval(timer)
|
|
2595
|
+
window.removeEventListener('focus', onFocus)
|
|
2596
|
+
}
|
|
2597
|
+
}, 'smart-planner: polling')
|
|
2598
|
+
|
|
2599
|
+
ctx.slots.inject('conversation.header.leading', () => ctx.slots.register({
|
|
2600
|
+
name: 'conversation.header.leading', id: 'smart-planner.fish', locale: NS,
|
|
2601
|
+
inject: () => ({ store, openFixed }),
|
|
2602
|
+
}, FishHeader))
|
|
2603
|
+
|
|
2604
|
+
ctx.slots.inject('conversation.input.dock', () => ctx.slots.register({
|
|
2605
|
+
name: 'conversation.input.dock', id: 'smart-planner.greeting', order: 50, locale: NS,
|
|
2606
|
+
inject: () => ({ store, openPanel }),
|
|
2607
|
+
}, GreetingBanner))
|
|
2608
|
+
|
|
2609
|
+
ctx.slots.inject('sidebar.panellist', () => ctx.slots.register({
|
|
2610
|
+
name: 'sidebar.panellist', id: 'smartPlanner', order: 5, label: () => t('panel'), locale: NS,
|
|
2611
|
+
}, PanelIcon))
|
|
2612
|
+
|
|
2613
|
+
ctx.slots.inject('main', () => ctx.slots.register({
|
|
2614
|
+
name: 'main', key: 'smartPlanner', locale: NS,
|
|
2615
|
+
inject: () => ({ store }),
|
|
2616
|
+
}, MainPage))
|
|
2617
|
+
|
|
2618
|
+
ctx.slots.inject('shell.overlay', () => ctx.slots.register({
|
|
2619
|
+
name: 'shell.overlay', id: 'smart-planner.reminders', order: 20, locale: NS,
|
|
2620
|
+
inject: () => ({ store, openPanel, chooseFixed }),
|
|
2621
|
+
}, ReminderLayer))
|
|
2622
|
+
},
|
|
2623
|
+
}
|
|
2624
|
+
},
|
|
2625
|
+
})
|