Random cleanup

This commit is contained in:
shamoon
2025-09-20 10:47:56 -07:00
parent d8cb07b4a6
commit ce5f5140f9
3 changed files with 8 additions and 7 deletions

View File

@@ -712,6 +712,10 @@ export class DocumentDetailComponent
this.prepareForm(doc)
}
get hasVersions(): boolean {
return this.document?.versions?.length > 1
}
// Update file preview and download target to a specific version (by document id)
selectVersion(versionId: number) {
this.selectedVersionId = versionId
@@ -1085,11 +1089,6 @@ export class DocumentDetailComponent
})
}
// Upload a new file version for this document
triggerUploadVersion() {
this.versionFileInput?.nativeElement?.click()
}
onVersionFileSelected(event: Event) {
const input = event.target as HTMLInputElement
if (!input?.files || input.files.length === 0) return