mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Add support for auto-copying docs on signup
Summary: The new "copyDoc" query parameter on the login page sets a short-lived cookie, which is then read when welcoming a new user to copy that document to their Home workspace, and redirect to it. Currently, only templates and bare forks set this parameter. A new API endpoint for copying a document to a workspace was also added. Test Plan: Browser tests. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D3992
This commit is contained in:
@@ -124,6 +124,7 @@ export interface IGristUrlState {
|
||||
billingTask?: BillingTask;
|
||||
embed?: boolean;
|
||||
state?: string;
|
||||
srcDocId?: string;
|
||||
style?: InterfaceStyle;
|
||||
compare?: string;
|
||||
linkParameters?: Record<string, string>; // Parameters to pass as 'user.Link' in granular ACLs.
|
||||
@@ -395,7 +396,9 @@ export function decodeUrl(gristConfig: Partial<GristLoadConfig>, location: Locat
|
||||
if (sp.has('state')) {
|
||||
state.params!.state = sp.get('state')!;
|
||||
}
|
||||
|
||||
if (sp.has('srcDocId')) {
|
||||
state.params!.srcDocId = sp.get('srcDocId')!;
|
||||
}
|
||||
if (sp.has('style')) {
|
||||
let style = sp.get('style');
|
||||
if (style === 'light') {
|
||||
|
||||
Reference in New Issue
Block a user