mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Add dialog with options to allow downloading without history or data
Summary:
{F74398}
Refactored the 'radio checkboxes' in the modal for deleting a page and reused them here.
The option to download as a template already existed in the server code but wasn't being exercised by the frontend. Also added an option to remove just the history, which is the main motivation for this diff.
Test Plan: Expanded the existing nbrowser test.
Reviewers: paulfitz
Reviewed By: paulfitz
Differential Revision: https://phab.getgrist.com/D3999
This commit is contained in:
@@ -447,7 +447,7 @@ export interface DocAPI {
|
||||
// Currently, leftHash is expected to be an ancestor of rightHash. If rightHash
|
||||
// is HEAD, the result will contain a copy of any rows added or updated.
|
||||
compareVersion(leftHash: string, rightHash: string): Promise<DocStateComparison>;
|
||||
getDownloadUrl(template?: boolean): string;
|
||||
getDownloadUrl(options: {template: boolean, removeHistory: boolean}): string;
|
||||
getDownloadXlsxUrl(params?: DownloadDocParams): string;
|
||||
getDownloadCsvUrl(params: DownloadDocParams): string;
|
||||
getDownloadTableSchemaUrl(params: DownloadDocParams): string;
|
||||
@@ -991,8 +991,8 @@ export class DocAPIImpl extends BaseAPI implements DocAPI {
|
||||
return this.requestJson(url.href);
|
||||
}
|
||||
|
||||
public getDownloadUrl(template: boolean = false) {
|
||||
return this._url + `/download?template=${Number(template)}`;
|
||||
public getDownloadUrl({template, removeHistory}: {template: boolean, removeHistory: boolean}): string {
|
||||
return this._url + `/download?template=${template}&nohistory=${removeHistory}`;
|
||||
}
|
||||
|
||||
public getDownloadXlsxUrl(params: DownloadDocParams) {
|
||||
|
||||
Reference in New Issue
Block a user