(core) Adding google drive plugin as a fallback for url plugin

Summary:
When importing from url, user types a url for google spreadsheet,
Grist will switch to Google Drive plugin to allow user to choose file manualy.

Test Plan: Browser tests

Reviewers: paulfitz, dsagal

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D2945
This commit is contained in:
Jarosław Sadziński
2021-08-03 12:34:05 +02:00
parent 5aed22dc1e
commit 6ed1d8dfea
7 changed files with 162 additions and 20 deletions

View File

@@ -93,9 +93,11 @@ export async function main() {
}
if (!process.env.GOOGLE_CLIENT_ID) {
// those key is only for development purposes
// and is no secret as it is publicly visible in a plugin page
process.env.GOOGLE_CLIENT_ID = '632317221841-ce66sfp00rf92dip4548dn4hf2ga79us.apps.googleusercontent.com';
log.warn('GOOGLE_CLIENT_ID is not defined, Google Drive Plugin will not work.');
}
if (!process.env.GOOGLE_API_KEY) {
log.warn('GOOGLE_API_KEY is not defined, Url plugin will not be able to access public files.');
}
if (process.env.GRIST_SINGLE_PORT) {