mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Update onboarding flow
Summary: A new onboarding page is now shown to all new users visiting the doc menu for the first time. Tutorial cards on the doc menu have been replaced with a new version that tracks completion progress, alongside a new card that opens the orientation video. Test Plan: Browser tests. Reviewers: jarek Reviewed By: jarek Differential Revision: https://phab.getgrist.com/D4296
This commit is contained in:
@@ -302,6 +302,18 @@ export class ApiServer {
|
||||
return sendReply(req, res, query);
|
||||
}));
|
||||
|
||||
// GET /api/templates/:did
|
||||
// Get information about a template.
|
||||
this._app.get('/api/templates/:did', expressWrap(async (req, res) => {
|
||||
const templateOrg = getTemplateOrg();
|
||||
if (!templateOrg) {
|
||||
throw new ApiError('Template org is not configured', 501);
|
||||
}
|
||||
|
||||
const query = await this._dbManager.getDoc({...getScope(req), org: templateOrg});
|
||||
return sendOkReply(req, res, query);
|
||||
}));
|
||||
|
||||
// GET /api/widgets/
|
||||
// Get all widget definitions from external source.
|
||||
this._app.get('/api/widgets/', expressWrap(async (req, res) => {
|
||||
|
||||
@@ -134,12 +134,12 @@ export class Document extends Resource {
|
||||
this.options.tutorial = null;
|
||||
} else {
|
||||
this.options.tutorial = this.options.tutorial || {};
|
||||
if (props.options.tutorial.numSlides !== undefined) {
|
||||
this.options.tutorial.numSlides = props.options.tutorial.numSlides;
|
||||
}
|
||||
if (props.options.tutorial.lastSlideIndex !== undefined) {
|
||||
this.options.tutorial.lastSlideIndex = props.options.tutorial.lastSlideIndex;
|
||||
}
|
||||
if (props.options.tutorial.percentComplete !== undefined) {
|
||||
this.options.tutorial.percentComplete = props.options.tutorial.percentComplete;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Normalize so that null equates with absence.
|
||||
|
||||
Reference in New Issue
Block a user