mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Removing NEW_DEAL flag
Summary: Removing NEW_DEAL flag checks and exposing all new deal features as default. Also removing Pages.ts as it was moved to grist-core. Test Plan: Existing and updated tests. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D3572
This commit is contained in:
@@ -4,7 +4,7 @@ import {reportError, setErrorNotifier} from 'app/client/models/errors';
|
||||
import {urlState} from 'app/client/models/gristUrlState';
|
||||
import {Notifier} from 'app/client/models/NotifyModel';
|
||||
import {getFlavor, ProductFlavor} from 'app/client/ui/CustomThemes';
|
||||
import {buildNewSiteModal, buildUpgradeModal, NEW_DEAL} from 'app/client/ui/ProductUpgrades';
|
||||
import {buildNewSiteModal, buildUpgradeModal} from 'app/client/ui/ProductUpgrades';
|
||||
import {OrgUsageSummary} from 'app/common/DocUsage';
|
||||
import {Features, isLegacyPlan, Product} from 'app/common/Features';
|
||||
import {GristLoadConfig} from 'app/common/gristUrls';
|
||||
@@ -206,9 +206,7 @@ export class AppModelImpl extends Disposable implements AppModel {
|
||||
|
||||
public readonly isPersonal = Boolean(this.currentOrg?.owner);
|
||||
public readonly isTeamSite = Boolean(this.currentOrg) && !this.isPersonal;
|
||||
// TODO: the `NEW_DEAL` observable can be removed after new deal is released.
|
||||
public readonly isLegacySite = Boolean(
|
||||
NEW_DEAL().get() && this.currentProduct && isLegacyPlan(this.currentProduct.name));
|
||||
public readonly isLegacySite = Boolean(this.currentProduct && isLegacyPlan(this.currentProduct.name));
|
||||
|
||||
public readonly userPrefsObs = getUserPrefsObs(this);
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import {BillingPlanManagers} from 'app/client/ui/BillingPlanManagers';
|
||||
import {createForbiddenPage} from 'app/client/ui/errorPages';
|
||||
import {leftPanelBasic} from 'app/client/ui/LeftPanelCommon';
|
||||
import {pagePanels} from 'app/client/ui/PagePanels';
|
||||
import {NEW_DEAL, showTeamUpgradeConfirmation} from 'app/client/ui/ProductUpgrades';
|
||||
import {showTeamUpgradeConfirmation} from 'app/client/ui/ProductUpgrades';
|
||||
import {createTopBarHome} from 'app/client/ui/TopBar';
|
||||
import {cssBreadcrumbs, cssBreadcrumbsLink, separator} from 'app/client/ui2018/breadcrumbs';
|
||||
import {bigBasicButton, bigBasicButtonLink, bigPrimaryButton} from 'app/client/ui2018/buttons';
|
||||
@@ -272,9 +272,8 @@ export class BillingPage extends Disposable {
|
||||
),
|
||||
!canManage ? null :
|
||||
makeActionLink('Manage billing', 'Settings', this._model.getCustomerPortalUrl(), testId('portal-link')),
|
||||
!wasTeam ? null :
|
||||
dom.maybe(NEW_DEAL(), () => makeActionButton('Downgrade plan', 'Settings',
|
||||
() => this._confirmDowngradeToTeamFree(), testId('downgrade-free-link'))),
|
||||
!wasTeam ? null : makeActionButton('Downgrade plan', 'Settings',
|
||||
() => this._confirmDowngradeToTeamFree(), testId('downgrade-free-link')),
|
||||
!canRenew ? null :
|
||||
makeActionLink('Renew subscription', 'Settings', this._model.renewPlan(), testId('renew-link')),
|
||||
!canUpgrade ? null :
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type {AppModel} from 'app/client/models/AppModel';
|
||||
import {commonUrls} from 'app/common/gristUrls';
|
||||
import {Disposable, DomArg, DomContents, IDisposableOwner, Observable, observable} from 'grainjs';
|
||||
import {Disposable, DomArg, DomContents, IDisposableOwner} from 'grainjs';
|
||||
|
||||
export function buildNewSiteModal(context: Disposable, options: {
|
||||
planName: string,
|
||||
@@ -28,7 +28,3 @@ export function buildUpgradeButton(owner: IDisposableOwner, app: AppModel): Upgr
|
||||
showUpgradeButton : () => null,
|
||||
};
|
||||
}
|
||||
|
||||
export function NEW_DEAL(): Observable<boolean> {
|
||||
return observable(false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user