mirror of
https://github.com/formbricks/formbricks.git
synced 2026-02-18 04:49:17 -06:00
feat: allow remove branding of in app surveys (#2085)
Co-authored-by: Dhruwang <dhruwangjariwala18@gmail.com>
This commit is contained in:
@@ -199,7 +199,7 @@ const FAQ = [
|
||||
{
|
||||
question: "Why is there a Commercial plan?",
|
||||
answer:
|
||||
"The commercial plan is for features who break the OSS WIN-WIN Loop or incur additional cost. We charge 29$ if you want a custom domain, remove Formbricks branding, collect large files in surveys or collect payments. We think that’s fair :)",
|
||||
"The commercial plan is for features who break the OSS WIN-WIN Loop or incur additional cost. We charge 30$ if you want a custom domain, remove Formbricks branding, collect large files in surveys or collect payments. We think that’s fair :)",
|
||||
},
|
||||
{
|
||||
question: "Are your in app surveys also free forever?",
|
||||
|
||||
@@ -15,7 +15,6 @@ interface EditFormbricksBrandingProps {
|
||||
product: TProduct;
|
||||
canRemoveBranding: boolean;
|
||||
environmentId: string;
|
||||
isFormbricksCloud?: boolean;
|
||||
}
|
||||
|
||||
export function EditFormbricksBranding({
|
||||
@@ -23,7 +22,6 @@ export function EditFormbricksBranding({
|
||||
product,
|
||||
canRemoveBranding,
|
||||
environmentId,
|
||||
isFormbricksCloud,
|
||||
}: EditFormbricksBrandingProps) {
|
||||
const [isBrandingEnabled, setIsBrandingEnabled] = useState(
|
||||
type === "linkSurvey" ? product.linkSurveyBranding : product.inAppSurveyBranding
|
||||
@@ -71,14 +69,7 @@ export function EditFormbricksBranding({
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
{type !== "linkSurvey" && !isFormbricksCloud && (
|
||||
<UpgradePlanNotice
|
||||
message="To remove the Formbricks branding from In-App Surveys, please"
|
||||
textForUrl="request an Enterprise license."
|
||||
url="https://formbricks.com/docs/self-hosting/enterprise"
|
||||
/>
|
||||
)}
|
||||
{type !== "linkSurvey" && isFormbricksCloud && (
|
||||
{type !== "linkSurvey" && (
|
||||
<UpgradePlanNotice
|
||||
message="To remove the Formbricks branding from In-app Surveys, please"
|
||||
textForUrl="upgrade your plan."
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
getRemoveLinkBrandingPermission,
|
||||
} from "@formbricks/ee/lib/service";
|
||||
import { authOptions } from "@formbricks/lib/authOptions";
|
||||
import { DEFAULT_BRAND_COLOR, IS_FORMBRICKS_CLOUD } from "@formbricks/lib/constants";
|
||||
import { DEFAULT_BRAND_COLOR } from "@formbricks/lib/constants";
|
||||
import { getMembershipByUserIdTeamId } from "@formbricks/lib/membership/service";
|
||||
import { getAccessFlags } from "@formbricks/lib/membership/utils";
|
||||
import { getProductByEnvironmentId } from "@formbricks/lib/product/service";
|
||||
@@ -86,7 +86,6 @@ export default async function ProfileSettingsPage({ params }: { params: { enviro
|
||||
product={product}
|
||||
canRemoveBranding={canRemoveInAppBranding}
|
||||
environmentId={params.environmentId}
|
||||
isFormbricksCloud={IS_FORMBRICKS_CLOUD}
|
||||
/>
|
||||
</SettingsCard>
|
||||
</div>
|
||||
|
||||
@@ -209,7 +209,7 @@ export default function PreviewSurvey({
|
||||
survey={survey}
|
||||
brandColor={brandColor}
|
||||
activeQuestionId={activeQuestionId || undefined}
|
||||
isBrandingEnabled={product.linkSurveyBranding}
|
||||
isBrandingEnabled={product.inAppSurveyBranding}
|
||||
onActiveQuestionChange={setActiveQuestionId}
|
||||
isRedirectDisabled={true}
|
||||
onFileUpload={onFileUpload}
|
||||
@@ -278,7 +278,7 @@ export default function PreviewSurvey({
|
||||
survey={survey}
|
||||
brandColor={brandColor}
|
||||
activeQuestionId={activeQuestionId || undefined}
|
||||
isBrandingEnabled={product.linkSurveyBranding}
|
||||
isBrandingEnabled={product.inAppSurveyBranding}
|
||||
onActiveQuestionChange={setActiveQuestionId}
|
||||
isRedirectDisabled={true}
|
||||
onFileUpload={onFileUpload}
|
||||
|
||||
@@ -12,7 +12,7 @@ export const getIsEnterpriseEdition = (): boolean => {
|
||||
|
||||
export const getRemoveInAppBrandingPermission = (team: TTeam): boolean => {
|
||||
if (IS_FORMBRICKS_CLOUD) return team.billing.features.inAppSurvey.status !== "inactive";
|
||||
else if (!IS_FORMBRICKS_CLOUD) return getIsEnterpriseEdition();
|
||||
else if (!IS_FORMBRICKS_CLOUD) return true;
|
||||
else return false;
|
||||
};
|
||||
|
||||
|
||||
@@ -68,6 +68,7 @@ export default function SurveysList({
|
||||
{filteredSurveys.map((survey) => {
|
||||
return (
|
||||
<SurveyCard
|
||||
key={survey.id}
|
||||
survey={survey}
|
||||
environment={environment}
|
||||
otherEnvironment={otherEnvironment}
|
||||
@@ -84,6 +85,7 @@ export default function SurveysList({
|
||||
{filteredSurveys.map((survey) => {
|
||||
return (
|
||||
<SurveyCard
|
||||
key={survey.id}
|
||||
survey={survey}
|
||||
environment={environment}
|
||||
otherEnvironment={otherEnvironment}
|
||||
|
||||
Reference in New Issue
Block a user