From 72c07e8ad2992dca95a956315089541add98135b Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Thu, 14 Aug 2025 20:03:01 -0700 Subject: [PATCH] fix(whitelabel): fix privacy policy & terms, remove unused/unnecessary envvars for whitelabeling (#969) * fix(whitelabel): fix privacy policy & terms for whitelabeling * remove unused hide branding url * removed support email envvar, remove landing page except for hosted version * remove unnecessary comments * removed primary, secondary, accent color envvars and standardized usage of brand colors in css file * fix primaryColor refernce * fix invalid css --- apps/sim/app/(auth)/layout.tsx | 2 +- apps/sim/app/(auth)/login/login-form.tsx | 8 +- apps/sim/app/(auth)/signup/signup-form.tsx | 4 +- apps/sim/app/(auth)/verify/verify-content.tsx | 4 +- .../app/(landing)/components/blog-card.tsx | 2 +- .../app/(landing)/components/nav-client.tsx | 6 +- .../(landing)/components/sections/hero.tsx | 4 +- apps/sim/app/(landing)/contributors/page.tsx | 32 ++++---- apps/sim/app/(landing)/landing.tsx | 2 +- apps/sim/app/(landing)/privacy/page.tsx | 14 ++-- apps/sim/app/(landing)/terms/page.tsx | 18 +++-- apps/sim/app/api/chat/route.ts | 2 +- apps/sim/app/chat/[subdomain]/chat-client.tsx | 3 +- .../components/auth/email/email-auth.tsx | 12 +-- .../auth/password/password-auth.tsx | 12 +-- .../components/error-state/error-state.tsx | 10 +-- .../[subdomain]/components/header/header.tsx | 2 +- apps/sim/app/globals.css | 76 +++++++++++++++++++ apps/sim/app/manifest.ts | 4 +- apps/sim/app/unsubscribe/page.tsx | 2 +- .../create-chunk-modal/create-chunk-modal.tsx | 2 +- .../components/document-loading.tsx | 2 +- .../edit-chunk-modal/edit-chunk-modal.tsx | 2 +- .../knowledge/[id]/[documentId]/document.tsx | 6 +- .../[workspaceId]/knowledge/[id]/base.tsx | 6 +- .../knowledge-base-loading.tsx | 2 +- .../components/create-modal/create-modal.tsx | 2 +- .../primary-button/primary-button.tsx | 2 +- .../components/search-input/search-input.tsx | 2 +- .../[workspaceId]/knowledge/loading.tsx | 2 +- .../components/filters/components/folder.tsx | 4 +- .../components/filters/components/level.tsx | 4 +- .../filters/components/timeline.tsx | 4 +- .../components/filters/components/trigger.tsx | 4 +- .../filters/components/workflow.tsx | 4 +- .../trace-spans/trace-spans-display.tsx | 4 +- .../app/workspace/[workspaceId]/logs/logs.tsx | 6 +- .../templates/components/template-card.tsx | 4 +- .../[workspaceId]/templates/templates.tsx | 2 +- .../chat-deploy/hooks/use-chat-deployment.ts | 2 +- .../components/deploy-modal/deploy-modal.tsx | 12 +-- .../deployment-controls.tsx | 4 +- .../template-modal/template-modal.tsx | 6 +- .../components/control-bar/control-bar.tsx | 12 +-- .../components/panel/components/chat/chat.tsx | 6 +- .../output-select/output-select.tsx | 6 +- .../copilot-message/copilot-message.tsx | 5 +- .../components/user-input/user-input.tsx | 6 +- .../panel/components/variables/variables.tsx | 8 +- .../w/[workflowId]/components/panel/panel.tsx | 2 +- .../skeleton-loading/skeleton-loading.tsx | 2 +- .../components/action-bar/action-bar.tsx | 2 +- .../sub-block/components/webhook/webhook.tsx | 2 +- .../workflow-block/workflow-block.tsx | 2 +- .../knowledge-base-tags.tsx | 2 +- .../knowledge-tags/knowledge-tags.tsx | 2 +- .../components/account/account.tsx | 4 +- .../workflow-context-menu.tsx | 2 +- .../components/invite-modal/invite-modal.tsx | 2 +- .../w/components/sidebar/sidebar.tsx | 5 +- apps/sim/blocks/blocks/agent.ts | 2 +- apps/sim/components/branded-layout.tsx | 14 +--- apps/sim/components/emails/base-styles.ts | 6 +- apps/sim/components/ui/loading-agent.tsx | 6 +- apps/sim/lib/branding/branding.ts | 31 -------- apps/sim/lib/branding/metadata.ts | 2 +- apps/sim/lib/env.ts | 12 --- apps/sim/next.config.ts | 60 +++++++++++---- helm/sim/examples/values-whitelabeled.yaml | 6 -- helm/sim/values.schema.json | 24 ------ helm/sim/values.yaml | 6 -- 71 files changed, 283 insertions(+), 263 deletions(-) diff --git a/apps/sim/app/(auth)/layout.tsx b/apps/sim/app/(auth)/layout.tsx index 3d1f4bcb30..de08c58665 100644 --- a/apps/sim/app/(auth)/layout.tsx +++ b/apps/sim/app/(auth)/layout.tsx @@ -9,7 +9,7 @@ export default function AuthLayout({ children }: { children: React.ReactNode }) const brand = useBrandConfig() return ( -
+
{/* Background pattern */} {isLoading ? 'Signing in...' : 'Sign In'} @@ -468,7 +468,7 @@ export default function LoginPage({ Don't have an account? Sign up @@ -497,7 +497,7 @@ export default function LoginPage({ placeholder='Enter your email' required type='email' - className='border-neutral-700/80 bg-neutral-900 text-white placeholder:text-white/60 focus:border-[#802FFF]/70 focus:ring-[#802FFF]/20' + className='border-neutral-700/80 bg-neutral-900 text-white placeholder:text-white/60 focus:border-[var(--brand-primary-hover-hex)]/70 focus:ring-[var(--brand-primary-hover-hex)]/20' /> {resetStatus.type && ( @@ -512,7 +512,7 @@ export default function LoginPage({ @@ -277,7 +277,7 @@ export default function NavClient({ > e.preventDefault()} onCloseAutoFocus={(e) => e.preventDefault()} > @@ -311,7 +311,7 @@ export default function NavClient({ target='_blank' rel='noopener noreferrer' > - diff --git a/apps/sim/app/(landing)/components/sections/hero.tsx b/apps/sim/app/(landing)/components/sections/hero.tsx index c33f17e914..02e556b4a4 100644 --- a/apps/sim/app/(landing)/components/sections/hero.tsx +++ b/apps/sim/app/(landing)/components/sections/hero.tsx @@ -62,7 +62,7 @@ function Hero() { diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/create-chunk-modal/create-chunk-modal.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/create-chunk-modal/create-chunk-modal.tsx index 300f62255a..50d1100c9c 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/create-chunk-modal/create-chunk-modal.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/[id]/[documentId]/components/create-chunk-modal/create-chunk-modal.tsx @@ -192,7 +192,7 @@ export function CreateChunkModal({ diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/components/primary-button/primary-button.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/components/primary-button/primary-button.tsx index 93def430ef..48fa070e2d 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/components/primary-button/primary-button.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/components/primary-button/primary-button.tsx @@ -27,7 +27,7 @@ export function PrimaryButton({ disabled={disabled} size={size} className={cn( - 'flex items-center gap-1 bg-[#701FFC] font-[480] text-white shadow-[0_0_0_0_#701FFC] transition-all duration-200 hover:bg-[#6518E6] hover:shadow-[0_0_0_4px_rgba(127,47,255,0.15)]', + 'flex items-center gap-1 bg-[var(--brand-primary-hex)] font-[480] text-white shadow-[0_0_0_0_var(--brand-primary-hex)] transition-all duration-200 hover:bg-[var(--brand-primary-hover-hex)] hover:shadow-[0_0_0_4px_rgba(127,47,255,0.15)]', disabled && 'disabled:cursor-not-allowed disabled:opacity-50', className )} diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/components/search-input/search-input.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/components/search-input/search-input.tsx index 2472433bea..70a5425f48 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/components/search-input/search-input.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/components/search-input/search-input.tsx @@ -33,7 +33,7 @@ export function SearchInput({ /> {isLoading ? (
-
+
) : ( value && diff --git a/apps/sim/app/workspace/[workspaceId]/knowledge/loading.tsx b/apps/sim/app/workspace/[workspaceId]/knowledge/loading.tsx index 798d70b84d..a019dcda0d 100644 --- a/apps/sim/app/workspace/[workspaceId]/knowledge/loading.tsx +++ b/apps/sim/app/workspace/[workspaceId]/knowledge/loading.tsx @@ -37,7 +37,7 @@ export default function KnowledgeLoading() {
{/* diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/chat/components/output-select/output-select.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/chat/components/output-select/output-select.tsx index 184928788a..e051a5f80f 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/chat/components/output-select/output-select.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/chat/components/output-select/output-select.tsx @@ -327,8 +327,8 @@ export function OutputSelect({ onClick={() => setIsOutputDropdownOpen(!isOutputDropdownOpen)} className={`flex h-9 w-full items-center justify-between rounded-[8px] border px-3 py-1.5 font-normal text-sm shadow-xs transition-colors ${ isOutputDropdownOpen - ? 'border-[#E5E5E5] bg-[#FFFFFF] text-muted-foreground dark:border-[#414141] dark:bg-[#202020]' - : 'border-[#E5E5E5] bg-[#FFFFFF] text-muted-foreground hover:text-muted-foreground dark:border-[#414141] dark:bg-[#202020]' + ? 'border-[#E5E5E5] bg-[#FFFFFF] text-muted-foreground dark:border-[#414141] dark:bg-[var(--surface-elevated)]' + : 'border-[#E5E5E5] bg-[#FFFFFF] text-muted-foreground hover:text-muted-foreground dark:border-[#414141] dark:bg-[var(--surface-elevated)]' }`} disabled={workflowOutputs.length === 0 || disabled} > @@ -362,7 +362,7 @@ export function OutputSelect({ {isOutputDropdownOpen && workflowOutputs.length > 0 && ( -
+
{Object.entries(groupedOutputs).map(([blockName, outputs]) => (
diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-message/copilot-message.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-message/copilot-message.tsx index e6e73b5afa..82c7cd57d2 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-message/copilot-message.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/copilot-message/copilot-message.tsx @@ -604,10 +604,7 @@ const CopilotMessage: FC = memo(
{/* Message content in purple box */} -
+
diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/user-input/user-input.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/user-input/user-input.tsx index c5177564f9..63e569c4ee 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/user-input/user-input.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/copilot/components/user-input/user-input.tsx @@ -410,9 +410,9 @@ const UserInput = forwardRef(
( onClick={handleSubmit} disabled={!canSubmit} size='icon' - className='h-6 w-6 rounded-full bg-[#802FFF] text-white shadow-[0_0_0_0_#802FFF] transition-all duration-200 hover:bg-[#7028E6] hover:shadow-[0_0_0_4px_rgba(127,47,255,0.15)]' + className='h-6 w-6 rounded-full bg-[var(--brand-primary-hover-hex)] text-white shadow-[0_0_0_0_var(--brand-primary-hover-hex)] transition-all duration-200 hover:bg-[var(--brand-primary-hover-hex)] hover:shadow-[0_0_0_4px_rgba(127,47,255,0.15)]' > {isLoading ? ( diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/variables/variables.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/variables/variables.tsx index c68e20c194..66e8282fa2 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/variables/variables.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/variables/variables.tsx @@ -212,7 +212,7 @@ export function Variables() {