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:
@@ -156,7 +156,8 @@ export class UrlStateImpl {
|
||||
*/
|
||||
public updateState(prevState: IGristUrlState, newState: IGristUrlState): IGristUrlState {
|
||||
const keepState = (newState.org || newState.ws || newState.homePage || newState.doc || isEmpty(newState) ||
|
||||
newState.account || newState.billing || newState.activation || newState.welcome) ?
|
||||
newState.account || newState.billing || newState.activation || newState.welcome ||
|
||||
newState.supportGrist) ?
|
||||
(prevState.org ? {org: prevState.org} : {}) :
|
||||
prevState;
|
||||
return {...keepState, ...newState};
|
||||
@@ -186,8 +187,11 @@ export class UrlStateImpl {
|
||||
// Reload when moving to/from the Grist sign-up page.
|
||||
const signupReload = [prevState.login, newState.login].includes('signup')
|
||||
&& prevState.login !== newState.login;
|
||||
return Boolean(orgReload || accountReload || billingReload || activationReload
|
||||
|| gristConfig.errPage || docReload || welcomeReload || linkKeysReload || signupReload);
|
||||
// Reload when moving to/from the support Grist page.
|
||||
const supportGristReload = Boolean(prevState.supportGrist) !== Boolean(newState.supportGrist);
|
||||
return Boolean(orgReload || accountReload || billingReload || activationReload ||
|
||||
gristConfig.errPage || docReload || welcomeReload || linkKeysReload || signupReload ||
|
||||
supportGristReload);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user