mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Ask the user some questions after they sign up and set their name.
Summary: - Add a /welcome/info endpoint, to serve a page after /welcome/user - Add a new forms module to factor out the styles that feel more natural for a web form. - Simplify form submission using JSON with a BaseAPI helper. - The POST submission to /welcome/info gets added to a Grist doc, using a specialPermit grant to gain access. A failure (e.g. missing doc) is logged but does not affect the user. Test Plan: Added a test case. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D2640
This commit is contained in:
@@ -37,6 +37,12 @@ export class BaseAPI {
|
||||
};
|
||||
}
|
||||
|
||||
// Make a JSON request to the given URL, and read the esponse as JSON. Handles errors, and
|
||||
// counts pending requests in the same way as BaseAPI methods do.
|
||||
public static requestJson(url: string, init: RequestInit = {}): Promise<unknown> {
|
||||
return new BaseAPI().requestJson(url, init);
|
||||
}
|
||||
|
||||
private static _numPendingRequests: number = 0;
|
||||
|
||||
protected fetch: typeof fetch;
|
||||
|
||||
@@ -14,7 +14,7 @@ export type IDocPage = number | 'new' | 'code';
|
||||
export const HomePage = StringUnion('all', 'workspace', 'trash');
|
||||
export type IHomePage = typeof HomePage.type;
|
||||
|
||||
export const WelcomePage = StringUnion('user', 'teams');
|
||||
export const WelcomePage = StringUnion('user', 'info', 'teams');
|
||||
export type WelcomePage = typeof WelcomePage.type;
|
||||
|
||||
// Overall UI style. "full" is normal, "light" is a single page focused, panels hidden experience.
|
||||
|
||||
Reference in New Issue
Block a user