diff --git a/apps/desktop/src/routes/(window-chrome)/licensing.tsx b/apps/desktop/src/routes/(window-chrome)/licensing.tsx deleted file mode 100644 index f58a509ac75..00000000000 --- a/apps/desktop/src/routes/(window-chrome)/licensing.tsx +++ /dev/null @@ -1,286 +0,0 @@ -import { Button } from "@cap/ui-solid"; -import { licenseContract } from "@cap/web-api-contract"; -import { useNavigate } from "@solidjs/router"; -import { createMutation } from "@tanstack/solid-query"; -import * as tauriShell from "@tauri-apps/plugin-shell"; -import { ClientInferResponseBody } from "@ts-rest/core"; -import { - createResource, - createSignal, - Match, - Show, - Suspense, - Switch, -} from "solid-js"; -import { generalSettingsStore } from "~/store"; -import { createLicenseQuery } from "~/utils/queries"; -import { licenseApiClient } from "~/utils/web-api"; -import { Input } from "../editor/ui"; - -export default function Page() { - const license = createLicenseQuery(); - const navigate = useNavigate(); - - return ( -
- Permits using Cap for commercial purposes, but without paying for - cloud features. -
-- Your account is upgraded to Cap Pro and already includes a - commercial license. -
-
- {license().licenseKey}
-
- - Instance ID: {license().instanceId} -
*/} -- Got a license key? Enter it below -
- setLicenseKey(e.currentTarget.value)} - /> - - {/*- Instance ID: {generalSettings().instanceId} -
*/} -- For professional use without cloud features. -
-- billed once -
- )} - {type() === "lifetime" && ( -- or, $29/year. -
- )} -+
These features are still in development and may not work as expected.
diff --git a/apps/desktop/src/routes/(window-chrome)/settings/license.tsx b/apps/desktop/src/routes/(window-chrome)/settings/license.tsx new file mode 100644 index 00000000000..af346be3863 --- /dev/null +++ b/apps/desktop/src/routes/(window-chrome)/settings/license.tsx @@ -0,0 +1,331 @@ +import { createRive } from "@aerofoil/rive-solid-canvas"; +import { Button } from "@cap/ui-solid"; +import { licenseContract } from "@cap/web-api-contract"; +import { useNavigate } from "@solidjs/router"; +import { createMutation, useQueryClient } from "@tanstack/solid-query"; +import * as tauriShell from "@tauri-apps/plugin-shell"; +import { ClientInferResponseBody } from "@ts-rest/core"; +import { + createResource, + createSignal, + Match, + Show, + Suspense, + Switch, +} from "solid-js"; +import { generalSettingsStore } from "~/store"; +import { createLicenseQuery } from "~/utils/queries"; +import { commands } from "~/utils/tauri"; +import { licenseApiClient } from "~/utils/web-api"; +import PricingRive from "../../../assets/rive/pricing.riv"; +import { Input } from "../../editor/ui"; + +export default function Page() { + const license = createLicenseQuery(); + const navigate = useNavigate(); + const queryClient = useQueryClient(); + + return ( +
+ Permits using Cap for commercial purposes, but without paying for
+ cloud features.
+
+ Need cloud features?{" "}
+
+
+ Your account is upgraded to{" "} + Cap Pro and + already includes a commercial license. +
+
+ {license().licenseKey}
+
+ + {new Date(expiry()).toLocaleDateString()} +
++ {String(activateLicenseKey.error)} +
++ For commercial use +
++ {isCommercialAnnual() ? "billed annually" : "one-time payment"} +
++ Switch to {isCommercialAnnual() ? "lifetime" : "yearly"}:{" "} + + {isCommercialAnnual() ? "$58" : "$29"} + +
+- License details for Cap commercial use +
+ Your license details for Cap commercial use