feat(cloud): enable free trial (#236)

* feat(cloud): add free trial

* fix: center workspace name icon when collapsed

* feat: add 14 day free trial notice to pricing page

* feat: hide upgrade button when on active subscription

* chore: translations
This commit is contained in:
Henry
2025-10-31 00:09:24 +00:00
committed by GitHub
parent e8d52de5e4
commit 735db21227
28 changed files with 570 additions and 404 deletions

View File

@@ -176,6 +176,13 @@ export function InviteMemberForm({
};
const handleInviteLinkToggle = async () => {
if (
env("NEXT_PUBLIC_KAN_ENV") === "cloud" &&
!hasTeamSubscription &&
!hasProSubscription
)
return handleUpgrade();
setIsLoadingInviteLink(true);
if (isShareInviteLinkEnabled && workspace.publicId) {
@@ -342,11 +349,6 @@ export function InviteMemberForm({
: t`Create invite link`
}
isChecked={isShareInviteLinkEnabled}
disabled={
env("NEXT_PUBLIC_KAN_ENV") === "cloud" &&
!hasTeamSubscription &&
!hasProSubscription
}
onChange={handleInviteLinkToggle}
/>
<div>
@@ -354,7 +356,7 @@ export function InviteMemberForm({
!hasTeamSubscription &&
!hasProSubscription ? (
<Button type="button" onClick={handleUpgrade}>
{t`Upgrade to Team Plan`}
{t`Start 14 day free trial`}
</Button>
) : (
<Button

View File

@@ -181,7 +181,7 @@ export default function MembersPage() {
<div className="flex items-center gap-3">
{env("NEXT_PUBLIC_KAN_ENV") === "cloud" && (
<>
{!proSubscription && (
{!proSubscription && !teamSubscription && (
<Link
href="/settings/workspace?upgrade=pro"
className="hidden items-center rounded-full border border-emerald-300 bg-emerald-50 px-3 py-1 text-center text-xs text-emerald-400 dark:border-emerald-700 dark:bg-emerald-950 dark:text-emerald-400 lg:flex"