Zotero: improve integration and reference import

- use OAuth instead of tokens
  - add an integration card
  - improve error handling
  - add BibLaTeX format support
  - fix indexing of linked .bib files on creation
This commit is contained in:
yu-i-i
2026-09-22 02:41:43 +02:00
parent a262362712
commit 9afab5ade1
26 changed files with 1153 additions and 542 deletions
@@ -1646,6 +1646,7 @@
"project_actions": "",
"project_approaching_file_limit": "",
"project_categories_tags": "",
"problem_checking_connection_with_provider": "",
"project_figure_modal": "",
"project_files_history": "",
"project_flagged_too_many_compiles": "",
@@ -487,7 +487,13 @@ export const FileTreeActionableProvider: FC<React.PropsWithChildren> = ({
const finishCreatingLinkedFile = useCallback(
(entity: Omit<NewLinkedFileEntity, 'endpoint'>) => {
return finishCreatingDocOrFile({ ...entity, endpoint: 'linked_file' })
const shouldReindexReferences = /\.bib$/.test(entity.name)
return finishCreatingDocOrFile({ ...entity, endpoint: 'linked_file' }).
then(() => {
if (shouldReindexReferences) {
indexAllReferences(true)
}
})
},
[finishCreatingDocOrFile]
)
@@ -19,8 +19,9 @@ export type LinkedFileData = {
provider: 'zotero'
zoteroGroupId?: string
importedAt: Date | string
importedByUserId?: string
importedByName?: string
importedByUserId: string
importedByName: string
bibFormat: 'bibtex' | 'biblatex'
}
}