mirror of
https://github.com/formbricks/formbricks.git
synced 2026-02-22 18:18:45 -06:00
chore: upselling UI (#4491)
This commit is contained in:
committed by
GitHub
parent
28aec8852b
commit
8936ce928f
@@ -25,6 +25,7 @@ interface SettingsViewProps {
|
||||
isUserTargetingAllowed?: boolean;
|
||||
locale: string;
|
||||
projectPermission: TTeamPermission | null;
|
||||
isFormbricksCloud: boolean;
|
||||
}
|
||||
|
||||
export const SettingsView = ({
|
||||
@@ -39,6 +40,7 @@ export const SettingsView = ({
|
||||
isUserTargetingAllowed = false,
|
||||
locale,
|
||||
projectPermission,
|
||||
isFormbricksCloud,
|
||||
}: SettingsViewProps) => {
|
||||
const isAppSurvey = localSurvey.type === "app";
|
||||
|
||||
@@ -68,7 +70,7 @@ export const SettingsView = ({
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<TargetingLockedCard />
|
||||
<TargetingLockedCard isFormbricksCloud={isFormbricksCloud} environmentId={environment.id} />
|
||||
)}
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
@@ -220,6 +220,7 @@ export const SurveyEditor = ({
|
||||
isUserTargetingAllowed={isUserTargetingAllowed}
|
||||
locale={locale}
|
||||
projectPermission={projectPermission}
|
||||
isFormbricksCloud={isFormbricksCloud}
|
||||
/>
|
||||
)}
|
||||
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
import { UpgradePrompt } from "@/modules/ui/components/upgrade-prompt";
|
||||
import * as Collapsible from "@radix-ui/react-collapsible";
|
||||
import { LockIcon, UsersIcon } from "lucide-react";
|
||||
import { LockIcon } from "lucide-react";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { useState } from "react";
|
||||
|
||||
export const TargetingLockedCard = () => {
|
||||
interface TargetingLockedCardProps {
|
||||
isFormbricksCloud: boolean;
|
||||
environmentId: string;
|
||||
}
|
||||
|
||||
export const TargetingLockedCard = ({ isFormbricksCloud, environmentId }: TargetingLockedCardProps) => {
|
||||
const t = useTranslations();
|
||||
const [open, setOpen] = useState(false);
|
||||
|
||||
@@ -32,17 +37,20 @@ export const TargetingLockedCard = () => {
|
||||
<hr className="text-slate-600" />
|
||||
<div className="flex items-center justify-center">
|
||||
<UpgradePrompt
|
||||
icon={<UsersIcon className="h-6 w-6 text-slate-900" />}
|
||||
title={t("environments.surveys.edit.unlock_targeting_title")}
|
||||
description={t("environments.surveys.edit.unlock_targeting_description")}
|
||||
buttons={[
|
||||
{
|
||||
text: t("common.start_free_trial"),
|
||||
href: `https://formbricks.com/docs/self-hosting/license#30-day-trial-license-request`,
|
||||
href: isFormbricksCloud
|
||||
? `/environments/${environmentId}/settings/billing`
|
||||
: "https://formbricks.com/upgrade-self-hosting-license",
|
||||
},
|
||||
{
|
||||
text: t("common.learn_more"),
|
||||
href: `https://formbricks.com/docs/self-hosting/license#30-day-trial-license-request`,
|
||||
href: isFormbricksCloud
|
||||
? `/environments/${environmentId}/settings/billing`
|
||||
: "https://formbricks.com/learn-more-self-hosting-license",
|
||||
},
|
||||
]}
|
||||
/>
|
||||
|
||||
@@ -3,18 +3,15 @@
|
||||
import { DisableTwoFactorModal } from "@/modules/ee/two-factor-auth/components/disable-two-factor-modal";
|
||||
import { EnableTwoFactorModal } from "@/modules/ee/two-factor-auth/components/enable-two-factor-modal";
|
||||
import { Switch } from "@/modules/ui/components/switch";
|
||||
import { UpgradePlanNotice } from "@/modules/ui/components/upgrade-plan-notice";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { useState } from "react";
|
||||
import { TUser } from "@formbricks/types/user";
|
||||
|
||||
interface AccountSecurityProps {
|
||||
user: TUser;
|
||||
isTwoFactorAuthEnabled: boolean;
|
||||
environmentId: string;
|
||||
}
|
||||
|
||||
export const AccountSecurity = ({ user, isTwoFactorAuthEnabled, environmentId }: AccountSecurityProps) => {
|
||||
export const AccountSecurity = ({ user }: AccountSecurityProps) => {
|
||||
const t = useTranslations();
|
||||
const [twoFactorModalOpen, setTwoFactorModalOpen] = useState(false);
|
||||
const [disableTwoFactorModalOpen, setDisableTwoFactorModalOpen] = useState(false);
|
||||
@@ -24,7 +21,6 @@ export const AccountSecurity = ({ user, isTwoFactorAuthEnabled, environmentId }:
|
||||
<div className="flex items-center space-x-4">
|
||||
<Switch
|
||||
checked={user.twoFactorEnabled}
|
||||
disabled={!isTwoFactorAuthEnabled && !user.twoFactorEnabled}
|
||||
onCheckedChange={(checked) => {
|
||||
if (checked) {
|
||||
setTwoFactorModalOpen(true);
|
||||
@@ -43,13 +39,6 @@ export const AccountSecurity = ({ user, isTwoFactorAuthEnabled, environmentId }:
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{!isTwoFactorAuthEnabled && !user.twoFactorEnabled && (
|
||||
<UpgradePlanNotice
|
||||
message={t("environments.settings.profile.to_enable_two_factor_authentication_you_need_an_active")}
|
||||
textForUrl={t("common.enterprise_license")}
|
||||
url={`/environments/${environmentId}/settings/enterprise`}
|
||||
/>
|
||||
)}
|
||||
<EnableTwoFactorModal open={twoFactorModalOpen} setOpen={setTwoFactorModalOpen} />
|
||||
<DisableTwoFactorModal open={disableTwoFactorModalOpen} setOpen={setDisableTwoFactorModalOpen} />
|
||||
</div>
|
||||
|
||||
@@ -5,6 +5,7 @@ import { getIsMultiOrgEnabled, getIsTwoFactorAuthEnabled } from "@/modules/ee/li
|
||||
import { PageContentWrapper } from "@/modules/ui/components/page-content-wrapper";
|
||||
import { PageHeader } from "@/modules/ui/components/page-header";
|
||||
import { SettingsId } from "@/modules/ui/components/settings-id";
|
||||
import { UpgradePrompt } from "@/modules/ui/components/upgrade-prompt";
|
||||
import { getServerSession } from "next-auth";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
import { IS_FORMBRICKS_CLOUD } from "@formbricks/lib/constants";
|
||||
@@ -64,11 +65,28 @@ const Page = async (props: { params: Promise<{ environmentId: string }> }) => {
|
||||
<SettingsCard
|
||||
title={t("common.security")}
|
||||
description={t("environments.settings.profile.security_description")}>
|
||||
<AccountSecurity
|
||||
user={user}
|
||||
isTwoFactorAuthEnabled={isTwoFactorAuthEnabled}
|
||||
environmentId={environmentId}
|
||||
/>
|
||||
{!isTwoFactorAuthEnabled && !user.twoFactorEnabled ? (
|
||||
<UpgradePrompt
|
||||
title={t("environments.settings.profile.two_factor_authentication")}
|
||||
description={t("environments.settings.profile.two_factor_authentication_description")}
|
||||
buttons={[
|
||||
{
|
||||
text: t("common.start_free_trial"),
|
||||
href: IS_FORMBRICKS_CLOUD
|
||||
? `/environments/${params.environmentId}/settings/billing`
|
||||
: "https://formbricks.com/upgrade-self-hosting-license",
|
||||
},
|
||||
{
|
||||
text: t("common.learn_more"),
|
||||
href: IS_FORMBRICKS_CLOUD
|
||||
? `/environments/${params.environmentId}/settings/billing`
|
||||
: "https://formbricks.com/learn-more-self-hosting-license",
|
||||
},
|
||||
]}
|
||||
/>
|
||||
) : (
|
||||
<AccountSecurity user={user} />
|
||||
)}
|
||||
</SettingsCard>
|
||||
)}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ import { Alert, AlertDescription } from "@/modules/ui/components/alert";
|
||||
import { Button } from "@/modules/ui/components/button";
|
||||
import { Input } from "@/modules/ui/components/input";
|
||||
import { Label } from "@/modules/ui/components/label";
|
||||
import { UpgradePlanNotice } from "@/modules/ui/components/upgrade-plan-notice";
|
||||
import { UpgradePrompt } from "@/modules/ui/components/upgrade-prompt";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { OrganizationRole } from "@prisma/client";
|
||||
import { useTranslations } from "next-intl";
|
||||
@@ -94,20 +94,25 @@ export const IndividualInviteTab = ({
|
||||
</AlertDescription>
|
||||
</Alert>
|
||||
)}
|
||||
{!canDoRoleManagement &&
|
||||
(isFormbricksCloud ? (
|
||||
<UpgradePlanNotice
|
||||
message={t("environments.settings.general.upgrade_plan_notice_message")}
|
||||
url={`/environments/${environmentId}/settings/billing`}
|
||||
textForUrl={t("environments.settings.general.upgrade_plan_notice_text_for_url_cloud")}
|
||||
/>
|
||||
) : (
|
||||
<UpgradePlanNotice
|
||||
message={t("environments.settings.general.upgrade_plan_notice_message")}
|
||||
url={`/environments/${environmentId}/settings/enterprise`}
|
||||
textForUrl={t("environments.settings.general.upgrade_plan_notice_text_for_url_enterprise")}
|
||||
/>
|
||||
))}
|
||||
{!canDoRoleManagement && (
|
||||
<UpgradePrompt
|
||||
title={t("environments.settings.general.upgrade_plan_notice_message")}
|
||||
buttons={[
|
||||
{
|
||||
text: t("common.start_free_trial"),
|
||||
href: isFormbricksCloud
|
||||
? `/environments/${environmentId}/settings/billing`
|
||||
: "https://formbricks.com/upgrade-self-hosting-license",
|
||||
},
|
||||
{
|
||||
text: t("common.learn_more"),
|
||||
href: isFormbricksCloud
|
||||
? `/environments/${environmentId}/settings/billing`
|
||||
: "https://formbricks.com/learn-more-self-hosting-license",
|
||||
},
|
||||
]}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -8,10 +8,9 @@ import { getTeamPermissionFlags } from "@/modules/ee/teams/utils/teams";
|
||||
import { PageContentWrapper } from "@/modules/ui/components/page-content-wrapper";
|
||||
import { PageHeader } from "@/modules/ui/components/page-header";
|
||||
import { UpgradePrompt } from "@/modules/ui/components/upgrade-prompt";
|
||||
import { UserIcon } from "lucide-react";
|
||||
import { getServerSession } from "next-auth";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
import { ITEMS_PER_PAGE } from "@formbricks/lib/constants";
|
||||
import { IS_FORMBRICKS_CLOUD, ITEMS_PER_PAGE } from "@formbricks/lib/constants";
|
||||
import { getEnvironment } from "@formbricks/lib/environment/service";
|
||||
import { getMembershipByUserIdOrganizationId } from "@formbricks/lib/membership/service";
|
||||
import { getAccessFlags } from "@formbricks/lib/membership/utils";
|
||||
@@ -91,17 +90,20 @@ export const ContactsPage = async ({
|
||||
) : (
|
||||
<div className="flex items-center justify-center">
|
||||
<UpgradePrompt
|
||||
icon={<UserIcon className="h-6 w-6 text-slate-900" />}
|
||||
title={t("environments.contacts.unlock_contacts_title")}
|
||||
description={t("environments.contacts.unlock_contacts_description")}
|
||||
buttons={[
|
||||
{
|
||||
text: t("common.start_free_trial"),
|
||||
href: `https://formbricks.com/docs/self-hosting/license#30-day-trial-license-request`,
|
||||
href: IS_FORMBRICKS_CLOUD
|
||||
? `/environments/${params.environmentId}/settings/billing`
|
||||
: "https://formbricks.com/upgrade-self-hosting-license",
|
||||
},
|
||||
{
|
||||
text: t("common.learn_more"),
|
||||
href: `https://formbricks.com/docs/self-hosting/license#30-day-trial-license-request`,
|
||||
href: IS_FORMBRICKS_CLOUD
|
||||
? `/environments/${params.environmentId}/settings/billing`
|
||||
: "https://formbricks.com/learn-more-self-hosting-license",
|
||||
},
|
||||
]}
|
||||
/>
|
||||
|
||||
@@ -9,9 +9,9 @@ import { getTeamPermissionFlags } from "@/modules/ee/teams/utils/teams";
|
||||
import { PageContentWrapper } from "@/modules/ui/components/page-content-wrapper";
|
||||
import { PageHeader } from "@/modules/ui/components/page-header";
|
||||
import { UpgradePrompt } from "@/modules/ui/components/upgrade-prompt";
|
||||
import { UsersIcon } from "lucide-react";
|
||||
import { getServerSession } from "next-auth";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
import { IS_FORMBRICKS_CLOUD } from "@formbricks/lib/constants";
|
||||
import { getEnvironment } from "@formbricks/lib/environment/service";
|
||||
import { getMembershipByUserIdOrganizationId } from "@formbricks/lib/membership/service";
|
||||
import { getAccessFlags } from "@formbricks/lib/membership/utils";
|
||||
@@ -96,17 +96,20 @@ export const SegmentsPage = async ({
|
||||
) : (
|
||||
<div className="flex items-center justify-center">
|
||||
<UpgradePrompt
|
||||
icon={<UsersIcon className="h-6 w-6 text-slate-900" />}
|
||||
title={t("environments.segments.unlock_segments_title")}
|
||||
description={t("environments.segments.unlock_segments_description")}
|
||||
buttons={[
|
||||
{
|
||||
text: t("common.start_free_trial"),
|
||||
href: `https://formbricks.com/docs/self-hosting/license#30-day-trial-license-request`,
|
||||
href: IS_FORMBRICKS_CLOUD
|
||||
? `/environments/${params.environmentId}/settings/billing`
|
||||
: "https://formbricks.com/upgrade-self-hosting-license",
|
||||
},
|
||||
{
|
||||
text: t("common.learn_more"),
|
||||
href: "https://formbricks.com/docs/self-hosting/license#30-day-trial-license-request",
|
||||
href: IS_FORMBRICKS_CLOUD
|
||||
? `/environments/${params.environmentId}/settings/billing`
|
||||
: "https://formbricks.com/learn-more-self-hosting-license",
|
||||
},
|
||||
]}
|
||||
/>
|
||||
|
||||
@@ -5,7 +5,7 @@ import { Button } from "@/modules/ui/components/button";
|
||||
import { ConfirmationModal } from "@/modules/ui/components/confirmation-modal";
|
||||
import { Label } from "@/modules/ui/components/label";
|
||||
import { Switch } from "@/modules/ui/components/switch";
|
||||
import { UpgradePlanNotice } from "@/modules/ui/components/upgrade-plan-notice";
|
||||
import { UpgradePrompt } from "@/modules/ui/components/upgrade-prompt";
|
||||
import { useAutoAnimate } from "@formkit/auto-animate/react";
|
||||
import * as Collapsible from "@radix-ui/react-collapsible";
|
||||
import { ArrowUpRight, Languages } from "lucide-react";
|
||||
@@ -224,17 +224,24 @@ export const MultiLanguageCard: FC<MultiLanguageCardProps> = ({
|
||||
</Collapsible.CollapsibleTrigger>
|
||||
<Collapsible.CollapsibleContent className={`flex flex-col px-4 ${open && "pb-6"}`} ref={parent}>
|
||||
<div className="space-y-4">
|
||||
{!isMultiLanguageAllowed && !isFormbricksCloud && !isMultiLanguageActivated ? (
|
||||
<UpgradePlanNotice
|
||||
message={t("environments.surveys.edit.to_enable_multi_language_surveys_you_need_an_active")}
|
||||
textForUrl={t("common.enterprise_license")}
|
||||
url={`/environments/${environmentId}/settings/enterprise`}
|
||||
/>
|
||||
) : !isMultiLanguageAllowed && isFormbricksCloud && !isMultiLanguageActivated ? (
|
||||
<UpgradePlanNotice
|
||||
message={t("environments.surveys.edit.to_enable_multi_language_surveys_you_need_an_active")}
|
||||
textForUrl={t("common.enterprise_license")}
|
||||
url={`/environments/${environmentId}/settings/billing`}
|
||||
{!isMultiLanguageAllowed && !isMultiLanguageActivated ? (
|
||||
<UpgradePrompt
|
||||
title={t("environments.surveys.edit.upgrade_notice_title")}
|
||||
description={t("environments.surveys.edit.upgrade_notice_description")}
|
||||
buttons={[
|
||||
{
|
||||
text: t("common.start_free_trial"),
|
||||
href: isFormbricksCloud
|
||||
? `/environments/${environmentId}/settings/billing`
|
||||
: "https://formbricks.com/docs/self-hosting/license#30-day-trial-license-request",
|
||||
},
|
||||
{
|
||||
text: t("common.learn_more"),
|
||||
href: isFormbricksCloud
|
||||
? `/environments/${environmentId}/settings/billing`
|
||||
: "https://formbricks.com/learn-more-self-hosting-license",
|
||||
},
|
||||
]}
|
||||
/>
|
||||
) : (
|
||||
<>
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { SettingsCard } from "@/app/(app)/environments/[environmentId]/settings/components/SettingsCard";
|
||||
import { EditBranding } from "@/modules/ee/whitelabel/remove-branding/components/edit-branding";
|
||||
import { Alert, AlertDescription } from "@/modules/ui/components/alert";
|
||||
import { EmptyContent, ModalButton } from "@/modules/ui/components/empty-content";
|
||||
import { KeyIcon } from "lucide-react";
|
||||
import { ModalButton, UpgradePrompt } from "@/modules/ui/components/upgrade-prompt";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
import { IS_FORMBRICKS_CLOUD } from "@formbricks/lib/constants";
|
||||
import { TProject } from "@formbricks/types/project";
|
||||
@@ -27,11 +26,13 @@ export const BrandingSettingsCard = async ({
|
||||
text: t("common.start_free_trial"),
|
||||
href: IS_FORMBRICKS_CLOUD
|
||||
? `/environments/${environmentId}/settings/billing`
|
||||
: "https://formbricks.com/docs/self-hosting/license#30-day-trial-license-request",
|
||||
: "https://formbricks.com/upgrade-self-hosting-license",
|
||||
},
|
||||
{
|
||||
text: t("common.learn_more"),
|
||||
href: "https://formbricks.com/docs/self-hosting/license",
|
||||
href: IS_FORMBRICKS_CLOUD
|
||||
? `/environments/${environmentId}/settings/billing`
|
||||
: "https://formbricks.com/learn-more-self-hosting-license",
|
||||
},
|
||||
];
|
||||
|
||||
@@ -55,8 +56,7 @@ export const BrandingSettingsCard = async ({
|
||||
/>
|
||||
</div>
|
||||
) : (
|
||||
<EmptyContent
|
||||
icon={<KeyIcon className="h-6 w-6 text-slate-900" />}
|
||||
<UpgradePrompt
|
||||
title={t("environments.project.look.remove_branding_with_a_higher_plan")}
|
||||
description={t("environments.project.look.eliminate_branding_with_whitelabel")}
|
||||
buttons={buttons}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { Dialog, DialogContent, DialogTitle } from "@/modules/ui/components/dialog";
|
||||
import { EmptyContent, ModalButton } from "@/modules/ui/components/empty-content";
|
||||
import { FolderIcon } from "lucide-react";
|
||||
import { ModalButton, UpgradePrompt } from "@/modules/ui/components/upgrade-prompt";
|
||||
import { useTranslations } from "next-intl";
|
||||
|
||||
interface ProjectLimitModalProps {
|
||||
@@ -19,8 +18,7 @@ export const ProjectLimitModal = ({ open, setOpen, projectLimit, buttons }: Proj
|
||||
<Dialog open={open} onOpenChange={setOpen}>
|
||||
<DialogContent className="w-full max-w-[564px] bg-white">
|
||||
<DialogTitle>{t("common.projects_limit_reached")}</DialogTitle>
|
||||
<EmptyContent
|
||||
icon={<FolderIcon className="h-6 w-6 text-slate-900" />}
|
||||
<UpgradePrompt
|
||||
title={t("common.unlock_more_projects_with_a_higher_plan")}
|
||||
description={t("common.you_have_reached_your_limit_of_project_limit", { projectLimit })}
|
||||
buttons={buttons}
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
DropdownMenuSeparator,
|
||||
DropdownMenuTrigger,
|
||||
} from "@/modules/ui/components/dropdown-menu";
|
||||
import { ModalButton } from "@/modules/ui/components/empty-content";
|
||||
import { ModalButton } from "@/modules/ui/components/upgrade-prompt";
|
||||
import { BlendIcon, ChevronRightIcon, GlobeIcon, GlobeLockIcon, LinkIcon, PlusIcon } from "lucide-react";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
import { Button } from "@/modules/ui/components/button";
|
||||
import { Muted, P } from "@/modules/ui/components/typography";
|
||||
|
||||
export type ModalButton = {
|
||||
text: string;
|
||||
href?: string;
|
||||
onClick?: () => void;
|
||||
};
|
||||
|
||||
interface EmptyContentProps {
|
||||
icon: React.ReactNode;
|
||||
title: string;
|
||||
description: string;
|
||||
buttons: [ModalButton, ModalButton];
|
||||
}
|
||||
|
||||
export const EmptyContent = ({ icon, title, description, buttons }: EmptyContentProps) => {
|
||||
const [primaryButton, secondaryButton] = buttons;
|
||||
|
||||
return (
|
||||
<div className="flex flex-col items-center gap-6 p-6">
|
||||
<div className="rounded-md border border-slate-200 p-3">{icon}</div>
|
||||
<div className="flex flex-col items-center gap-2">
|
||||
<P className="text-xl font-semibold text-slate-900">{title}</P>
|
||||
<Muted className="text-slate-500">{description}</Muted>
|
||||
</div>
|
||||
<div className="flex gap-3">
|
||||
<Button
|
||||
{...(primaryButton.href
|
||||
? { href: primaryButton.href, target: "_blank", rel: "noopener noreferrer" }
|
||||
: {})}
|
||||
{...(primaryButton.onClick ? { onClick: primaryButton.onClick } : {})}>
|
||||
{primaryButton.text}
|
||||
</Button>
|
||||
<Button
|
||||
variant="secondary"
|
||||
{...(secondaryButton.href
|
||||
? { href: secondaryButton.href, target: "_blank", rel: "noopener noreferrer" }
|
||||
: {})}
|
||||
{...(secondaryButton.onClick ? { onClick: secondaryButton.onClick } : {})}>
|
||||
{secondaryButton.text}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
@@ -1,27 +0,0 @@
|
||||
import { Alert, AlertDescription } from "@/modules/ui/components/alert";
|
||||
import { Badge } from "@/modules/ui/components/badge";
|
||||
import Link from "next/link";
|
||||
|
||||
export const UpgradePlanNotice = ({
|
||||
message,
|
||||
url,
|
||||
textForUrl,
|
||||
}: {
|
||||
message: string;
|
||||
url: string;
|
||||
textForUrl: string;
|
||||
}) => {
|
||||
return (
|
||||
<Alert className="mt-1.5 flex items-center bg-slate-50">
|
||||
<Badge size="tiny" text="Pro" type="success" />
|
||||
<AlertDescription className="ml-2">
|
||||
<span className="mr-1 text-slate-600">{message}</span>
|
||||
<span className="underline">
|
||||
<Link href={url} target="_blank">
|
||||
{textForUrl}
|
||||
</Link>
|
||||
</span>
|
||||
</AlertDescription>
|
||||
</Alert>
|
||||
);
|
||||
};
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Button } from "@/modules/ui/components/button";
|
||||
import { KeyIcon } from "lucide-react";
|
||||
import Link from "next/link";
|
||||
|
||||
export type ModalButton = {
|
||||
@@ -8,18 +9,19 @@ export type ModalButton = {
|
||||
};
|
||||
|
||||
interface UpgradePromptProps {
|
||||
icon: React.ReactNode;
|
||||
title: string;
|
||||
description: string;
|
||||
description?: string;
|
||||
buttons: [ModalButton, ModalButton];
|
||||
}
|
||||
|
||||
export const UpgradePrompt = ({ icon, title, description, buttons }: UpgradePromptProps) => {
|
||||
export const UpgradePrompt = ({ title, description, buttons }: UpgradePromptProps) => {
|
||||
const [primaryButton, secondaryButton] = buttons;
|
||||
|
||||
return (
|
||||
<div className="flex w-full flex-col items-center gap-6 p-6">
|
||||
<div className="rounded-md border border-slate-200 p-3">{icon}</div>
|
||||
<div className="rounded-md border border-slate-200 p-3">
|
||||
<KeyIcon className="h-6 w-6 text-slate-900" />
|
||||
</div>
|
||||
<div className="flex max-w-[80%] flex-col items-center gap-2 text-center">
|
||||
<p className="text-xl font-semibold text-slate-900">{title}</p>
|
||||
<p className="text-sm text-slate-500">{description}</p>
|
||||
|
||||
@@ -1146,7 +1146,7 @@
|
||||
"there_can_only_be_one_owner_of_each_organization": "Es kann nur einen Besitzer jeder Organisation geben. Wenn Du deine Eigentümerschaft überträgst an",
|
||||
"to_confirm": "bestätigen:",
|
||||
"type_in": "Tippe ein",
|
||||
"upgrade_plan_notice_message": "Zugriffsrollen verwalten",
|
||||
"upgrade_plan_notice_message": "Um Zugriffsrollen zu verwalten,",
|
||||
"upgrade_plan_notice_text_for_url_cloud": "aktualisiere deinen Plan.",
|
||||
"upgrade_plan_notice_text_for_url_enterprise": "eine Enterprise-Lizenz besorgen.",
|
||||
"when_you_transfer_the_ownership_you_will_remain_an_admin_of_the_organization": "Wenn Du die Eigentümerschaft überträgst, bleibst Du ein Admin der Organisation.",
|
||||
@@ -1654,7 +1654,6 @@
|
||||
"this_setting_overwrites_your": "Diese Einstellung überschreibt deine",
|
||||
"three_points": "3 Punkte",
|
||||
"times": "Zeiten",
|
||||
"to_enable_multi_language_surveys_you_need_an_active": "Um mehrsprachige Umfragen zu aktivieren, benötigst Du eine aktive",
|
||||
"to_keep_the_placement_over_all_surveys_consistent_you_can": "Um die Platzierung über alle Umfragen hinweg konsistent zu halten, kannst du",
|
||||
"trigger_survey_when_one_of_the_actions_is_fired": "Umfrage auslösen, wenn eine der Aktionen ausgeführt wird...",
|
||||
"try_lollipop_or_mountain": "Versuch 'Lolli' oder 'Berge'...",
|
||||
@@ -1663,6 +1662,8 @@
|
||||
"unlock_targeting_title": "Targeting mit einem höheren Plan freischalten",
|
||||
"unsaved_changes_warning": "Du hast ungespeicherte Änderungen in deiner Umfrage. Möchtest Du sie speichern, bevor Du gehst?",
|
||||
"until_they_submit_a_response": "Bis sie eine Antwort einreichen",
|
||||
"upgrade_notice_description": "Erstelle mehrsprachige Umfragen und entdecke viele weitere Funktionen",
|
||||
"upgrade_notice_title": "Schalte mehrsprachige Umfragen mit einem höheren Plan frei",
|
||||
"upgrade_to_the_scale_plan": "auf den Scale-Plan upgraden.",
|
||||
"upload": "Hochladen",
|
||||
"upload_at_least_2_images": "Lade mindestens 2 Bilder hoch",
|
||||
|
||||
@@ -420,7 +420,7 @@
|
||||
"you": "You",
|
||||
"you_are_downgraded_to_the_community_edition": "You are downgraded to the Community Edition.",
|
||||
"you_are_not_authorised_to_perform_this_action": "You are not authorised to perform this action.",
|
||||
"you_have_reached_your_limit_of_project_limit": "You have reached your limit of {projectLimit} project.",
|
||||
"you_have_reached_your_limit_of_project_limit": "You have reached your limit of {projectLimit} projects.",
|
||||
"you_have_reached_your_monthly_miu_limit_of": "You have reached your monthly MIU limit of",
|
||||
"you_have_reached_your_monthly_response_limit_of": "You have reached your monthly response limit of",
|
||||
"you_will_be_downgraded_to_the_community_edition_on_date": "You will be downgraded to the Community Edition on {date}."
|
||||
@@ -1146,7 +1146,7 @@
|
||||
"there_can_only_be_one_owner_of_each_organization": "There can only be one owner of each organization. If you transfer your ownership to",
|
||||
"to_confirm": "to confirm:",
|
||||
"type_in": "Type in",
|
||||
"upgrade_plan_notice_message": "To manage access roles,",
|
||||
"upgrade_plan_notice_message": "Upgrade to manage access roles",
|
||||
"upgrade_plan_notice_text_for_url_cloud": "upgrade your plan.",
|
||||
"upgrade_plan_notice_text_for_url_enterprise": "get an Enterprise License.",
|
||||
"when_you_transfer_the_ownership_you_will_remain_an_admin_of_the_organization": "When you transfer the ownership, you will remain an Admin of the organization.",
|
||||
@@ -1654,7 +1654,6 @@
|
||||
"this_setting_overwrites_your": "This setting overwrites your",
|
||||
"three_points": "3 points",
|
||||
"times": "times",
|
||||
"to_enable_multi_language_surveys_you_need_an_active": "To enable multi-language surveys, you need an active",
|
||||
"to_keep_the_placement_over_all_surveys_consistent_you_can": "To keep the placement over all surveys consistent, you can",
|
||||
"trigger_survey_when_one_of_the_actions_is_fired": "Trigger survey when one of the actions is fired...",
|
||||
"try_lollipop_or_mountain": "Try 'lollipop' or 'mountain'...",
|
||||
@@ -1663,6 +1662,8 @@
|
||||
"unlock_targeting_title": "Unlock targeting with a higher plan",
|
||||
"unsaved_changes_warning": "You have unsaved changes in your survey. Would you like to save them before leaving?",
|
||||
"until_they_submit_a_response": "Until they submit a response",
|
||||
"upgrade_notice_description": "Create multilingual surveys and unlock many more features",
|
||||
"upgrade_notice_title": "Unlock multi-language surveys with a higher plan",
|
||||
"upgrade_to_the_scale_plan": "upgrade to the Scale plan.",
|
||||
"upload": "Upload",
|
||||
"upload_at_least_2_images": "Upload at least 2 images",
|
||||
|
||||
@@ -1146,7 +1146,7 @@
|
||||
"there_can_only_be_one_owner_of_each_organization": "Il ne peut y avoir qu'un seul propriétaire pour chaque organisation. Si vous transférez votre propriété à",
|
||||
"to_confirm": "pour confirmer :",
|
||||
"type_in": "Tapez",
|
||||
"upgrade_plan_notice_message": "Pour gérer les rôles d'accès,",
|
||||
"upgrade_plan_notice_message": "Mettez à niveau pour gérer les rôles d'accès",
|
||||
"upgrade_plan_notice_text_for_url_cloud": "mettez à niveau votre plan.",
|
||||
"upgrade_plan_notice_text_for_url_enterprise": "obtenir une licence d'entreprise.",
|
||||
"when_you_transfer_the_ownership_you_will_remain_an_admin_of_the_organization": "Lorsque vous transférez la propriété, vous resterez un administrateur de l'organisation.",
|
||||
@@ -1654,7 +1654,6 @@
|
||||
"this_setting_overwrites_your": "Ce paramètre écrase votre",
|
||||
"three_points": "3 points",
|
||||
"times": "fois",
|
||||
"to_enable_multi_language_surveys_you_need_an_active": "Pour activer des enquêtes multilingues, vous avez besoin d'un",
|
||||
"to_keep_the_placement_over_all_surveys_consistent_you_can": "Pour maintenir la cohérence du placement sur tous les sondages, vous pouvez",
|
||||
"trigger_survey_when_one_of_the_actions_is_fired": "Déclencher l'enquête lorsqu'une des actions est déclenchée...",
|
||||
"try_lollipop_or_mountain": "Essayez 'sucette' ou 'montagne'...",
|
||||
@@ -1663,6 +1662,8 @@
|
||||
"unlock_targeting_title": "Débloquez le ciblage avec un plan supérieur.",
|
||||
"unsaved_changes_warning": "Vous avez des modifications non enregistrées dans votre enquête. Souhaitez-vous les enregistrer avant de partir ?",
|
||||
"until_they_submit_a_response": "Jusqu'à ce qu'ils soumettent une réponse",
|
||||
"upgrade_notice_description": "Créez des sondages multilingues et débloquez de nombreuses autres fonctionnalités",
|
||||
"upgrade_notice_title": "Débloquez les sondages multilingues avec un plan supérieur",
|
||||
"upgrade_to_the_scale_plan": "passer au plan Scale.",
|
||||
"upload": "Télécharger",
|
||||
"upload_at_least_2_images": "Téléchargez au moins 2 images",
|
||||
|
||||
@@ -1146,7 +1146,7 @@
|
||||
"there_can_only_be_one_owner_of_each_organization": "Só pode ter um dono de cada organização. Se você transferir sua propriedade para",
|
||||
"to_confirm": "pra confirmar:",
|
||||
"type_in": "Digita aí",
|
||||
"upgrade_plan_notice_message": "Para gerenciar papéis de acesso,",
|
||||
"upgrade_plan_notice_message": "Atualize para gerenciar funções de acesso",
|
||||
"upgrade_plan_notice_text_for_url_cloud": "atualize seu plano.",
|
||||
"upgrade_plan_notice_text_for_url_enterprise": "conseguir uma Licença Empresarial.",
|
||||
"when_you_transfer_the_ownership_you_will_remain_an_admin_of_the_organization": "Quando você transferir a propriedade, você vai continuar sendo um Admin da organização.",
|
||||
@@ -1654,7 +1654,6 @@
|
||||
"this_setting_overwrites_your": "Essa configuração sobrescreve seu",
|
||||
"three_points": "3 pontos",
|
||||
"times": "times",
|
||||
"to_enable_multi_language_surveys_you_need_an_active": "Para habilitar pesquisas multilíngues, você precisa de um",
|
||||
"to_keep_the_placement_over_all_surveys_consistent_you_can": "Para manter a colocação consistente em todas as pesquisas, você pode",
|
||||
"trigger_survey_when_one_of_the_actions_is_fired": "Disparar pesquisa quando uma das ações for executada...",
|
||||
"try_lollipop_or_mountain": "Tenta 'pirulito' ou 'montanha'...",
|
||||
@@ -1663,6 +1662,8 @@
|
||||
"unlock_targeting_title": "Desbloqueie o direcionamento com um plano superior",
|
||||
"unsaved_changes_warning": "Você tem alterações não salvas na sua pesquisa. Quer salvar antes de sair?",
|
||||
"until_they_submit_a_response": "Até eles enviarem uma resposta",
|
||||
"upgrade_notice_description": "Crie pesquisas multilíngues e desbloqueie muitas outras funcionalidades",
|
||||
"upgrade_notice_title": "Desbloqueie pesquisas multilíngues com um plano superior",
|
||||
"upgrade_to_the_scale_plan": "faça um upgrade para o plano Scale.",
|
||||
"upload": "Enviar",
|
||||
"upload_at_least_2_images": "Faz o upload de pelo menos 2 imagens",
|
||||
|
||||
Reference in New Issue
Block a user