(core) When saving copies, allow saving to another org; update menus for making and saving copies.

Summary:
- Implemented selecting an org in some cases when using Save-Copy dialog.
- Unified previous 'Save Copy' menu into an enhanced "Share" menu.
- Renamed ExportMenu to ShareMenu, collect related code into it, and design the share button.
- Introduced trunkAccess property for forks, to know whether "Replace Original" is available.
- Simplified handling of fork() result, now that all code has been upgraded.
- Replaced 'Copy as Template' menu items with a checkbox in the Save-Copy dialog
- Removed copy links for examples in the DocMenu (to simplify, since not part of updated design)
- Updated the UI of the copying dialog.

Test Plan: Updated affected tests, added new test cases for copying when other orgs are a choice or not.

Reviewers: paulfitz

Reviewed By: paulfitz

Differential Revision: https://phab.getgrist.com/D2561
This commit is contained in:
Dmitry S
2020-07-27 13:26:28 -04:00
parent 9b02d16bff
commit 2399baaca2
4 changed files with 9 additions and 2 deletions

View File

@@ -220,7 +220,6 @@ export interface ActiveDocAPI {
/**
* Prepare a fork of the document, and return the id(s) of the fork.
* TODO: remove string option here, it is present to ease transition.
*/
fork(): Promise<string | ForkResult>;
fork(): Promise<ForkResult>;
}

View File

@@ -99,6 +99,7 @@ export interface Document extends DocumentProperties {
id: string;
workspace: Workspace;
access: roles.Role;
trunkAccess?: roles.Role|null;
}
export interface PermissionDelta {