gristlabs_grist-core/app/client/ui/ProductUpgradesStub.ts
Jarosław Sadziński aefe451bab (core) Polishing upgrade plan UI
Summary:
- Update nudge boxes content and collapsing on personal and free team site
- New confirmation after upgrading from a free team site
- Refactoring ProductUpgrade code, splitting plans / modals and nudges

Test Plan: Manual and updated tests

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3481
2022-06-29 18:28:37 +02:00

34 lines
916 B
TypeScript

import type {AppModel} from 'app/client/models/AppModel';
import {commonUrls} from 'app/common/gristUrls';
import {Disposable, DomContents, IDisposableOwner, Observable, observable} from 'grainjs';
export function buildNewSiteModal(context: Disposable, options: {
planName: string,
onCreate?: () => void
}) {
window.location.href = commonUrls.plans;
}
export function buildUpgradeModal(owner: Disposable, planName: string) {
window.location.href = commonUrls.plans;
}
export function showTeamUpgradeConfirmation(owner: Disposable) {
}
export interface UpgradeButton {
showUpgradeCard(): DomContents;
showUpgradeButton(): DomContents;
}
export function buildUpgradeButton(owner: IDisposableOwner, app: AppModel): UpgradeButton {
return {
showUpgradeCard : () => null,
showUpgradeButton : () => null,
};
}
export function NEW_DEAL(): Observable<boolean> {
return observable(false);
}