2022-06-13 13:53:08 +00:00
|
|
|
import type {AppModel} from 'app/client/models/AppModel';
|
|
|
|
import {commonUrls} from 'app/common/gristUrls';
|
2022-06-29 10:19:20 +00:00
|
|
|
import {Disposable, DomContents, IDisposableOwner, Observable, observable} from 'grainjs';
|
2022-06-13 13:53:08 +00:00
|
|
|
|
2022-06-29 10:19:20 +00:00
|
|
|
export function buildNewSiteModal(context: Disposable, options: {
|
|
|
|
planName: string,
|
|
|
|
onCreate?: () => void
|
2022-06-13 13:53:08 +00:00
|
|
|
}) {
|
|
|
|
window.location.href = commonUrls.plans;
|
|
|
|
}
|
|
|
|
|
|
|
|
export function buildUpgradeModal(owner: Disposable, planName: string) {
|
|
|
|
window.location.href = commonUrls.plans;
|
|
|
|
}
|
|
|
|
|
2022-06-29 10:19:20 +00:00
|
|
|
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);
|
2022-06-13 13:53:08 +00:00
|
|
|
}
|