Add version footer, task history UI, and note version retention policy
- App.vue: quiet version footer (fetches /api/version, 0.45 opacity) - TaskEditorView: History button + HistoryPanel integration (mirrors NoteEditorView) - note_versions.py: raise MAX_VERSIONS 20→50; add 5-min minimum interval gate to prevent autosave exhausting history slots Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -22,6 +22,7 @@ import MilestoneSelector from "@/components/MilestoneSelector.vue";
|
||||
import TaskLogSection from "@/components/TaskLogSection.vue";
|
||||
import InlineAssistPanel from "@/components/InlineAssistPanel.vue";
|
||||
import ConfirmDialog from "@/components/ConfirmDialog.vue";
|
||||
import HistoryPanel from "@/components/HistoryPanel.vue";
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
@@ -321,6 +322,7 @@ async function save() {
|
||||
}
|
||||
|
||||
const showDeleteConfirm = ref(false);
|
||||
const showHistory = ref(false);
|
||||
|
||||
function remove() {
|
||||
if (taskId.value) {
|
||||
@@ -386,6 +388,7 @@ useEditorGuards(dirty, save);
|
||||
<button class="btn-save" @click="save" :disabled="saving">
|
||||
{{ saving ? "Saving..." : "Save" }}
|
||||
</button>
|
||||
<button v-if="isEditing" class="btn-history" @click="showHistory = true">History</button>
|
||||
<button v-if="isEditing" class="btn-delete" @click="remove">
|
||||
Delete
|
||||
</button>
|
||||
@@ -654,6 +657,15 @@ useEditorGuards(dirty, save);
|
||||
@confirm="confirmDelete"
|
||||
@cancel="showDeleteConfirm = false"
|
||||
/>
|
||||
|
||||
<!-- History panel -->
|
||||
<HistoryPanel
|
||||
v-if="showHistory && taskId"
|
||||
:note-id="taskId"
|
||||
:current-body="body"
|
||||
@restore="(b: string, t: string[]) => { body = b; tags = t; markDirty(); }"
|
||||
@close="showHistory = false"
|
||||
/>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
@@ -843,6 +855,22 @@ useEditorGuards(dirty, save);
|
||||
font-family: inherit;
|
||||
}
|
||||
|
||||
/* History button */
|
||||
.btn-history {
|
||||
padding: 0.45rem 1rem;
|
||||
background: none;
|
||||
border: 1px solid var(--color-border);
|
||||
border-radius: var(--radius-sm);
|
||||
cursor: pointer;
|
||||
font-size: 0.875rem;
|
||||
color: var(--color-text-secondary);
|
||||
font-family: inherit;
|
||||
}
|
||||
.btn-history:hover {
|
||||
border-color: var(--color-primary);
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
/* Tag suggest row inside sidebar */
|
||||
.tag-suggest-row {
|
||||
display: flex;
|
||||
|
||||
Reference in New Issue
Block a user