diff --git a/CHANGELOG.md b/CHANGELOG.md index f2d2cb8..52e0923 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ 本项目按 `v主版本.次版本.修订版本` 标记发布。下列内容以对应 Git tag 和已提交功能为准。 +## v1.12.0 — 2026-09-28 + +- 目标与待办可在终端逐项创建;记忆、目标、待办可先选择记录,再输入 `yes` 确认删除。 +- 终端打开时显示欢迎信息,增加日期、时间、会话运行时间、版本、统计和命令历史等常用命令。 +- 开放 `LifeOS.run()`、`LifeOS.note()` 等浏览器开发者控制台入口,复用终端命令与删除确认;图形界面和终端共用删除操作。 + ## v1.11.0 — 2026-09-28 - `memory add` 增加交互式逐项输入,可依次填写标题、日期、标签、能量、天气、地点、关联待办和正文。 diff --git a/README.md b/README.md index b6e578c..593e761 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ 以桌面操作系统为交互方式的个人记录网站。用 App 记录日常、管理目标与待办,并沿时间线回看已经留下的内容。 -在线站点:[Life OS](https://life-os-personal-desktop.biss0.chatgpt.site) · 当前应用版本:**v1.11.0** · [更新日志](CHANGELOG.md) +在线站点:[Life OS](https://life-os-personal-desktop.biss0.chatgpt.site) · 当前应用版本:**v1.12.0** · [更新日志](CHANGELOG.md) ## 功能 @@ -16,14 +16,16 @@ | 洞察 | 周报和月报展示记录频率、完成任务数、常见天气、能量记录及收藏或标记高光的记忆;仅依据已保存的数据统计。 | | 档案 | 查看记录概况并维护个人资料。 | | 浏览器 | 在桌面窗口里打开网页或使用 Google 搜索,支持后退、前进、刷新和外部打开。默认打开 Google;第三方网站可能禁止 iframe 嵌入。 | -| 终端 | 用交互式命令创建、查询记忆、目标与待办,完成或重新开启待办,并打开其他 App。 | +| 终端 | 逐项创建记忆、目标与待办;选择并确认删除记录,管理完成状态,查询数据和打开其他 App。 | | 系统设置 | 选择语言、主题、壁纸、桌面快捷方式和开机 App,管理备份。 | 桌面端支持单击选择、双击打开 App、多窗口、任务栏恢复、图标拖动排列和窗口布局记忆。拖动图标或小部件时会显示吸附网格;目标倒计时、时钟、今日概览与快捷操作小部件可移动、调整大小和分别开关。移动端以横排图标和全屏 App 为主,小部件在桌面下方排列。可选必应每日图片、内置背景或自定义 HTTPS 图片链接。中文与英文可自动跟随浏览器语言,也可手动选择。 快捷键:`Ctrl / ⌘ + K` 打开启动器,`Ctrl / ⌘ + F` 搜索记忆,`Ctrl / ⌘ + S` 保存今日记忆;`Alt + 1–9` 打开原有 App,`Alt + 0` 打开终端。终端内 ↑↓ 浏览命令历史,Tab 补全命令,记忆正文输入时 `Ctrl / ⌘ + Enter` 保存。站点包含 PWA 清单和 Service Worker,离线时可打开已缓存的应用外壳;云同步、外部网页与必应图片仍需要联网。 -终端输入 `help` 查看命令。直接输入 `memory add` 会依次询问标题、日期、标签、能量、天气、地点、关联待办与正文;`memory add "实验记录"` 可跳过标题,回车采用默认值,`back` 返回上一步,`cancel` 取消。仍可用参数快速输入,例如 `memory add "实验记录" --date 2026-09-28 --tag 学习 --text "完成实验"`。`task add "背单词" --due tomorrow --priority high` 新增待办,`goal add "准备六级" --due 2026-12-12 --pin` 新增并在桌面显示倒计时。命令只执行明确支持的 Life OS 操作,不是系统 shell;同一天已有记忆时,终端会提示在“今日”或“时间线”编辑。 +终端首次打开显示欢迎信息,输入 `help` 查看命令。`memory add`、`goal add`、`task add` 可逐项创建;回车保留默认值,`back` 返回,`cancel` 取消。`memory delete`、`goal delete`、`task delete` 会列出记录供选择,并要求输入 `yes` 确认。原有带参数的快速输入仍可用,例如 `memory add "实验记录" --date 2026-09-28 --tag 学习 --text "完成实验"`、`task add "背单词" --due tomorrow --priority high`。`date`、`time`、`datetime` 读取当前设备时间;另有 `uptime`、`status`、`apps`、`history`、`echo`、`version` 等命令。终端只执行明确支持的 Life OS 操作,不是系统 shell。 + +浏览器开发者工具的 Console 也可使用同一套命令:`LifeOS.help()`、`LifeOS.run('date')`、`LifeOS.run('memory add')`;逐项填写后用 `LifeOS.note('正文')` 保存记忆,或用 `LifeOS.cancel()` 取消。该入口不会替换或拦截浏览器原生的 `console`,删除操作同样需要在后续调用 `LifeOS.run('yes')` 确认。 ## 数据与备份 diff --git a/package.json b/package.json index ad7b253..c64106c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "life-os", - "version": "1.11.0", + "version": "1.12.0", "private": true, "type": "module", "scripts": { diff --git a/public/addons.js b/public/addons.js index ce53214..a292b78 100644 --- a/public/addons.js +++ b/public/addons.js @@ -3,7 +3,7 @@ const DRAFT_KEY = 'lifeos_today_draft_v1'; const localDay = () => { const d = new Date(); return `${d.getFullYear()}-${String(d.getMonth()+1).padStart(2,'0')}-${String(d.getDate()).padStart(2,'0')}`; }; const escapeHtml = value => String(value || '').replace(/[&<>]/g, char => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[char])); - const APP_VERSION = '1.11.0'; + const APP_VERSION = '1.12.0'; window.LifeOSVersion = APP_VERSION; const appIds = ['today', 'timeline', 'museum', 'insights', 'profile', 'tasks', 'calendar', 'system', 'browser', 'terminal']; const t = (key, values) => LifeI18n.t(key, values); diff --git a/public/i18n-renderers.js b/public/i18n-renderers.js index cdeecd8..7aa6d31 100644 --- a/public/i18n-renderers.js +++ b/public/i18n-renderers.js @@ -110,7 +110,7 @@ window.saveProfile = () => { save('lifeos_profile', { name: pname.value, birthday: pbday.value, startDate: pstart.value || day(), motto: pmotto.value }); renderAll(); toast(t('profile.saved')); }; window.systemApp = container => { const state = settings(), preference = LifeI18n.preference(), bytes = new Blob([JSON.stringify({ mems: mems(), museum: museum(), profile: profile(), system: sys() })]).size, oldBackup = state.lastBackup && Date.now() - new Date(state.lastBackup) > 12096e5, detected = browserLanguage() === 'zh' ? t('system.detectedZh') : t('system.detectedEn'); - container.innerHTML = `
${detected}
${t('system.local')}
${t('system.storageSummary',{memories:LifeI18n.number(mems().length),museum:LifeI18n.number(museum().length),tasks:LifeI18n.number(sys().tasksBoard?.tasks?.length||0),size:LifeI18n.number(Math.ceil(bytes/1024))})}
${t('system.stored')}
${t('system.backups')}
${t('system.lastBackup',{value:state.lastBackup ? short(state.lastBackup.slice(0,10)) : t('common.never')})}${oldBackup ? `
${t('system.recommended')}` : ''}
${t('system.release',{version:window.LifeOSVersion||'1.11.0'})}
${detected}
${t('system.local')}
${t('system.storageSummary',{memories:LifeI18n.number(mems().length),museum:LifeI18n.number(museum().length),tasks:LifeI18n.number(sys().tasksBoard?.tasks?.length||0),size:LifeI18n.number(Math.ceil(bytes/1024))})}
${t('system.stored')}
${t('system.backups')}
${t('system.lastBackup',{value:state.lastBackup ? short(state.lastBackup.slice(0,10)) : t('common.never')})}${oldBackup ? `
${t('system.recommended')}` : ''}
${t('system.release',{version:window.LifeOSVersion||'1.12.0'})}
${t('dialog.exported',{date:short(data.exportedAt.slice(0,10))})}
${t('dialog.memories',{count:data.memories.length})}
${t('dialog.museumItems',{count:data.museum.length})}
${t('dialog.goals',{count:board.goals?.length || 0})}
${t('dialog.tasks',{count:board.tasks?.length || 0})}
${t('dialog.replaceWarning')}
${LifeI18n.t('shell.todaySummary',{memories:mems().length,preserved:museum().length})}
`}function hideContext(){document.querySelector('#life-context')?.remove()}function showContext(e,id){e.preventDefault();e.stopPropagation();hideContext();let labels={open:LifeI18n.t('shell.open'),min:LifeI18n.t('shell.minimize'),close:LifeI18n.t('shell.menuCloseWindow'),refresh:LifeI18n.t('shell.refresh'),new:LifeI18n.t('shell.newToday'),system:LifeI18n.t('shell.systemSettings')},actions=id?`${windows[id]?``:''}`:`${LifeI18n.t('shell.todaySummary',{memories:mems().length,preserved:museum().length})}
`}function hideContext(){document.querySelector('#life-context')?.remove()}function showContext(e,id){e.preventDefault();e.stopPropagation();hideContext();let labels={open:LifeI18n.t('shell.open'),min:LifeI18n.t('shell.minimize'),close:LifeI18n.t('shell.menuCloseWindow'),refresh:LifeI18n.t('shell.refresh'),new:LifeI18n.t('shell.newToday'),system:LifeI18n.t('shell.systemSettings')},actions=id?`${windows[id]?``:''}`:`How was your day?
${i18n('How was your day?')}
Local Storage
${mems().length} memories · ${museum().length} museum items · Approx. ${Math.ceil(bytes/1024)} KB
Your data is stored locally in this browser.
Create regular backups to prevent data loss.
${s.lastBackup?'LAST BACKUP · '+fmtDate(s.lastBackup.slice(0,10)):'LAST BACKUP · NEVER'} ${rec?'
BACKUP RECOMMENDED':''}
Life OS
Version ${window.LifeOSVersion||'1.11.0'} · Schema v2
Exported: ${fmtDate(d.exportedAt.slice(0,10))}
Memories: ${d.memories.length}
Museum Items: ${d.museum.length}
This will replace all current Life OS data.
Export a backup first if you want to keep it.
Local Storage
${mems().length} memories · ${museum().length} museum items · Approx. ${Math.ceil(bytes/1024)} KB
Your data is stored locally in this browser.
Create regular backups to prevent data loss.
${s.lastBackup?'LAST BACKUP · '+fmtDate(s.lastBackup.slice(0,10)):'LAST BACKUP · NEVER'} ${rec?'
BACKUP RECOMMENDED':''}
Life OS
Version ${window.LifeOSVersion||'1.12.0'} · Schema v2
Exported: ${fmtDate(d.exportedAt.slice(0,10))}
Memories: ${d.memories.length}
Museum Items: ${d.museum.length}
This will replace all current Life OS data.
Export a backup first if you want to keep it.