mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Add Support Grist page and nudge
Summary: Adds a new Support Grist page (accessible only in grist-core), containing options to opt in to telemetry and sponsor Grist Labs on GitHub. A nudge is also shown in the doc menu, which can be collapsed or permanently dismissed. Test Plan: Browser and server tests. Reviewers: paulfitz, dsagal Reviewed By: paulfitz Subscribers: jarek, dsagal Differential Revision: https://phab.getgrist.com/D3926
This commit is contained in:
@@ -20,6 +20,7 @@ export class Activations {
|
||||
if (!activation) {
|
||||
activation = manager.create(Activation);
|
||||
activation.id = makeId();
|
||||
activation.prefs = {};
|
||||
await activation.save();
|
||||
}
|
||||
return activation;
|
||||
|
||||
@@ -89,14 +89,6 @@ export const NotifierEvents = StringUnion(
|
||||
|
||||
export type NotifierEvent = typeof NotifierEvents.type;
|
||||
|
||||
export const HomeDBTelemetryEvents = StringUnion(
|
||||
'tutorialProgressChanged',
|
||||
);
|
||||
|
||||
export type HomeDBTelemetryEvent = typeof HomeDBTelemetryEvents.type;
|
||||
|
||||
export type Event = NotifierEvent | HomeDBTelemetryEvent;
|
||||
|
||||
// Nominal email address of a user who can view anything (for thumbnails).
|
||||
export const PREVIEWER_EMAIL = 'thumbnail@getgrist.com';
|
||||
|
||||
@@ -324,7 +316,7 @@ export class HomeDBManager extends EventEmitter {
|
||||
orgOnly: true
|
||||
}];
|
||||
|
||||
public emit(event: Event, ...args: any[]): boolean {
|
||||
public emit(event: NotifierEvent, ...args: any[]): boolean {
|
||||
return super.emit(event, ...args);
|
||||
}
|
||||
|
||||
@@ -1960,7 +1952,7 @@ export class HomeDBManager extends EventEmitter {
|
||||
// Update the name and save.
|
||||
const doc: Document = queryResult.data;
|
||||
doc.checkProperties(props);
|
||||
doc.updateFromProperties(props, this);
|
||||
doc.updateFromProperties(props);
|
||||
if (forkId) {
|
||||
await manager.save(doc);
|
||||
return {status: 200};
|
||||
|
||||
Reference in New Issue
Block a user