feat(memories): add quick moments alongside daily summaries
This commit is contained in:
1 parent
eaa4894894
commit
dc92415706
27 files changed
+264
-32
No files matched your search
+2
-2
@@ -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.22.1';
|
||||
const APP_VERSION = '1.23.0';
|
||||
window.LifeOSVersion = APP_VERSION;
|
||||
const appIds = ['today', 'timeline', 'museum', 'insights', 'profile', 'tasks', 'calendar', 'system', 'browser', 'terminal', 'database'];
|
||||
const t = (key, values) => LifeI18n.t(key, values);
|
||||
@@ -34,7 +34,7 @@
|
||||
setTimeout(() => {
|
||||
const today = (typeof todayTargetDate !== 'undefined' && todayTargetDate) || localDay();
|
||||
try {
|
||||
const saved = JSON.parse(localStorage.getItem('lifeos_memories') || '[]').some(m => m.date === today);
|
||||
const saved = JSON.parse(localStorage.getItem('lifeos_memories') || '[]').some(m => m.date === today && m.kind !== 'moment');
|
||||
if (saved) localStorage.removeItem(DRAFT_KEY);
|
||||
} catch {}
|
||||
}, 700);
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@
|
||||
const stored = records();
|
||||
return {
|
||||
app: 'Life OS',
|
||||
version: window.LifeOSVersion || '1.22.1',
|
||||
version: window.LifeOSVersion || '1.23.0',
|
||||
schemaVersion: BACKUP_SCHEMA,
|
||||
exportedAt: new Date().toISOString(),
|
||||
profile: json('lifeos_profile', {}),
|
||||
|
||||
+1
-1
@@ -65,7 +65,7 @@
|
||||
|
||||
function eventsFor(key) {
|
||||
const events = [];
|
||||
for (const memory of mems()) if (memory.date === key) events.push({ kind: 'memory', rank: 0, title: memory.title || memory.text?.trim().split('\n')[0].slice(0, 64) || t('timeline.untitled'), detail: memory.text || LifeI18n.t('timeline.noNote'), time: '', id: memory.id, mood: memory.mood, energy: memory.energy });
|
||||
for (const memory of mems()) if (memory.date === key) events.push({ kind: 'memory', rank: 0, title: memory.title || memory.text?.trim().split('\n')[0].slice(0, 64) || t('timeline.untitled'), detail: memory.text || LifeI18n.t('timeline.noNote'), time: '', id: memory.id, mood: memory.contextRecorded === false ? '' : memory.mood, energy: memory.contextRecorded === false ? null : memory.energy });
|
||||
const board = system().tasksBoard || { goals: [], tasks: [] };
|
||||
for (const task of board.tasks || []) {
|
||||
const due = task.dueDate === key, completed = localDatePart(task.completedAt) === key;
|
||||
|
||||
Loaded 3 of 27 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user