diff --git a/pages/index.vue b/pages/index.vue index b0d6343..3f25abf 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -2333,6 +2333,7 @@ import { emptyKeepPrompts, insertKeepSnippet, normalizeKeepPrompts, type KeepPro import { clipFamilyPartTitle, clipPartLabel, + familyActivityAt, familyBaseName, familyBranchSummary, familyDisplayNodes, @@ -3436,7 +3437,7 @@ const stillGroups = computed(() => { const sorted = [...parts].sort(sortStillParts) return { key, head: sorted[0], parts: sorted } }) - .sort((a, b) => b.head.createdAt - a.head.createdAt) + .sort((a, b) => familyActivityAt(b.parts) - familyActivityAt(a.parts)) }) const libraryGroups = computed(() => { const groups = new Map() @@ -3451,7 +3452,7 @@ const libraryGroups = computed(() => { const head = familyRootClip(parts) return { key, head, parts: [...parts] } }) - .sort((a, b) => b.head.createdAt - a.head.createdAt) + .sort((a, b) => familyActivityAt(b.parts) - familyActivityAt(a.parts)) }) const libraryEntries = computed(() => { const videos = libraryFilter.value === 'images' @@ -3459,7 +3460,7 @@ const libraryEntries = computed(() => { : libraryGroups.value.map(group => ({ kind: 'clip' as const, key: group.key, - createdAt: group.head.createdAt, + createdAt: familyActivityAt(group.parts), group })) const images = libraryFilter.value === 'videos' @@ -3467,7 +3468,7 @@ const libraryEntries = computed(() => { : stillGroups.value.map(group => ({ kind: 'still' as const, key: group.key, - createdAt: group.head.createdAt, + createdAt: familyActivityAt(group.parts), stillGroup: group })) return [...videos, ...images].sort((a, b) => b.createdAt - a.createdAt)