55
66import { Alert , Modal , Space , Tag , Tooltip } from "antd" ;
77import humanizeList from "humanize-list" ;
8- import { join } from "path" ;
98import { useInterval } from "react-interval-hook" ;
10-
119import {
1210 CSS ,
1311 React ,
@@ -18,9 +16,7 @@ import {
1816 useState ,
1917 useTypedRedux ,
2018} from "@cocalc/frontend/app-framework" ;
21- import { A , Icon , Paragraph , Text } from "@cocalc/frontend/components" ;
22- import { SiteName } from "@cocalc/frontend/customize" ;
23- import { appBasePath } from "@cocalc/frontend/customize/app-base-path" ;
19+ import { A , Icon , Paragraph } from "@cocalc/frontend/components" ;
2420import { TimeAmount } from "@cocalc/frontend/editors/stopwatch/time" ;
2521import { open_new_tab } from "@cocalc/frontend/misc" ;
2622import {
@@ -39,6 +35,7 @@ import { COLORS, DOC_URL } from "@cocalc/util/theme";
3935import { useAllowedFreeProjectToRun } from "./client-side-throttle" ;
4036import { useProjectContext } from "./context" ;
4137import { applyLicense } from "./settings/site-license" ;
38+ import { CallToSupport , BUY_A_LICENSE_URL } from "./call-to-support" ;
4239
4340export const DOC_TRIAL = "https://doc.cocalc.com/trial.html" ;
4441
@@ -95,7 +92,6 @@ const INET_QUOTA =
9592const MEMBER_QUOTA =
9693 "https://doc.cocalc.com/billing.html#what-is-member-hosting" ;
9794// const ADD_LICENSE = "https://doc.cocalc.com/project-settings.html#project-add-license";
98- export const BUY_A_LICENSE_URL = join ( appBasePath , "/store/site-license" ) ;
9995
10096export const TrialBanner : React . FC < BannerProps > = React . memo (
10197 ( props : BannerProps ) => {
@@ -475,48 +471,3 @@ function CountdownProject({ fontSize }: CountdownProjectProps) {
475471 </ >
476472 ) ;
477473}
478-
479- export function CallToSupport ( { onClose } : { onClose ? } ) {
480- return (
481- < Alert
482- closable = { onClose != null }
483- onClose = { onClose }
484- banner
485- type = "info"
486- showIcon = { false }
487- message = {
488- < >
489- < Paragraph strong >
490- This is a call to support < SiteName /> by{ " " }
491- < A href = { BUY_A_LICENSE_URL } > purchasing a license</ A > .
492- </ Paragraph >
493- < Paragraph >
494- Behind the scenes,{ " " }
495- < A href = { "/about/team" } > people are working hard</ A > to keep the
496- service running and improve it constantly. Your files and
497- computations < A href = { "/info/status" } > run in our cluster</ A > , which
498- costs money as well.
499- </ Paragraph >
500- < Paragraph >
501- < SiteName /> receives no funding from large organizations or
502- charitable foundations. The site depends entirely{ " " }
503- < Text strong > on your financial support</ Text > to continue operating.
504- Without your financial support this service will not survive
505- long-term!
506- </ Paragraph >
507- < Paragraph >
508- < A
509- href = {
510- "/support/new?hideExtra=true&type=purchase&subject=Support+CoCalc&title=Support+CoCalc"
511- }
512- >
513- Contact us
514- </ A > { " " }
515- if you can give support in other ways or have any questions or
516- comments.
517- </ Paragraph >
518- </ >
519- }
520- />
521- ) ;
522- }
0 commit comments