diff --git a/web/.env.example b/web/.env.example index 439092c20e0a0e..3045cef2f9d258 100644 --- a/web/.env.example +++ b/web/.env.example @@ -15,4 +15,7 @@ NEXT_PUBLIC_PUBLIC_API_PREFIX=http://localhost:5001/api NEXT_PUBLIC_SENTRY_DSN= # Disable Next.js Telemetry (https://nextjs.org/telemetry) -NEXT_TELEMETRY_DISABLED=1 \ No newline at end of file +NEXT_TELEMETRY_DISABLED=1 + +# Disable Upload Image as WebApp icon default is false +NEXT_PUBLIC_UPLOAD_IMAGE_AS_ICON=false diff --git a/web/app/components/base/app-icon-picker/index.tsx b/web/app/components/base/app-icon-picker/index.tsx index a618c34f592a9d..825481547501a8 100644 --- a/web/app/components/base/app-icon-picker/index.tsx +++ b/web/app/components/base/app-icon-picker/index.tsx @@ -13,7 +13,7 @@ import s from './style.module.css' import getCroppedImg from './utils' import type { AppIconType, ImageFile } from '@/types/app' import cn from '@/utils/classnames' - +import { DISABLE_UPLOAD_IMAGE_AS_ICON } from '@/config' export type AppIconEmojiSelection = { type: 'emoji' icon: string @@ -101,7 +101,7 @@ const AppIconPicker: FC = ({ wrapperClassName={className} className={cn(s.container, '!w-[362px] !p-0')} > -
+ {!DISABLE_UPLOAD_IMAGE_AS_ICON &&
{tabs.map(tab => ( ))}
-
+
} diff --git a/web/config/index.ts b/web/config/index.ts index 6b0e551e35c294..bb100473b1451c 100644 --- a/web/config/index.ts +++ b/web/config/index.ts @@ -247,3 +247,5 @@ Thought: {{agent_scratchpad}} export const VAR_REGEX = /\{\{(#[a-zA-Z0-9_-]{1,50}(\.[a-zA-Z_][a-zA-Z0-9_]{0,29}){1,10}#)\}\}/gi export const TEXT_GENERATION_TIMEOUT_MS = 60000 + +export const DISABLE_UPLOAD_IMAGE_AS_ICON = process.env.NEXT_PUBLIC_DISABLE_UPLOAD_IMAGE_AS_ICON === 'true'