mirror of
https://github.com/zotero/zotero.git
synced 2026-10-10 03:28:10 +00:00
Block Mendeley import if ZotFile installed
This commit is contained in:
parent
4b523555d6
commit
1923085068
2 changed files with 12 additions and 0 deletions
|
|
@ -38,6 +38,7 @@ const { directAuth } = mendeleyAPIUtils;
|
|||
const Zotero_Import_Wizard = { // eslint-disable-line no-unused-vars
|
||||
file: null,
|
||||
folder: null,
|
||||
isZotfileInstalled: false,
|
||||
libraryID: null,
|
||||
mendeleyAuth: null,
|
||||
mendeleyCode: null,
|
||||
|
|
@ -69,6 +70,9 @@ const Zotero_Import_Wizard = { // eslint-disable-line no-unused-vars
|
|||
this.mendeleyHasPreviouslyImported = !!(await Zotero.DB.valueQueryAsync(relSQL, predicateID));
|
||||
}
|
||||
|
||||
const extensions = await Zotero.getInstalledExtensions();
|
||||
this.isZotfileInstalled = !!extensions.find(extName => extName.match(/^ZotFile((?!disabled).)*$/));
|
||||
|
||||
this.wizard = document.getElementById('import-wizard');
|
||||
this.wizard.getPageById('page-start')
|
||||
.addEventListener('pageadvanced', this.onImportSourceAdvance.bind(this));
|
||||
|
|
@ -272,6 +276,13 @@ const Zotero_Import_Wizard = { // eslint-disable-line no-unused-vars
|
|||
case 'mendeleyOnline':
|
||||
this.file = null;
|
||||
this.folder = null;
|
||||
if (this.isZotfileInstalled) {
|
||||
this.skipToDonePage(
|
||||
'general-error',
|
||||
['import-online-blocked-by-plugin', { plugin: 'ZotFile' }]
|
||||
);
|
||||
return;
|
||||
}
|
||||
this.wizard.goTo('page-mendeley-online-intro');
|
||||
this.wizard.canRewind = true;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ import-online-intro=In the next step you will be asked to log in to { $targetApp
|
|||
import-online-intro2={ -app-name } will never see or store your { $targetApp } password.
|
||||
import-online-form-intro = Please enter your credentials to log in to { $targetAppOnline }. This is necessary to import your { $targetApp } library into { -app-name }.
|
||||
import-online-wrong-credentials = Login to { $targetApp } failed. Please re-enter credentials and try again.
|
||||
import-online-blocked-by-plugin = The import cannot continue with { $plugin } installed. Please disable this plugin and try again.
|
||||
|
||||
report-error =
|
||||
.label = Report Error…
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue