mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Export to Excel and Send to drive
Summary: Implementing export to excel and send to Google Drive feature. As part of this feature few things were implemented: - Server side google authentication exposed on url: (docs, docs-s, or localhost:8080)/auth/google - Exporting grist documents as an excel file (xlsx) - Storing exported grist document (in excel format) in Google Drive as a spreadsheet document. Server side google authentication requires one new environmental variables - GOOGLE_CLIENT_SECRET (required) used by authentication handler Test Plan: Browser tests for exporting to excel. Reviewers: paulfitz, dsagal Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D2924
This commit is contained in:
@@ -3,6 +3,7 @@ import {AppModel, reportError} from 'app/client/models/AppModel';
|
||||
import {DocInfo, DocPageModel} from 'app/client/models/DocPageModel';
|
||||
import {docUrl, urlState} from 'app/client/models/gristUrlState';
|
||||
import {makeCopy, replaceTrunkWithFork} from 'app/client/ui/MakeCopyMenu';
|
||||
import {sendToDrive} from 'app/client/ui/sendToDrive';
|
||||
import {cssHoverCircle, cssTopBarBtn} from 'app/client/ui/TopBarCss';
|
||||
import {primaryButton} from 'app/client/ui2018/buttons';
|
||||
import {colors, mediaXSmall, testId} from 'app/client/ui2018/cssVars';
|
||||
@@ -222,6 +223,10 @@ function menuExports(doc: Document, pageModel: DocPageModel) {
|
||||
),
|
||||
menuItemLink({ href: gristDoc.getCsvLink(), target: '_blank', download: ''},
|
||||
menuIcon('Download'), 'Export CSV', testId('tb-share-option')),
|
||||
menuItemLink({ href: gristDoc.getXlsxLink(), target: '_blank', download: ''},
|
||||
menuIcon('Download'), 'Export XLSX', testId('tb-share-option')),
|
||||
menuItem(() => sendToDrive(doc, pageModel),
|
||||
menuIcon('Download'), 'Send to Google Drive', testId('tb-share-option')),
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user