diff --git a/src/components/StackedNote.vue b/src/components/StackedNote.vue index 5948415..85d4e82 100644 --- a/src/components/StackedNote.vue +++ b/src/components/StackedNote.vue @@ -68,12 +68,17 @@ const advanceStackTo = (newSha: string | null) => { const { path, + newerSha, content, rawContent, getRawContent, saveCacheNote, getEditedSha } = useFile(sha) + +// When this is an older snapshot of a still-existing note, jump the stack to +// its current version (the exact snapshot is never swapped underneath you). +const viewLatest = () => advanceStackTo(newerSha.value) const initialRawContent = ref(null) const isMarkdown = computed(() => path.value ? isMarkdownPath(path.value) : true @@ -438,6 +443,16 @@ const onBadgeClick = async () => {